aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/fetch.rs
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #23253 - BartGitHub:refactor-promise-compartment, r=jdmbors-servo2019-04-291-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor promise compartment <!-- Please describe your changes on the following line: --> This PR adds a mechanism to verify that certain code is executed inside a ```JSAutoCompartment```, and applies this to the ```Promise::new_in_current_compartment``` constructor. r? @jdm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23167 <!-- Either: --> - [x] These changes do not require tests because they do not change existing functionality. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23253) <!-- Reviewable:end -->
| * Pass InCompartment by valueAron Zwaan2019-04-251-1/+1
| |
| * Add proof parameter to Promise::new_in_current_compartmentAron Zwaan2019-04-241-2/+3
| |
* | set referrer in window.load_urlRussell Cousineau2019-04-191-5/+1
|/ | | | | | | | - this conforms to follow-hyperlinks spec step 13 - this conforms to window-open spec step 14.3 - replace uses of `referrer_url` with `referrer` - in Request class, change "no-referrer" to "" - set websocket fetch referrer to "no-referrer"
* Implementing the builder pattern for RequestInitLucas Fantacuci2019-04-101-5/+7
|
* Rename Promise::new to Promise::new_in_current_compartmentAron Zwaan2019-04-031-1/+2
|
* Remove `foreign` service-workers modeCYBAI2018-12-231-1/+1
|
* refactored performance timing to align with updated specddh2018-11-201-2/+37
| | | | | | | | | | | | refactoring with ResourceFetchMetadata implemented deprecated window.timing functionality created ResourceTimingListener trait fixed w3c links in navigation timing updated include.ini to run resource timing tests on ci
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-4/+4
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-18/+18
|
* Format script componentchansuke2018-09-191-30/+52
|
* introduce "per task source" ignoring of tasksGregory Terzian2018-07-101-1/+2
|
* Add FetchCanceller RAII handleManish Goregaokar2017-11-211-0/+52
|
* Auto merge of #19274 - Manishearth:xhr-cancel, r=jdmbors-servo2017-11-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Fetch cancellation This PR implements cancellation for fetch, and uses it for XHR. This means that fetch clients can now send a message to the fetch task asking for the network request to be aborted. Previously, clients like XHR had abort functionality but would implement it by simply ignoring future messages from the network task; and would not actually cancel the network fetch. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19274) <!-- Reviewable:end -->
| * Fetch cancellation: Add cancel_chan to FetchContextManish Goregaokar2017-11-171-1/+1
| |
* | pass cache_mode from request to request initGregory Terzian2017-11-151-0/+1
|/
* Merge functionality of WebsocketConnect into FetchKeith Yeung2017-10-241-3/+4
|
* Merge request type and destinationKeith Yeung2017-10-231-1/+0
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-2/+2
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Make Promise::reject_error soundAnthony Ramine2017-09-221-4/+2
|
* Make Promise::resolve_native actually soundAnthony Ramine2017-09-211-3/+1
| | | | | We shouldn't have to pass a raw JSContext pointer, and to enter the promise's context's compartment by hand.
* Rename Runnable to TaskAnthony Ramine2017-09-161-1/+1
| | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* Change RequestInit origin type to ImmutableOriginFausto Núñez Alberro2017-07-161-4/+1
|
* Introduce service-worker modeKeith Yeung2017-06-221-3/+10
|
* Remove all internal mutability from RequestAnthony Ramine2017-04-031-8/+7
|
* Use RootedTraceableBox for dictionaries.Ms2ger2017-02-161-1/+2
|
* Don't lose information in Fetch APIbd3392017-01-091-4/+15
| | | | Also update test expectations.
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-1/+1
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-2/+2
|
* Properly implement TaskSource for NetworkingTaskSourceKeith Yeung2016-11-111-2/+2
|
* Implement the constructor for EventSourceKeith Yeung2016-11-111-2/+3
|
* Add redirect_mode to RequestInitRaphael Nestler2016-11-081-0/+1
|
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-2/+2
|
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-3/+3
|
* Remove Reflectable::globalAnthony Ramine2016-10-061-2/+2
|
* Make Fetch take a &GlobalScopeAnthony Ramine2016-10-061-9/+8
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-1/+1
|
* Introduce GlobalScope::networking_task_sourceAnthony Ramine2016-10-061-1/+1
|
* Introduce GlobalScope::core_resource_threadAnthony Ramine2016-10-061-2/+2
|
* Make Promise::new take a &GlobalScopeAnthony Ramine2016-10-061-2/+3
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-1/+1
|
* Provide the fetched data to fetch() consumers.Ms2ger2016-10-061-3/+10
|
* Squash some build warnings.Ms2ger2016-10-041-2/+2
|
* Remove same-origin-data-url flag from fetch implementationJan Zerebecki2016-10-011-1/+0
| | | | | | | The spec removed it. Check the scheme instead, data is always same origin now, except for workers. This also updates the comments to make step numbers match the spec. Closes #13362
* Implement the Fetch methodJeena Lee2016-09-291-0/+172