Chromium Code Reviews| 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( |