Revision: 23700
Author:   [email protected]
Date:     Thu Sep  4 15:05:06 2014 UTC
Log:      Ignore numbers as values of --expose-natives-as flag.

[email protected]
BUG=408036
LOG=N

Review URL: https://codereview.chromium.org/534943004
https://code.google.com/p/v8/source/detail?r=23700

Added:
 /branches/bleeding_edge/test/mjsunit/regress/regress-408036.js
Modified:
 /branches/bleeding_edge/src/bootstrapper.cc

=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-408036.js Thu Sep 4 15:05:06 2014 UTC
@@ -0,0 +1,5 @@
+// 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
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Thu Sep  4 12:28:13 2014 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Thu Sep  4 15:05:06 2014 UTC
@@ -2213,6 +2213,8 @@
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);
   }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to