Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upClean up XHR API #9383
Clean up XHR API #9383
Conversation
highfive
commented
Jan 20, 2016
| } | ||
| }, | ||
| // Step 1 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c1c49dc
to
5932923
|
How about a |
| @@ -295,6 +295,9 @@ impl XMLHttpRequestMethods for XMLHttpRequest { | |||
|
|
|||
| // https://xhr.spec.whatwg.org/#the-open()-method | |||
| fn Open(&self, method: ByteString, url: USVString) -> ErrorResult { | |||
| // Step 1 | |||
| if !self.global().r().as_window().Document().r().is_fully_active() { return Err(Error::InvalidState); } | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
KiChjang
Jan 20, 2016
Author
Member
If settings object's responsible document is not fully active, throw an InvalidStateError exception.
Hmm... how would we get a responsible document from a Worker, in that case?
This comment has been minimized.
This comment has been minimized.
jdm
Jan 20, 2016
Member
That concept is not implemented yet. We also will not be able to interact with the Document on the worker thread; we would need to block on a runnable sent to the document's associated script thread.
aacaf70
to
1771bb4
|
@Ms2ger Done. |
|
r? @Ms2ger |
|
Looking at this again, |
|
Done that as well. |
|
You made me read through most of the XHR spec, so now you get to file issues for all the bugs I found :) -S-awaiting-review +S-needs-code-changes Reviewed 1 of 1 files at r3. components/script/dom/xmlhttprequest.rs, line 197 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 308 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 310 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 329 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 347 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 388 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 416 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 436 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 448 [r3] (raw file): Also, wrap into three lines. components/script/dom/xmlhttprequest.rs, line 451 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 483 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 523 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 698 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 702 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 724 [r3] (raw file): Also not sure of the point of doing this in the components/script/dom/xmlhttprequest.rs, line 755 [r3] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 1 files reviewed at latest revision, 17 unresolved discussions. components/script/dom/xmlhttprequest.rs, line 308 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 416 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 436 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 451 [r3] (raw file): components/script/dom/xmlhttprequest.rs, line 755 [r3] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 1 files reviewed at latest revision, 17 unresolved discussions. components/script/dom/xmlhttprequest.rs, line 523 [r3] (raw file): Comments from the review on Reviewable.io |
|
|
Clean up XHR API I've also added annotations about the steps that we're performing within each method. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9383) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
|
|
|
|
|
@bors-servo retry |
Clean up XHR API I've also added annotations about the steps that we're performing within each method. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9383) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Clean up XHR API I've also added annotations about the steps that we're performing within each method. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9383) <!-- Reviewable:end -->
|
|
KiChjang commentedJan 20, 2016
I've also added annotations about the steps that we're performing within each method.