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

Issue 1666002: Add ResourceRequest target types for worker and shared workers.... (Closed)

Created:
10 years, 8 months ago by michaeln
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam+cc_chromium.org, ben+cc_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Ground work for making appcaches work in workers. Add ResourceRequest target types for worker and shared worker resources. This is the first patch of a two-sided change that involves WebKit API changes which haven't been made yet. BUG=39368 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=45643

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -2 lines) Patch
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/resource_type.h View 1 2 chunks +8 lines, -1 line 2 comments Download
M webkit/glue/weburlloader_impl.cc View 1 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
michaeln
Please take a look
10 years, 8 months ago (2010-04-24 02:00:56 UTC) #1
Andrew T Wilson (Slow)
LGTM http://codereview.chromium.org/1666002/diff/5001/6002 File webkit/glue/resource_type.h (right): http://codereview.chromium.org/1666002/diff/5001/6002#newcode23 webkit/glue/resource_type.h:23: SHARED_WORKER, // the main resource of a shared ...
10 years, 8 months ago (2010-04-25 17:13:15 UTC) #2
michaeln
10 years, 8 months ago (2010-04-26 21:51:53 UTC) #3
http://codereview.chromium.org/1666002/diff/5001/6002
File webkit/glue/resource_type.h (right):

http://codereview.chromium.org/1666002/diff/5001/6002#newcode23
webkit/glue/resource_type.h:23: SHARED_WORKER,   // the main resource of a
shared worker.
On 2010/04/25 17:13:15, Andrew T Wilson wrote:
> When workers perform XHR or load scripts like importScripts() I'm guessing
these
> use SUB_RESOURCE type, then?

I think right now all resources loaded by workers get tagged as SUB_RESOURCEs
becauses there is no thread marshaling for the 'type' data member. When I do the
webkit/webcore patch we'll have a choice about how to tag those reource
requests.

The most accurate 'type' for importScripts() seems like the SCRIPT_RESOURCE
type. Not posted for review yet but here's a preview of the webcore changes.
http://codereview.chromium.org/1521038/show


> So the only time WORKER/SHARED_WORKER is used is
> when loading the initial script resource via the Worker()/SharedWorker()
> constructors? These would go away if/when we ever move script loading to the
> worker, right?

Probably makes sense to have those 'types' regardless of how/where the request
for those resources are made. If the callsite to load the main resource for a
worker moved to the worker process itself (not gonna happen any time soon i
think), we'd use the appropriate type at the new callsite.

Powered by Google App Engine
This is Rietveld 408576698