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

Unified Diff: src/bootstrapper.cc

Issue 534943004: Ignore numbers as values of --expose-natives-as flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | test/mjsunit/regress/regress-408036.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 0790c9a1755c7349c67195a9fb9296cb166c4a26..38f187cbcd5dc95cc20a9c0ca61c734fcba6ad29 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2213,6 +2213,8 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) {
if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) {
Handle<String> natives =
factory->InternalizeUtf8String(FLAG_expose_natives_as);
+ uint32_t dummy_index;
+ if (natives->AsArrayIndex(&dummy_index)) return true;
JSObject::AddProperty(global, natives, handle(global->builtins()),
DONT_ENUM);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-408036.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698