Fix --expose-debug-as with number as argument.
R=jkummerow@chromium.org BUG=405491 LOG=N Review URL: https://codereview.chromium.org/468803004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
5832ab8501
commit
f7947b8ec4
@ -2204,6 +2204,8 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) {
|
||||
debug_context->set_security_token(native_context->security_token());
|
||||
Handle<String> debug_string =
|
||||
factory->InternalizeUtf8String(FLAG_expose_debug_as);
|
||||
uint32_t index;
|
||||
if (debug_string->AsArrayIndex(&index)) return true;
|
||||
Handle<Object> global_proxy(debug_context->global_proxy(), isolate);
|
||||
JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM);
|
||||
}
|
||||
|
5
test/mjsunit/regress/regress-crbug-405491.js
Normal file
5
test/mjsunit/regress/regress-crbug-405491.js
Normal file
@ -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-debug-as 1
|
Loading…
Reference in New Issue
Block a user