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

Unified Diff: third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp

Issue 2631653002: Make ApplicationCache a DOMWindowClient (Closed)
Patch Set: Created 3 years, 11 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/loader/appcache/ApplicationCacheHost.cpp
diff --git a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
index b521bd9b6d10e72c364100909d10d162c38536c1..ad3976086d82c97ba1c98609ae7c91d83028c3f5 100644
--- a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
+++ b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
@@ -260,11 +260,12 @@ void ApplicationCacheHost::dispatchDOMEvent(
const String& errorURL,
int errorStatus,
const String& errorMessage) {
- if (!m_domApplicationCache)
+ // Don't dispatch an event if the window is detached.
+ if (!m_domApplicationCache || !m_domApplicationCache->domWindow())
return;
const AtomicString& eventType = ApplicationCache::toEventType(id);
- if (eventType.isEmpty() || !m_domApplicationCache->getExecutionContext())
+ if (eventType.isEmpty())
return;
Event* event = nullptr;
if (id == kProgressEvent) {

Powered by Google App Engine
This is Rietveld 408576698