Commit 7425b1f2 authored by yangguo's avatar yangguo Committed by Commit bot

Revert of [debugger] temporarily re-implement --expose-debug-as. (patchset #1...

Revert of [debugger] temporarily re-implement --expose-debug-as. (patchset #1 id:1 of https://codereview.chromium.org/2636423002/ )

Reason for revert:
Flag is being removed for 5.8.

Original issue's description:
> [debugger] temporarily re-implement --expose-debug-as.
>
> This is done out of courtesy for Node.js and will be
> removed as soon as we branch for version 5.8.
>
> R=jgruber@chromium.org
>
> Review-Url: https://codereview.chromium.org/2636423002
> Cr-Commit-Position: refs/heads/master@{#42437}
> Committed: https://chromium.googlesource.com/v8/v8/+/cbb7145221dad688ebe86f90bfa4fdd63ea1263e

TBR=jgruber@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2641283002
Cr-Commit-Position: refs/heads/master@{#42546}
parent ea925431
......@@ -4222,26 +4222,6 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) {
InstallFFIMap(isolate);
// Expose the debug global object in global if a name for it is specified.
if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) {
// If loading fails we just bail out without installing the
// debugger but without tanking the whole context.
Debug* debug = isolate->debug();
if (!debug->Load()) return true;
Handle<Context> debug_context = debug->debug_context();
// Set the security token for the debugger context to the same as
// the shell native context to allow calling between these (otherwise
// exposing debug global object doesn't make much sense).
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(handle(native_context->global_proxy()), debug_string,
global_proxy, DONT_ENUM);
}
return true;
}
......
......@@ -615,7 +615,6 @@ DEFINE_BOOL(script_streaming, true, "enable parsing on background")
// bootstrapper.cc
DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object")
DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object")
DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension")
DEFINE_BOOL(expose_gc, false, "expose gc extension")
DEFINE_STRING(expose_gc_as, NULL,
......
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