Chromium Code Reviews| 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); |
| } |
| } |