Index: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp |
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp |
index c5231f3773fa64d14dffbbc95a5f4dbf01dd43f0..f604ff92ed78ab8d0d5b621533f0c8655ade7d05 100644 |
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp |
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp |
@@ -112,6 +112,7 @@ void MainThreadDebugger::contextCreated(ScriptState* scriptState, LocalFrame* fr |
ASSERT(isMainThread()); |
v8::HandleScope handles(scriptState->isolate()); |
DOMWrapperWorld& world = scriptState->world(); |
+ DLOG(WARNING) << toDOMWindow(scriptState->isolate()->GetCallingContext()); |
debugger()->contextCreated(V8ContextInfo(scriptState->context(), contextGroupId(frame), world.isMainWorld(), origin ? origin->toRawString() : "", world.isIsolatedWorld() ? world.isolatedWorldHumanReadableName() : "", IdentifiersFactory::frameId(frame), scriptState->getExecutionContext()->isDocument())); |
} |
@@ -194,7 +195,14 @@ bool MainThreadDebugger::callingContextCanAccessContext(v8::Local<v8::Context> c |
if (executionContext->isMainThreadWorkletGlobalScope()) { |
MainThreadWorkletGlobalScope* globalScope = toMainThreadWorkletGlobalScope(executionContext); |
- return globalScope && BindingSecurity::shouldAllowAccessTo(m_isolate, toLocalDOMWindow(toDOMWindow(calling)), globalScope, DoNotReportSecurityError); |
+ DLOG(WARNING) << toLocalDOMWindow(toDOMWindow(calling)); |
+ DLOG(WARNING) << toLocalDOMWindow(toDOMWindow(target)); |
+ if (globalScope) { |
dgozman
2016/06/24 22:03:15
This code only runs if |target| is a worklet. You
Gleb Lanbin
2016/06/25 00:17:26
not sure if it helps. In my case when I stop insid
dgozman
2016/06/27 21:16:41
Take a look at how BindingSecurity::shouldAllowAcc
|
+ bool isAllowedToWorklet = BindingSecurity::shouldAllowAccessTo(m_isolate, toLocalDOMWindow(toDOMWindow(calling)), globalScope, DoNotReportSecurityError); |
+ bool isAllowedFromWorklet = BindingSecurity::shouldAllowAccessTo(m_isolate, toLocalDOMWindow(toDOMWindow(target)), globalScope, DoNotReportSecurityError); |
+ return isAllowedToWorklet || isAllowedFromWorklet; |
+ } |
+ return false; |
} |
DOMWindow* window = toDOMWindow(target); |