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

Unified Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp

Issue 2058133002: Fix DevTools support of worklets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698