From bea26f1a9e138163225da1c1c8bb7e94fe055f3f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 17 Jan 2013 19:16:51 -0800 Subject: avoid unnecessary strings in allocate() constants --- src/parseTools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parseTools.js') 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) { -- cgit v1.2.3-18-g5258