aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #28663 - saschanaz:void-undefined, r=jdmbors-servo2022-01-16159-1144/+1162
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert Web IDL void to undefined <!-- Please describe your changes on the following line: --> Thanks to my tool https://github.com/saschanaz/gecko-webidl 🙌 Build is failing on my current VS2022+Python 3.10 environment, but the IDL tests are passing anyway, so... --- <!-- 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 #27660 <!-- 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. -->
| * tidyKagami Sascha Rosylight2022-01-054-4/+22
| |
| * Update CodegenRust.pyKagami Sascha Rosylight2022-01-051-7/+7
| |
| * Try rolling back python fixKagami Sascha Rosylight2022-01-051-1/+1
| |
| * Convert Web IDL void to undefinedKagami Sascha Rosylight2022-01-05158-1138/+1138
| | | | | | | | Fixes #27660
* | Upgrade HyperNaveen Gattu2022-01-1637-397/+474
|/
* Fix warnings.Josh Matthews2022-01-034-7/+5
|
* Update async-tungestenite.Josh Matthews2022-01-031-2/+2
|
* Auto merge of #28639 - negator:negator/async, r=jdmbors-servo2022-01-0112-349/+432
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-blocking network IO The current networking strategy uses a fixed sized thread pool to perform blocking requests on a per call basis. This is inefficient, but can be ~easily~ improved by utilizing the existing tokio runtime instead to submit async networking tasks to its executor. However, since servo is currently using an outdated version of the `hyper` http library (`0.12`) we must use the [`tokio_compat`](https://github.com/tokio-rs/tokio-compat) and [`futures_compat`](https://docs.rs/futures/0.3.1/futures/compat/index.html) libraries to integrate with the older version of [`Future` used in `hyper`](https://docs.rs/hyper/0.12.1/hyper/rt/trait.Future.html). ~**NOTE**: This PR is just proof of concept at the moment. In addition to test failures, it appears that large javascript downloads are silently failing to stream entire payloads, and occasionally getting cutoff.~ Tests are passing. --- <!-- 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 [#22813](https://github.com/servo/servo/issues/22813) (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
| * Non-blocking network IONaveen Gattu2021-12-2312-349/+432
| |
* | concept-response-clone: Ensure header guard is cloned after headersNaveen Gattu2021-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://fetch.spec.whatwg.org/#concept-response-clone If the header guard of the response to clone is `immutable`, then copying the headers to the new response will fail with `Guard is immutable` unless we ensure the guard is copied _after_ the headers. https://github.com/servo/servo/blob/8650794391729c6fee34bc2644ccbb85bd8fd58d/components/script/dom/response.rs#L331-L334 fn Append(&self, name: ByteString, value: ByteString) -> ErrorResult { // Step 1 let value = normalize_value(value); // Step 2 let (mut valid_name, valid_value) = validate_name_and_value(name, value)?; valid_name = valid_name.to_lowercase(); // Step 3 if self.guard.get() == Guard::Immutable { return Err(Error::Type("Guard is immutable".to_string())); }
* | Update rustc.Josh Matthews2021-12-022-3/+3
| |
* | Auto merge of #28636 - negator:patch-3, r=jdmbors-servo2021-12-021-5/+10
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perform non-null checks on pointers used in js stacktrace captures Need to ensure that external passed in pointers are non-null prior to using them unchecked. Seeing sporadic crashes when visiting `https:://cnn.com` and `https://www.bankofamerica.com`: ``` ... 6: __sigtramp 7: core::ptr::non_null::NonNull<T>::as_ref at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/core/src/ptr/non_null.rs:317:20 8: alloc::rc::Rc<T>::inner at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/alloc/src/rc.rs:332:18 <alloc::rc::Rc<T> as core::clone::Clone>::clone at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/alloc/src/rc.rs:1479:9 9: <servo_url::origin::MutableOrigin as core::clone::Clone>::clone at /Users/navgattu/Documents/dev-git/servo/components/url/origin.rs:92:26 10: script::dom::bindings::principals::ServoJSPrincipals::origin at /Users/navgattu/Documents/dev-git/servo/components/script/dom/bindings/principals.rs:42:9 11: script::dom::bindings::principals::subsumes at /Users/navgattu/Documents/dev-git/servo/components/script/dom/bindings/principals.rs:136:22 12: _ZN2jsL30SavedFrameSubsumedByPrincipalsEP9JSContextP12JSPrincipalsN2JS6HandleIPNS_10SavedFrameEEE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/SavedStacks.cpp:617:10 ... ``` https://github.com/rust-lang/rust/blob/d384ff79308c4eb0a3679817cd0def0147ad8612/library/core/src/ptr/non_null.rs#L181-L188 Full stacktrace: [trace.txt](https://github.com/servo/servo/files/7631210/trace.txt) <!-- Please describe your changes on the following line: --> --- <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
| * semicolonNaveen Gattu2021-12-011-1/+1
| |
| * Update principals.rsNaveen Gattu2021-12-011-0/+1
| |
| * Perform non-null checks on pointers in subsumesNaveen Gattu2021-11-301-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to ensure the passed in pointers are non-null prior to using them unchecked. Seeing sporadic crashes: ``` Stack trace for thread "Script(2,36)" 0: backtrace::backtrace::libunwind::trace at /Users/navgattu/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.63/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/navgattu/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.63/src/backtrace/mod.rs:66:5 1: <servo::backtrace::Print as core::fmt::Debug>::fmt at /Users/navgattu/Documents/dev-git/servo/ports/winit/backtrace.rs:53:13 2: core::fmt::write at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/core/src/fmt/mod.rs:1117:17 3: std::io::Write::write_fmt at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/std/src/io/mod.rs:1667:15 4: servo::backtrace::print at /Users/navgattu/Documents/dev-git/servo/ports/winit/backtrace.rs:17:5 5: servo::crash_handler::install::handler at /Users/navgattu/Documents/dev-git/servo/ports/winit/crash_handler.rs:25:21 6: __sigtramp 7: core::ptr::non_null::NonNull<T>::as_ref at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/core/src/ptr/non_null.rs:317:20 8: alloc::rc::Rc<T>::inner at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/alloc/src/rc.rs:332:18 <alloc::rc::Rc<T> as core::clone::Clone>::clone at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/alloc/src/rc.rs:1479:9 9: <servo_url::origin::MutableOrigin as core::clone::Clone>::clone at /Users/navgattu/Documents/dev-git/servo/components/url/origin.rs:92:26 10: script::dom::bindings::principals::ServoJSPrincipals::origin at /Users/navgattu/Documents/dev-git/servo/components/script/dom/bindings/principals.rs:42:9 11: script::dom::bindings::principals::subsumes at /Users/navgattu/Documents/dev-git/servo/components/script/dom/bindings/principals.rs:136:22 12: _ZN2jsL30SavedFrameSubsumedByPrincipalsEP9JSContextP12JSPrincipalsN2JS6HandleIPNS_10SavedFrameEEE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/SavedStacks.cpp:617:10 _ZN2jsL20GetFirstMatchedFrameIFbP9JSContextP12JSPrincipalsN2JS6HandleIPNS_10SavedFrameEEEEEES8_S2_S4_RT_S9_NS5_20SavedFrameSelfHostedERb at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/SavedStacks.cpp:636:9 _ZN2jsL21GetFirstSubsumedFrameEP9JSContextP12JSPrincipalsN2JS6HandleIPNS_10SavedFrameEEENS4_20SavedFrameSelfHostedERb at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/SavedStacks.cpp:660:10 13: _ZN2js16UnwrapSavedFrameEP9JSContextP12JSPrincipalsN2JS6HandleIP8JSObjectEENS4_20SavedFrameSelfHostedERb at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/SavedStacks.cpp:744:10 14: _ZN2JS16BuildStackStringEP9JSContextP12JSPrincipalsNS_6HandleIP8JSObjectEENS_13MutableHandleIP8JSStringEEmN2js11StackFormatE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/SavedStacks.cpp:1041:13 15: mozjs::rust::CapturedJSStack::as_string at /Users/navgattu/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/09edacd/src/rust.rs:1377:17 16: script::dom::webglrenderingcontext::capture_webgl_backtrace::{{closure}} at /Users/navgattu/Documents/dev-git/servo/components/script/dom/webglrenderingcontext.rs:1939:46 17: core::option::Option<T>::and_then at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/core/src/option.rs:1043:24 18: script::dom::webglrenderingcontext::capture_webgl_backtrace at /Users/navgattu/Documents/dev-git/servo/components/script/dom/webglrenderingcontext.rs:1939:27 19: script::dom::webglrenderingcontext::WebGLRenderingContext::send_command at /Users/navgattu/Documents/dev-git/servo/components/script/dom/webglrenderingcontext.rs:397:28 20: script::dom::webglrenderingcontext::WebGLRenderingContext::get_gl_extensions at /Users/navgattu/Documents/dev-git/servo/components/script/dom/webglrenderingcontext.rs:913:9 21: <script::dom::webglrenderingcontext::WebGLRenderingContext as script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::WebGLRenderingContextMethods>::GetSupportedExtensions::{{closure}} at /Users/navgattu/Documents/dev-git/servo/components/script/dom/webglrenderingcontext.rs:2330:27 22: script::dom::webgl_extensions::extensions::WebGLExtensions::init_once 23: <script::dom::webglrenderingcontext::WebGLRenderingContext as script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::WebGLRenderingContextMethods>::GetSupportedExtensions at /Users/navgattu/Documents/dev-git/servo/components/script/dom/webglrenderingcontext.rs:2329:9 24: script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::getSupportedExtensions::{{closure}}::{{closure}} at /Users/navgattu/Documents/dev-git/servo/target/debug/build/script-80d43fa6e481c605/out/Bindings/WebGLRenderingContextBinding.rs:1095:46 25: script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::getSupportedExtensions::{{closure}} at /Users/navgattu/Documents/dev-git/servo/target/debug/build/script-80d43fa6e481c605/out/Bindings/WebGLRenderingContextBinding.rs:1090:33 26: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/core/src/ops/function.rs:280:13 27: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/core/src/panic/unwind_safe.rs:271:9 28: std::panicking::try::do_call at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/std/src/panicking.rs:403:40 29: <unknown> at /Users/navgattu/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/09edacd/src/glue.rs:299:6 30: std::panicking::try at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/std/src/panicking.rs:367:19 31: std::panic::catch_unwind at /rustc/0fa3190394475a84360b34e074e719d519bc40f1/library/std/src/panic.rs:129:14 32: mozjs::panic::wrap_panic at /Users/navgattu/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/09edacd/src/panic.rs:22:11 33: script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::getSupportedExtensions at /Users/navgattu/Documents/dev-git/servo/target/debug/build/script-80d43fa6e481c605/out/Bindings/WebGLRenderingContextBinding.rs:1090:5 34: CallJitMethodOp at /Users/navgattu/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/09edacd/src/jsglue.cpp:663:12 35: script::dom::bindings::utils::generic_call 36: script::dom::bindings::utils::generic_method 37: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:435:13 _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:520:12 38: _ZN2js13CallFromStackEP9JSContextRKN2JS8CallArgsE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:584:10 _ZL9InterpretP9JSContextRN2js8RunStateE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:3244:16 39: _ZN2js9RunScriptEP9JSContextRNS_8RunStateE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:405:13 40: _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:552:13 41: _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:597:8 42: _ZN2js9fun_applyEP9JSContextjPN2JS5ValueE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/JSFunction.cpp:1166:10 43: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:435:13 _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/vm/Interpreter.cpp:520:12 44: _ZN2js3jit14DoCallFallbackEP9JSContextPNS0_13BaselineFrameEPNS0_15ICCall_FallbackEjPN2JS5ValueENS7_13MutableHandleIS8_EE at /Users/navgattu/Documents/dev-git/mozjs/mozjs/js/src/jit/BaselineIC.cpp:1841:10 ```
* | Auto merge of #28635 - negator:patch-2, r=jdmbors-servo2021-12-011-1/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use ParallelIterator if not using rayon The rayon [`ParalllelIIterator`](https://github.com/rayon-rs/rayon/blob/master/src/iter/plumbing/README.md) is being used for inline content size calculations irrespective of the `use_rayon` flag, which can lead to an unbounded (dynamically determined) number of threads being spawned during iteration. The check is performed for static position calculations, however: https://github.com/servo/servo/blob/6fced22e4784714540a2bf31b00c5f8149cbba87/components/layout_2020/flow/mod.rs#L235-L242 --- <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
| * | fmtNaveen Gattu2021-11-301-2/+3
| | |
| * | rm wsNaveen Gattu2021-11-301-1/+1
| | |
| * | Do not use ParallelIterator if not using rayonNaveen Gattu2021-11-301-2/+9
| |/
* | more conciseNaveen Gattu2021-11-291-7/+5
| |
* | if let destructuringNaveen Gattu2021-11-291-7/+9
| |
* | more conciseNaveen Gattu2021-11-281-4/+3
| |
* | preserve fragmentNaveen Gattu2021-11-281-2/+9
|/
* Updated cssparser dependency to 0.29.Lewin Probst2021-11-1816-78/+75
| | | | Signed-off-by: Lewin Probst <info@emirror.de>
* Auto merge of #28591 - servo:jdm-patch-51, r=jdmbors-servo2021-11-0118-26/+31
|\ | | | | | | | | | | Update rustc to latest nightly. None
| * Update nightly rustc.Josh Matthews2021-11-0118-26/+31
| |
* | Auto merge of #28616 - servo:starting-browser-id, r=jdmbors-servo2021-10-184-31/+39
|\ \ | | | | | | | | | | | | | | | Create initial browser id for compositor on startup. Fixes #28140.
| * | Create initial browser id for compositor on startup.Josh Matthews2021-10-184-31/+39
| |/
* | Auto merge of #28611 - servo:notriddle/non-ts, r=jdmbors-servo2021-10-091-0/+3
|\ \ | | | | | | | | | | | | | | | Add docs that say, somewhere, what `non_ts` means - [x] These changes do not require tests because it's just updating a doc comment
| * | Add docs that say, somewhere, what `non_ts` meansMichael Howell2021-10-081-0/+3
| |/
* / Fix UB in hashglobe121011112021-10-091-1/+3
|/
* Auto merge of #28581 - yvt:fix-xo-attr-setter, r=KiChjangbors-servo2021-08-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The condition for exposing a cross-origin setter should be `CrossOriginWritable`, not `CrossOriginReadable` Fixes `Location#href` being inaccessible from a cross-origin document. --- - [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 OR - [ ] These changes do not require tests because ___
| * fix(script): the condition for exposing a cross-origin setter is ↵yvt2021-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `CrossOriginWritable`, not `CrossOriginReadable` The expression `crossOriginIframe.contentWindow.location.href = "new href"` takes the following steps: (1) Get the setter for `href` by invoking `[[GetOwnProperty]]` on `crossOriginIframe.contentWindow. location`. (2) Call the setter, passing `crossOriginIframe. contentWindow` and `"new href"`. Since the target `Location` is cross origin, getting the setter succeeds only if the `CrossOriginWritable` extended attribute is present on the `href` attribute, and it's present. However, instead of `CrossOriginWritable`, `CrossOriginReadable` was checked mistakenly. Since `Location#href` has `CrossOriginWritable` but not `CrossOriginReadable`, this bug rendered `Location#href` inaccessible from a cross-origin document.
* | Fix compiler warningsBryce Wilson2021-08-145-5/+6
|/
* Remove unnecessary feature gatebjorn32021-08-131-1/+0
|
* Fix lintbjorn32021-08-101-0/+1
|
* Update script_plugin for rust-lang/rust#85296bjorn32021-08-091-3/+2
|
* fix(script): "process the iframe attributes" shouldn't invoke the iframe ↵yvt2021-08-071-11/+18
| | | | | | | | | | load event steps anymore This likely originates from a bug that existed in the specification[1]. A `src`-less iframe would fire two `load` events when implemented according to an affected version of the specification. [1]: https://github.com/whatwg/html/commit/f2839722e1b3dc56368c32fd5808f172f3ea3289
* refactor(script): `navigate_or_reload_child_browsing_context` should only ↵yvt2021-08-032-19/+23
| | | | | | | | | | handle cases involving navigation The initial document creation does not involve navigation, and it would cause a confusion if this was done by a function which has `navigation` in its name. This commit renames `navigate_or_reload_child_browsing_ context` to `start_new_pipeline`, and introduces a new function which has the original name and is dedicated to handle navigation.
* Auto merge of #28546 - yvt:feat-cow-infra, r=jdmbors-servo2021-08-0112-97/+1081
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement `Location`'s custom internal methods This PR partly resurrects #16501 and introduces the use of principals object to associate objects and Realms with origins. Using this infrastructure, this PR implements [the custom internal methods][1] of the `Location` interface, which is "maybe-cross-origin". Unimplemented/incomplete things: - Other maybe-cross-origin interfaces, namely `WindowProxy` and `DissimilarWindowLocation`, aren't implemented correctly yet (causing most test cases of `tests/wpt/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html` to fail). - `WindowProxy`: #28556 - [The "perform a security check" operation][2] and `Location`'s non-cross-origin properties' relevant `Document` origin checks aren't implemented either (not sure if they are covered by the existing tests). - There are a slight deviation from the standard and inefficiency in `CrossOriginGetOwnPropertyHelper`'s current implementation. - #28557 [1]: https://html.spec.whatwg.org/multipage/#the-location-interface [2]: https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #16243 and make some progress in #2382 --- - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___
| * fix(script): don't pass an unrooted slice to `from_rooted_slice`yvt2021-07-281-1/+6
| |
| * style(script): add underscore to unused parameteryvt2021-07-271-4/+3
| |
| * refactor(script): make grouping clearer while keeping `test-tidy` happyyvt2021-07-271-3/+4
| |
| * refactor(script): refactor common code into ↵yvt2021-07-271-20/+38
| | | | | | | | | | | | | | | | | | `PropertyDefiner.generateUnguardedArray` There are code fragments in `(Method|Attr)Definer.generateArray` that are much alike. This commit refactors them into a new method of `PropertyDefiner` named `generateUnguardedArray` (in contrast to the existing method `generateGuardedArray`).
| * refactor(script): squash `CGDOMJSProxyHandler_set`yvt2021-07-262-51/+49
| | | | | | | | | | | | The implementation in `crate::dom::bindings::proxyhandler:: maybe_cross_origin_set_rawcx` is now directly assigned to `ProxyTraps:: set`.
| * doc(script): fix commentsyvt2021-07-261-4/+4
| | | | | | | | | | `History` is not a maybe-cross-origin object. I must have been very sleepy when I wrote this.
| * refactor(script): don't conjure up `ServoJSPrincipals` in ↵yvt2021-07-251-7/+24
| | | | | | | | | | | | | | | | `ServoJSPrincipalsRef::deref` It's technically safe to do because of `#[repr(transparent)]` and is a prerequisite of having `ServoJSPrincipalsRef: Copy`, but I guess it's not worth an `unsafe` block.
| * refactor(script): apply suggestionsyvt2021-07-253-33/+24
| |
| * refactor(script): apply suggestionyvt2021-07-251-2/+1
| | | | | | Co-authored-by: Josh Matthews <josh@joshmatthews.net>