aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/fetch.rs
Commit message (Collapse)AuthorAgeFilesLines
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-1/+2
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy fixes regarding clone_from (#32482)Peter Mikola2024-06-121-1/+1
|
* Fixed some clippy warnings by replacing 'match' with 'if' (#32007)komuhangi2024-04-071-4/+3
|
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-1/+1
|
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-1/+1
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-1/+1
| | | | | * Update Codegen.py to emit Foo_Binding instead of FooBinding * s/FooBinding/Foo_Binding/g
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-16/+18
| | | | | * strict imports formatting * Reformat all imports
* constellation: crash to a new “sad tab” error page (#30290)Delan Azabani2023-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | * constellation: crash to a new “sad tab” page * check in resources/crash.html * use a separate enum variant instead of keying on reason * fmt + tidy * rename Resource::Crash to Resource::CrashHTML * clean up crash page and add details (reason + backtrace) * avoid repeating crash errors in script::script_thread warn log * make new LoadData init more idiomatic * clarify comments and new fields * fix doc comment style
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+1
|
* Remove global argument from Promise::new_in_current_realm.Josh Matthews2023-05-201-1/+1
|
* add response tainting to request builderIver Småge men bærbar2023-05-181-0/+1
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-3/+4
|
* integrate readablestream with fetch and blobGregory Terzian2020-06-041-8/+8
|
* check http_state in determine_request_referrerAlexandrov Sergey2020-05-191-0/+2
|
* Properly set the url on the Response object when the response is an ↵Bastien Orivel2020-05-061-4/+4
| | | | opaqueredirect
* Fix the redirected attribute for ResponseBastien Orivel2020-05-051-0/+1
|
* let integrity_metadata survive IPC sendingPatrick Shaughnessy2020-01-301-1/+1
|
* rename compartment to realmKunal Mohan2020-01-241-3/+3
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-2/+2
|
* Add StreamConsumer wrapper and methods to responseRidhim Rastogi2019-12-031-0/+1
|
* Add simple implementation of content-security-policy on scripts / stylesMichael Howell2019-10-161-0/+2
| | | | | | | | This needs a lot more hooks before it'll actually be a good implementation, but for a start it can help get some feedback on if this is the right way to go about it. Part of servo/servo#4577
* Auto merge of #24379 - PeaceRebel:dom_response_check_opaque_filter, r=jdmbors-servo2019-10-111-8/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dom response check opaque filter <!-- Please describe your changes on the following line: --> Added setters for url_list, status, and body in `Response`. Response members are set for [Network Error](https://fetch.spec.whatwg.org/#concept-network-error), [Opaque](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) and [Opaque-redirect](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect) responses. --- <!-- 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 #24372 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- 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/24379) <!-- Reviewable:end -->
| * Set DOM response members as per the spec for opaque, opaque-redirect and ↵peacerebel2019-10-111-8/+10
| | | | | | | | | | | | error responses Signed-off-by: Bipin <peacerebel@protonmail.com>
* | Support CORS attributes for image elements.Josh Matthews2019-10-041-1/+30
|/
* Create a helper API for entering a DOM object's compartmentKamil Niski2019-06-291-9/+3
| | | | | | Revert some unnecessary changes Fix fmt errors
* Add an inCompartments config for bindingsBastien Orivel2019-05-241-3/+3
|
* Auto merge of #23351 - CYBAI:fix-modes, r=noxbors-servo2019-05-161-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix modes for fetching classic worker script and introduce parser metadata for request While reading [the spec](https://html.spec.whatwg.org/multipage/#fetch-a-classic-worker-script) for `fetch a classic worker script`, I found the `mode` and `credential-mode` are opposite to the spec. So, the first commit will fix it. Also, I found there's a `parser metadata` for `request` so I tried to introduce it in this PR as well. For WPT, I found there's a `/workers/constructors/Worker/same-origin.html` which was disabled in #3180. We pass most of the tests now. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) - [x] There are tests for these changes <!-- 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/23351) <!-- Reviewable:end -->
| * Introduce parser metadata for requestCYBAI2019-05-111-0/+1
| |
* | Update to SpiderMonkey 66.Josh Matthews2019-05-101-4/+4
|/
* Create resource timing entry for sync network fetchpylbrecht2019-05-081-1/+44
|
* 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
| |