Index: webkit/appcache/web_application_cache_host_impl.cc |
=================================================================== |
--- webkit/appcache/web_application_cache_host_impl.cc (revision 78411) |
+++ webkit/appcache/web_application_cache_host_impl.cc (working copy) |
@@ -156,7 +156,7 @@ |
} |
void WebApplicationCacheHostImpl::willStartMainResourceRequest( |
- WebURLRequest& request) { |
+ WebURLRequest& request, const WebFrame* frame) { |
request.setAppCacheHostID(host_id_); |
original_main_resource_url_ = ClearUrlRef(request.url()); |
@@ -164,6 +164,13 @@ |
std::string method = request.httpMethod().utf8(); |
is_get_method_ = (method == kHttpGETMethod); |
DCHECK(method == StringToUpperASCII(method)); |
+ |
+ if (frame) { |
+ if (WebApplicationCacheHostImpl* parent = FromFrame(frame->parent())) |
+ backend_->SetSpawningHostId(host_id_, parent->host_id()); |
+ else if (WebApplicationCacheHostImpl* opener = FromFrame(frame->opener())) |
+ backend_->SetSpawningHostId(host_id_, opener->host_id()); |
+ } |
} |
void WebApplicationCacheHostImpl::willStartSubResourceRequest( |