From 5b821910fbf58dc3a4b8c665a18bef561f0abbf2 Mon Sep 17 00:00:00 2001 From: Dobrin Rusev Date: Thu, 13 Jun 2019 10:15:54 -0400 Subject: [PATCH] For stringUtil.fromCharCode when creating a new string from the given array of char codes break the array in smaller chunks to avoid stach errors on low end devices add name to AUTHORS and CONTRIBUTORS --- AUTHORS | 1 + CONTRIBUTORS | 1 + lib/util/string_utils.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index df40777dd5..03a61a96a4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,6 +18,7 @@ Alugha GmbH <*@alugha.com> Alvaro Velad Galvan Bonnier Broadcasting <*@bonnierbroadcasting.com> Bryan Huh +Dobrin Rusev Esteban Dosztal Fadomire Google Inc. <*@google.com> diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 6a33e3d9c0..f0e2d36377 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -31,6 +31,7 @@ Bryan Huh Chad Assareh Chris Fillmore Costel Madalin Grecu +Dobrin Rusev Donato Borrello Duc Pham Esteban Dosztal diff --git a/lib/util/string_utils.js b/lib/util/string_utils.js index bd56d9be53..f8cc927f7a 100644 --- a/lib/util/string_utils.js +++ b/lib/util/string_utils.js @@ -217,7 +217,7 @@ shaka.util.StringUtils = class { * @return {string} */ static fromCharCode(array) { - const max = 16000; + const max = 1000; let ret = ''; for (let i = 0; i < array.length; i += max) { const subArray = array.subarray(i, i + max);