diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-17 19:16:51 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-17 19:17:28 -0800 |
commit | bea26f1a9e138163225da1c1c8bb7e94fe055f3f (patch) | |
tree | dae10abfa1a20f09f47b77b3e4e8023e12053304 /src/parseTools.js | |
parent | 3acc64e9415216f6a68d5b01acf0e9c4d02d61e0 (diff) |
avoid unnecessary strings in allocate() constants
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index b446ade6..e73f6140 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1520,7 +1520,7 @@ function makePointer(slab, pos, allocator, type, ptr) { } if (!fail) types = 'i8'; } - if (typeof slab != 'string') slab = JSON.stringify(slab); + if (typeof slab == 'object') slab = '[' + slab.join(',') + ']'; // JS engines sometimes say array initializers are too large. Work around that by chunking and calling concat to combine at runtime var chunkSize = 10240; function chunkify(array) { |