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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.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/InjectedScript.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index ec1828a24daa069536b54b7d3d653779ad704e78..9a23ea68e53e02517f73c625868d4a0d4eabf40a 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -273,8 +273,8 @@ void InjectedScript::setCustomObjectFormatterEnabled(bool enabled)
bool InjectedScript::canAccessInspectedWindow() const
{
- v8::Local<v8::Context> callingContext = m_context->isolate()->GetCallingContext();
- if (callingContext.IsEmpty())
+ v8::Local<v8::Context> callingContext;
haraken 2016/06/07 14:07:30 callingContext => debuggerContext ?
+ if (!v8::Debug::GetDebuggedContext(m_context->isolate()).ToLocal(&callingContext))
dgozman 2016/06/09 08:53:45 Note that GetDebuggedContext says "while in debug
return true;
return m_context->debugger()->client()->callingContextCanAccessContext(callingContext, m_context->context());
}

Powered by Google App Engine
This is Rietveld 408576698