Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Unified Diff: chrome/renderer/extensions/safe_builtins.cc

Issue 17247007: Remove (but leave references to) all of the builtins that we don't need saved (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/safe_builtins.cc
diff --git a/chrome/renderer/extensions/safe_builtins.cc b/chrome/renderer/extensions/safe_builtins.cc
index 2a58bf291cee6212e9d35e7693f72fa125c7cf13..dbb85b7e402306974827d7bcd9f196953bf0a99f 100644
--- a/chrome/renderer/extensions/safe_builtins.cc
+++ b/chrome/renderer/extensions/safe_builtins.cc
@@ -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"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698