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

Unified Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 306853002: Replace Context::Scope with ScriptState::Scope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
Index: Source/core/inspector/InspectorOverlay.cpp
diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
index 401864ad68f31a5e2bbcf62db5f630d28cc52c53..ea36fd4d87d9fc70f9ebad3e2801845292415420 100644
--- a/Source/core/inspector/InspectorOverlay.cpp
+++ b/Source/core/inspector/InspectorOverlay.cpp
@@ -713,11 +713,10 @@ Page* InspectorOverlay::overlayPage()
RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), ForceSynchronousLoad)));
v8::Isolate* isolate = toIsolate(frame.get());
- v8::HandleScope handleScope(isolate);
- v8::Handle<v8::Context> frameContext = toV8Context(frame.get(), DOMWrapperWorld::mainWorld());
- ASSERT(!frameContext.IsEmpty());
- v8::Context::Scope contextScope(frameContext);
- v8::Handle<v8::Object> global = frameContext->Global();
+ ScriptState* scriptState = ScriptState::forMainWorld(frame.get());
+ ASSERT(!scriptState->contextIsEmpty());
+ ScriptState::Scope scope(scriptState);
+ v8::Handle<v8::Object> global = scriptState->context()->Global();
v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, isolate);
global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overlayHostObj);
« no previous file with comments | « Source/bindings/v8/custom/V8InjectedScriptManager.cpp ('k') | Source/core/testing/v8/WebCoreTestSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698