Commit 4eeb0f5f authored by kalman@chromium.org's avatar kalman@chromium.org

Remove (but leave references to) all of the builtins that we don't need saved

yet. That file is affecting page load speed.

BUG=252704
TBR=mpcomplete@chromium.org

Review URL: https://chromiumcodereview.appspot.com/17247007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208030 0039d316-1c4b-4281-b951-d872f2087c98
parent c9608da6
......@@ -69,13 +69,18 @@ const char kScript[] =
"// though. It would be nice to generate this somehow.\n"
"// Note: no JSON, it needs to handle toJSON being overriden so is\n"
"// implemented by hand.\n"
"var builtinTypes = [Object, Function, Array, String, Boolean, Number,\n"
" /*Math,*/ Date, RegExp, /*JSON,*/ Error, EvalError,\n"
" ReferenceError, SyntaxError, TypeError, URIError];\n"
"// Note: no Math, it's static (we also don't need it yet).\n"
"// Note: the other things that are commented out are ones that aren't\n"
"// needed to make the clobber tests pass, because running this\n"
"// file is a bit slow.\n"
"var builtinTypes = [\n"
" Object, Function, Array, String, /*Boolean, Number,*/\n"
" /*Math, Date,*/ RegExp, /*JSON, Error, EvalError,\n"
" ReferenceError, SyntaxError, TypeError, URIError*/];\n"
"builtinTypes.forEach(function(builtin) {\n"
" Save(builtin.name, getSafeBuiltin(builtin, true));\n"
"});\n"
"Save('Math', getSafeBuiltin(Math, false));\n"
"//Save('Math', getSafeBuiltin(Math, false));\n"
"// Save JSON. This is trickier because extensions can override toJSON in\n"
"// incompatible ways, and we need to prevent that.\n"
"var builtinToJSONs = builtinTypes.map(function(t) {\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment