Bug 28342 - SharedWorkers need to support loading
Summary: SharedWorkers need to support loading
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Andrew Wilson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-15 13:22 PDT by Andrew Wilson
Modified: 2009-08-18 17:22 PDT (History)
0 users

See Also:


Attachments
proposed patch (60.64 KB, patch)
2009-08-15 13:37 PDT, Andrew Wilson
levin: review+
levin: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Wilson 2009-08-15 13:22:48 PDT
We need to proxy network requests (XHR, importScripts) to an active document.
Comment 1 Andrew Wilson 2009-08-15 13:37:24 PDT
Created attachment 34904 [details]
proposed patch

I moved lots of test code around so it could be shared between dedicated and shared workers. The code itself didn't really change other than indentation/location.
Comment 2 Eric Seidel (no email) 2009-08-17 17:18:12 PDT
Comment on attachment 34904 [details]
proposed patch

This is pretty big for a single change.  Maybe we could re-factor the layout tests first in a separate change?
Comment 3 Andrew Wilson 2009-08-17 17:25:02 PDT
(In reply to comment #2)
> (From update of attachment 34904 [details])
> This is pretty big for a single change.  Maybe we could re-factor the layout
> tests first in a separate change?

I could do this, but given that this entire patch consists of only 24 lines of code (two small functions) in a single file, is it really improving reviewability to break that out?

The patch looks big, but 90% of the change is just moving test code from a .html file into a .js file so it can be shared, with no code changes.
Comment 4 David Levin 2009-08-18 15:01:13 PDT
Comment on attachment 34904 [details]
proposed patch


> diff --git a/LayoutTests/http/tests/workers/resources/worker-importScripts.js b/LayoutTests/http/tests/workers/resources/worker-importScripts.js
> +if (self.postMessage)
> +    runTests();
> + else
> +     onconnect = handleConnect;

Indented too far.


> diff --git a/LayoutTests/http/tests/xmlhttprequest/workers/resources/close-test.js b/LayoutTests/http/tests/xmlhttprequest/workers/resources/close-test.js
> +   function done()

I realize this is just a copy but it would be nice to fix the indent here.
Comment 5 Andrew Wilson 2009-08-18 17:22:15 PDT
Committed as r47467.