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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp

Issue 2040053003: Use GetDebuggedContext instead of GetCallingContext in v8_inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp b/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
index 5b52e015a5436383989cf30a72017f8e324ca449..047c8a008a75e253b6123227359cf7d513a9e7ac 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InspectedContext.cpp
@@ -74,8 +74,10 @@ void InspectedContext::createInjectedScript()
DCHECK(!m_injectedScript);
v8::HandleScope handles(isolate());
v8::Local<v8::Context> localContext = context();
- v8::Local<v8::Context> callingContext = isolate()->GetCallingContext();
- if (!callingContext.IsEmpty() && !m_debugger->client()->callingContextCanAccessContext(callingContext, localContext))
+ v8::Local<v8::Context> callingContext;
haraken 2016/06/07 14:07:30 Ditto.
+ if (!v8::Debug::GetDebuggedContext(isolate()).ToLocal(&callingContext))
pfeldman 2016/06/07 14:39:29 We should not need calling context here - injected
jochen (gone - plz use gerrit) 2016/06/07 14:52:13 so just delete this check?
kozy 2016/06/08 19:28:23 I'm worried here about V8DebuggerAgent::currentCal
dgozman 2016/06/09 08:53:45 I think we'd better keep it for this call: https:/
+ return;
+ if (!m_debugger->client()->callingContextCanAccessContext(callingContext, localContext))
return;
m_injectedScript = InjectedScript::create(this);
}

Powered by Google App Engine
This is Rietveld 408576698