Commit 1afada8d authored by jarin@chromium.org's avatar jarin@chromium.org

Ignore numbers as values of --expose-natives-as flag.

R=yangguo@chromium.org
BUG=408036
LOG=N

Review URL: https://codereview.chromium.org/534943004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b3b4e3ee
......@@ -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);
}
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-natives-as 1
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