Closed
Bug 1269162
Opened 9 years ago
Closed 9 years ago
Remove separate worker binding for XMLHttpRequest and friends
Categories
(Core :: DOM: Workers, defect)
Core
DOM: Workers
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: khuey, Assigned: baku)
References
Details
(Whiteboard: btpp-backlog)
Attachments
(6 files, 2 obsolete files)
31.48 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
8.62 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
90.19 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
31.12 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
16.92 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
149.40 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
This likely requires introducing an abstract base class that can be shared between the main thread and worker thread implementations.
Updated•9 years ago
|
Whiteboard: btpp-backlog
Assignee | ||
Comment 1•9 years ago
|
||
This is the last pure worker binding. All the others have been removed or they have a patch ready to be reviewed.
I think it's time to think about how/when rewrite XHR from scratch.
Assignee | ||
Comment 2•9 years ago
|
||
I did this task in 6 patches. The first patch is about renaming dom/workers/XMLHttpRequest.* to XMLHttpRequestWorker. This will be useful in the next patches.
Assignee: nobody → amarchesini
Attachment #8763700 -
Flags: review?(bugs)
Assignee | ||
Comment 3•9 years ago
|
||
Also this second patch is just about renaming things.
Attachment #8763701 -
Flags: review?(bugs)
Assignee | ||
Comment 4•9 years ago
|
||
Third step is moving everything in dom/xhr
Attachment #8763702 -
Flags: review?(bugs)
Assignee | ||
Comment 5•9 years ago
|
||
Separate files for XMLHttpRequestEventTarget
Attachment #8763703 -
Flags: review?(bugs)
Assignee | ||
Comment 6•9 years ago
|
||
Unify XMLHttpRequestUpload in 1 single implementation.
Attachment #8763705 -
Flags: review?(bugs)
Assignee | ||
Comment 7•9 years ago
|
||
This last step puts everything together. We have 3 classes in total for XMLHttpRequest:
1. XMLHttpRequest - WebIDL class with virtual methods.
2. XMLHttpRequestWorker - Worker implementation
3. XMLHttpRequestMainThread - Main-Thread implementation
Attachment #8763706 -
Flags: review?(bugs)
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8763706 -
Attachment is obsolete: true
Attachment #8763706 -
Flags: review?(bugs)
Attachment #8763773 -
Flags: review?(bugs)
Comment 9•9 years ago
|
||
Comment on attachment 8763700 [details] [diff] [review]
part 1 - XMLHttpRequestWorker
> 'XMLHttpRequest': [
> {
> 'nativeType': 'nsXMLHttpRequest',
> 'implicitJSContext': [ 'send'],
> },
> {
>+ 'nativeType': 'mozilla::dom::workers::XMLHttpRequestWorker',
>+ 'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestWorker.h',
I'm pretty sure the headerFile is wrong, pointing to some non-existing file.
Does this actually compile? But since the rest of the patch is just renaming, r+, but fix this.
Attachment #8763700 -
Flags: review?(bugs) → review+
Updated•9 years ago
|
Attachment #8763701 -
Flags: review?(bugs) → review+
Updated•9 years ago
|
Attachment #8763703 -
Flags: review?(bugs) → review+
Comment 10•9 years ago
|
||
Comment on attachment 8763705 [details] [diff] [review]
part 5 - XMLHttpRequestUpload
>+private:
>+ virtual ~XMLHttpRequestUpload()
>+ {}
>+
>+ RefPtr<workers::XMLHttpRequestWorker> mXHR;
Why do we need this? I see it is copied from worker implementation, but rather annoying to add to this generic implementation.
Please add a comment.
Attachment #8763705 -
Flags: review?(bugs) → review+
Comment 11•9 years ago
|
||
Comment on attachment 8763702 [details] [diff] [review]
part 3 - dom/xhr
This is of course totally unrelated patch, so could (or should) have been done in a separate bug.
But I can see doing this here helps with testing.
I tried to check that we aren't losing any tests. Hopefully I didn't miss anything.
Attachment #8763702 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 12•9 years ago
|
||
> >+ 'nativeType': 'mozilla::dom::workers::XMLHttpRequestWorker',
> >+ 'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestWorker.h',
This is correct. in dom/workers/moz.build we have:
EXPORTS.mozilla.dom.workers.bindings += [
... XMLHttpRequestWorker.h
Assignee | ||
Comment 13•9 years ago
|
||
The previous version was breaking a test. The issue was about XMLHttpRequestMainThread::SetMozBackgroundRequest: for WebIDL (main-thread) it should not throw errors, for Worker and XPIDL it should.
Attachment #8763773 -
Attachment is obsolete: true
Attachment #8763773 -
Flags: review?(bugs)
Attachment #8764846 -
Flags: review?(bugs)
Updated•9 years ago
|
Attachment #8764846 -
Flags: review?(bugs) → review+
Comment 14•9 years ago
|
||
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e12af97993d
part 1 - Move XHR in workers to XMLHttpRequestWorker, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/c01653e7ad7c
part 2 - Move XHRUpload in workers to XMLHttpRequestUploadWorker, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/55a63a62c0dd
part 3 - Move XHR code into dom/xhr, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/e03db893b8da
part 4 - Move XMLHttpRequestEventTarget in separate files, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/ddb3b5ac04af
part 5 - Merge XMLHttpRequestUploadWorker and XMLHttpRequestUpload, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/155012d3d373
part 6 - Merge XMLHttpRequestWorker and XMLHttpRequestMainThread, r=smaug
Comment 15•9 years ago
|
||
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7876627840cb
part 7 - A merge error fixed, r=me
Comment 16•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1e12af97993d
https://hg.mozilla.org/mozilla-central/rev/c01653e7ad7c
https://hg.mozilla.org/mozilla-central/rev/55a63a62c0dd
https://hg.mozilla.org/mozilla-central/rev/e03db893b8da
https://hg.mozilla.org/mozilla-central/rev/ddb3b5ac04af
https://hg.mozilla.org/mozilla-central/rev/155012d3d373
https://hg.mozilla.org/mozilla-central/rev/7876627840cb
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•