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

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

Issue 2878933003: Makes WorkerInspectorProxy work with ExecutionContext instead of Document (Closed)
Patch Set: . Created 3 years, 7 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/core/inspector/InspectorWorkerAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp
index 0df47f1a12afa56d20da94672f37380d8ae22497..f1bb4379ed239e1d2c3208f738c40031621f76da 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp
@@ -138,8 +138,11 @@ void InspectorWorkerAgent::WorkerTerminated(WorkerInspectorProxy* proxy) {
void InspectorWorkerAgent::ConnectToAllProxies() {
for (WorkerInspectorProxy* proxy : WorkerInspectorProxy::AllProxies()) {
- if (proxy->GetDocument()->GetFrame() &&
- inspected_frames_->Contains(proxy->GetDocument()->GetFrame()))
+ // For now we assume this is document. TODO(kinuko): Fix this.
+ DCHECK(proxy->GetExecutionContext()->IsDocument());
+ Document* document = ToDocument(proxy->GetExecutionContext());
kinuko 2017/05/18 14:41:41 I turned this to use cast & back to use frames for
+ if (document->GetFrame() &&
+ inspected_frames_->Contains(document->GetFrame()))
ConnectToProxy(proxy, false);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameConsole.cpp ('k') | third_party/WebKit/Source/core/workers/WorkerInspectorProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698