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

Unified Diff: Source/web/WebDevToolsFrontendImpl.cpp

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 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/web/WebBindings.cpp ('k') | Source/web/WebTestingSupport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDevToolsFrontendImpl.cpp
diff --git a/Source/web/WebDevToolsFrontendImpl.cpp b/Source/web/WebDevToolsFrontendImpl.cpp
index 3e06f914e32ef9ff1e86b910c12bc87281e1a761..a27bfba3e7a3a1d015d1892f1ce52c59b910aa84 100644
--- a/Source/web/WebDevToolsFrontendImpl.cpp
+++ b/Source/web/WebDevToolsFrontendImpl.cpp
@@ -146,9 +146,11 @@ void WebDevToolsFrontendImpl::maybeDispatch(WebCore::Timer<WebDevToolsFrontendIm
void WebDevToolsFrontendImpl::doDispatchOnInspectorFrontend(const WebString& message)
{
WebFrameImpl* frame = m_webViewImpl->mainFrameImpl();
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope scope;
- v8::Handle<v8::Context> frameContext = frame->frame() ? frame->frame()->script()->currentWorldContext() : v8::Local<v8::Context>();
+ if (!frame->frame())
+ return;
+ v8::Isolate* isolate = frame->frame()->script()->isolate();
+ v8::HandleScope scope(isolate);
+ v8::Handle<v8::Context> frameContext = frame->frame()->script()->currentWorldContext();
v8::Context::Scope contextScope(frameContext);
v8::Handle<v8::Value> inspectorFrontendApiValue = frameContext->Global()->Get(v8::String::New("InspectorFrontendAPI"));
if (!inspectorFrontendApiValue->IsObject())
« no previous file with comments | « Source/web/WebBindings.cpp ('k') | Source/web/WebTestingSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698