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

Unified Diff: src/debug.cc

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 6 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 | « src/builtins.cc ('k') | src/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index d99e6f54970accfd5b05e1aaea2afe3b10f42e68..4e14167475d1a055c195df2511c38fe1011263ee 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -759,7 +759,7 @@ bool Debug::CompileDebuggerScript(Isolate* isolate, int index) {
Handle<Object> exception;
MaybeHandle<Object> result =
Execution::TryCall(function,
- Handle<Object>(context->global_object(), isolate),
+ handle(context->global_proxy()),
0,
NULL,
&exception);
@@ -807,7 +807,7 @@ bool Debug::Load() {
ExtensionConfiguration no_extensions;
Handle<Context> context =
isolate_->bootstrapper()->CreateEnvironment(
- Handle<Object>::null(),
+ MaybeHandle<JSGlobalProxy>(),
v8::Handle<ObjectTemplate>(),
&no_extensions);
@@ -2446,12 +2446,13 @@ void Debug::ClearMirrorCache() {
HandleScope scope(isolate_);
AssertDebugContext();
Factory* factory = isolate_->factory();
- JSObject::SetProperty(isolate_->global_object(),
+ Handle<GlobalObject> global(isolate_->global_object());
+ JSObject::SetProperty(global,
factory->NewStringFromAsciiChecked("next_handle_"),
handle(Smi::FromInt(0), isolate_),
NONE,
SLOPPY).Check();
- JSObject::SetProperty(isolate_->global_object(),
+ JSObject::SetProperty(global,
factory->NewStringFromAsciiChecked("mirror_cache_"),
factory->NewJSArray(0, FAST_ELEMENTS),
NONE,
@@ -2494,14 +2495,15 @@ MaybeHandle<Object> Debug::MakeJSObject(const char* constructor_name,
Handle<Object> argv[]) {
AssertDebugContext();
// Create the execution state object.
+ Handle<GlobalObject> global(isolate_->global_object());
Handle<Object> constructor = Object::GetProperty(
- isolate_, isolate_->global_object(), constructor_name).ToHandleChecked();
+ isolate_, global, constructor_name).ToHandleChecked();
ASSERT(constructor->IsJSFunction());
if (!constructor->IsJSFunction()) return MaybeHandle<Object>();
// We do not handle interrupts here. In particular, termination interrupts.
PostponeInterruptsScope no_interrupts(isolate_);
return Execution::TryCall(Handle<JSFunction>::cast(constructor),
- Handle<JSObject>(debug_context()->global_object()),
+ handle(debug_context()->global_proxy()),
argc,
argv);
}
@@ -2751,10 +2753,9 @@ void Debug::CallEventCallback(v8::DebugEvent event,
exec_state,
event_data,
event_listener_data_ };
+ Handle<JSReceiver> global(isolate_->global_proxy());
Execution::TryCall(Handle<JSFunction>::cast(event_listener_),
- isolate_->global_object(),
- ARRAY_SIZE(argv),
- argv);
+ global, ARRAY_SIZE(argv), argv);
}
}
« no previous file with comments | « src/builtins.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698