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

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

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dcheng's comment addressed Created 6 years, 6 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
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.cpp ('k') | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/appcache/ApplicationCacheHost.cpp
diff --git a/Source/core/loader/appcache/ApplicationCacheHost.cpp b/Source/core/loader/appcache/ApplicationCacheHost.cpp
index 669eb54d5f253ddc127069658f1a9e1e28eb9781..610649c1dd921afde716b7dbe8bc2704dc692c2b 100644
--- a/Source/core/loader/appcache/ApplicationCacheHost.cpp
+++ b/Source/core/loader/appcache/ApplicationCacheHost.cpp
@@ -88,12 +88,12 @@ void ApplicationCacheHost::willStartLoadingMainResource(ResourceRequest& request
WrappedResourceRequest wrapped(request);
const WebApplicationCacheHost* spawningHost = 0;
- LocalFrame* spawningFrame = frame.tree().parent();
- if (!spawningFrame)
+ Frame* spawningFrame = frame.tree().parent();
+ if (!spawningFrame || !spawningFrame->isLocalFrame())
spawningFrame = frame.loader().opener();
- if (!spawningFrame)
+ if (!spawningFrame || !spawningFrame->isLocalFrame())
spawningFrame = &frame;
- if (DocumentLoader* spawningDocLoader = spawningFrame->loader().documentLoader())
+ if (DocumentLoader* spawningDocLoader = toLocalFrame(spawningFrame)->loader().documentLoader())
spawningHost = spawningDocLoader->applicationCacheHost() ? spawningDocLoader->applicationCacheHost()->m_host.get() : 0;
m_host->willStartMainResourceRequest(wrapped, spawningHost);
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.cpp ('k') | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698