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

Unified Diff: Source/web/InspectorFrontendClientImpl.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
« no previous file with comments | « Source/core/testing/v8/WebCoreTestSupport.cpp ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/InspectorFrontendClientImpl.cpp
diff --git a/Source/web/InspectorFrontendClientImpl.cpp b/Source/web/InspectorFrontendClientImpl.cpp
index 715fa9ac5351f0b0172fe4de4066e6f4f98ece35..6203bb51ef105e9f86a2571ed8ee62537b91c17e 100644
--- a/Source/web/InspectorFrontendClientImpl.cpp
+++ b/Source/web/InspectorFrontendClientImpl.cpp
@@ -62,15 +62,15 @@ InspectorFrontendClientImpl::~InspectorFrontendClientImpl()
void InspectorFrontendClientImpl::windowObjectCleared()
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope handleScope(isolate);
- v8::Handle<v8::Context> frameContext = m_frontendPage->mainFrame() ? toV8Context(m_frontendPage->mainFrame(), DOMWrapperWorld::mainWorld()) : v8::Local<v8::Context>();
- v8::Context::Scope contextScope(frameContext);
+ ASSERT(m_frontendPage->mainFrame());
+ ScriptState* scriptState = ScriptState::forMainWorld(m_frontendPage->mainFrame());
+ ScriptState::Scope scope(scriptState);
if (m_frontendHost)
m_frontendHost->disconnectClient();
m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage);
- v8::Handle<v8::Object> global = frameContext->Global();
- v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get(), global, frameContext->GetIsolate());
+ v8::Handle<v8::Object> global = scriptState->context()->Global();
+ v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get(), global, scriptState->isolate());
global->Set(v8::String::NewFromUtf8(isolate, "InspectorFrontendHost"), frontendHostObj);
ScriptController* scriptController = m_frontendPage->mainFrame() ? &m_frontendPage->mainFrame()->script() : 0;
« no previous file with comments | « Source/core/testing/v8/WebCoreTestSupport.cpp ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698