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

Unified Diff: third_party/WebKit/Source/core/loader/appcache/ApplicationCache.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/ApplicationCache.cpp
diff --git a/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp b/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp
index 00ac7f1469b1d6d4335810d1867828f0e15e1108..ed4ae6a5d9f5bc8f8826d84bbfed9fef475a6959 100644
--- a/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp
+++ b/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp
@@ -38,8 +38,7 @@
namespace blink {
-ApplicationCache::ApplicationCache(LocalFrame* frame)
- : ContextLifecycleObserver(frame->document()) {
+ApplicationCache::ApplicationCache(LocalFrame* frame) : DOMWindowClient(frame) {
ApplicationCacheHost* cacheHost = applicationCacheHost();
if (cacheHost)
cacheHost->setApplicationCache(this);
@@ -47,12 +46,7 @@ ApplicationCache::ApplicationCache(LocalFrame* frame)
DEFINE_TRACE(ApplicationCache) {
EventTargetWithInlineData::trace(visitor);
- ContextLifecycleObserver::trace(visitor);
-}
-
-void ApplicationCache::contextDestroyed() {
- if (ApplicationCacheHost* cacheHost = applicationCacheHost())
dcheng 2017/01/13 09:14:16 How come it's OK to skip this?
haraken 2017/01/13 09:18:21 cacheHost->setApplicationCache(0) was called just
- cacheHost->setApplicationCache(0);
+ DOMWindowClient::trace(visitor);
}
ApplicationCacheHost* ApplicationCache::applicationCacheHost() const {
@@ -98,9 +92,7 @@ const AtomicString& ApplicationCache::interfaceName() const {
}
ExecutionContext* ApplicationCache::getExecutionContext() const {
- if (frame())
- return frame()->document();
- return 0;
+ return frame() ? frame()->document() : nullptr;
}
const AtomicString& ApplicationCache::toEventType(

Powered by Google App Engine
This is Rietveld 408576698