Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
| index b6358692fa2b5d1f3b5337391baf1b337f8ae388..bdb1a4454bb7451f94868b3a903f3a1dd982460a 100644 |
| --- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
| @@ -71,6 +71,7 @@ |
| #include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h" |
| #include "public/web/WebDevToolsAgent.h" |
| #include "public/web/WebFrame.h" |
| +#include "public/web/WebFrameWidget.h" |
| #include "public/web/WebSettings.h" |
| #include "public/web/WebView.h" |
| #include "public/web/WebWorkerContentSettingsClientProxy.h" |
| @@ -173,6 +174,16 @@ void WebSharedWorkerImpl::LoadShadowPage() { |
| SubstituteData(buffer, "text/html", "UTF-8", KURL()))); |
| } |
| +void WebSharedWorkerImpl::FrameDetached(WebLocalFrame* frame, DetachType type) { |
| + if (type == DetachType::kRemove && frame->Parent()) |
|
kinuko
2017/05/15 06:27:16
Can we also just DCHECK here as we do in WebEmbedd
|
| + frame->Parent()->RemoveChild(frame); |
| + |
| + if (frame->FrameWidget()) |
| + frame->FrameWidget()->Close(); |
| + |
| + frame->Close(); |
| +} |
| + |
| void WebSharedWorkerImpl::DidFinishDocumentLoad() { |
| DCHECK(IsMainThread()); |
| DCHECK(!loading_document_); |