aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/error.rs
Commit message (Collapse)AuthorAgeFilesLines
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-18/+16
| | | | | * strict imports formatting * Reformat all imports
* Throw type error when calling DOM constructor without new.Josh Matthews2023-05-301-0/+6
|
* Stringify unknown JavaScript objects in global exception handlersMartin Robinson2023-01-121-30/+38
| | | | | | | | | | | | | | | | | | | When turning DOM exceptions into `ErrorInfo` always try to stringify the JavaScript value, even if it's an object that isn't a `DOMException` or native exception. This means that exceptions that extend the `Error` prototype are now stringified. The result is that test output for WPT global assertion failures is more useful. For instance for the test include-frames-from-child-same-origin-grandchild.sub.html: Before: ``` uncaught exception: unknown (can't convert to string) ``` After: ``` uncaught exception: Error: assert_equals: expected 4 but got 3 ```
* Fix building with --feature js_backtraceKallyn Gowdy2020-06-221-2/+4
| | | | | - mozjs::jsapi::CapturedJSStack::as_string() (https://doc.servo.org/mozjs/rust/struct.CapturedJSStack.html#method.as_string) was updated to accept a second parameter which specifies which Stacktrace format to use. The default has been specified to preserve the (presumably) original behavior. - The related code has also been placed in an unsafe block since the capture_stack macro calling the unsafe mozjs::jsapi::CapturedJSStack::new() function. Seems that this commit (https://github.com/servo/servo/commit/0703a1ad6d736796d467f5a028e5ab3c6d876268) forgot this part.
* Update SpiderMonkeyAnthony Ramine2020-03-061-1/+2
|
* Always pass InRealm to GlobalScope::from_context to avoid getting null globalCYBAI2020-02-161-2/+3
|
* Stringifier is sno longer exposedPatrick Shaughnessy2019-12-121-2/+1
|
* Use safe JSContext as first argument for throw_dom_exceptionmarmeladema2019-08-091-16/+19
|
* Added framebuffer and related attributes to XRWebGLLayerAlan Jeffrey2019-07-181-0/+3
|
* Propagate JSFailed error & conditionally execute initial assertion when ↵Julien Tregoat2019-07-031-1/+4
| | | | converting error to JS value.
* Upgrade to Spidermonkey 67.Josh Matthews2019-06-261-3/+3
|
* Upgrade to rustc 1.35.0-nightly (4c27fb19b 2019-03-25)Simon Sapin2019-03-261-3/+5
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-2/+2
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-3/+5
|
* Sort `use` statementsSimon Sapin2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-7/+7
|
* script: Optionally store backtraces when throwing DOM exceptions.Josh Matthews2018-10-011-0/+30
|
* Format script componentchansuke2018-09-191-28/+30
|
* Support unions of objects in overloadsAnthony Ramine2018-08-301-8/+0
| | | | Part of #20513, implementing the parts useful for WebGL.
* Upgraded to SM 60Alan Jeffrey2018-08-201-5/+5
|
* Implement read methods on FileReaderSyncJonas Reinwald2018-06-041-0/+3
|
* Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393Marcin Mielniczuk2018-03-281-5/+5
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Don't return early from report_pending_exception() if the value is an ↵Ms2ger2016-11-271-9/+10
| | | | | | unexpected object. We will now dispatch the error event in this case as well.
* Invert conditional and return early from report_pending_exceptionFlorian Hartwig2016-10-131-41/+41
|
* Remove GlobalRoot and GlobalRefAnthony Ramine2016-10-061-3/+2
|
* Introduce GlobalScope::report_an_errorAnthony Ramine2016-10-061-3/+3
|
* Make Error::to_jsval take a &GlobalScopeAnthony Ramine2016-10-061-3/+3
|
* Make throw_dom_exception take a &GlobalScopeAnthony Ramine2016-10-061-3/+4
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-1/+1
|
* Add a simple API to reject promises with DOM error values.Josh Matthews2016-09-221-0/+12
|
* Reorder `use` statementsUK9922016-09-091-1/+1
|
* Implement report_an_error on GlobalRef.Ms2ger2016-09-051-3/+1
|
* Panic when stringifying an primitive fails.Ms2ger2016-09-021-2/+1
| | | | This should not happen.
* Dispatch error events at the window object.Ms2ger2016-09-021-22/+46
|
* Remove the JSAutoCompartment from report_pending_exception.Ms2ger2016-08-261-4/+1
| | | | It doesn't really belong there.
* Update rust-mozjs dependencyGuillaume Gomez2016-08-241-3/+3
|
* Remove an unused argument to ErrorInfo::from_dom_exception.Ms2ger2016-07-291-2/+2
|
* Update SpiderMonkey to m-c bcf4ff0c3eef.Ms2ger2016-07-281-4/+105
| | | | | | This currently breaks Servo on Android, because there are a number of interdependent changes that cannot easily land serially in a way that keeps it working throughout. We expect to fix this in the near future.
* Auto merge of #12261 - szeged:gattcharacteristicfunctions, r=jdmbors-servo2016-07-061-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing steps of Characteristic's readValue, writeValue functions <!-- Please describe your changes on the following line: --> Add a check for the read property of the characteristic as described in https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-readvalue (Step 4.1) Add two missing steps to characteristic's WriteValue function. https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-writevalue (Step 4 and 5) --- <!-- 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 do not require tests because, there are no Web Bluetooth test API implementation yet. <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12261) <!-- Reviewable:end -->
| * Missing steps of Characteristic's readValue, writeValue functionszakorgy2016-07-061-0/+3
| |
* | Switch to using the new rooted!/RootedGuard API for rooting.Eduard Burtescu2016-07-041-2/+2
|/
* Make report_pending_exception unsafeAnthony Ramine2016-06-071-6/+4
|
* Remove JS_SaveFrameChain and JS_RestoreFrameChain calls.Ms2ger2016-05-171-9/+2
| | | | | They were cargo-culted from Gecko, where they haven't been necessary for a while either.
* Say farewell to in-tree HeapSizeOfAnthony Ramine2016-02-041-1/+0
|
* Use throw_type_error and throw_range_error from js.Ms2ger2015-11-121-76/+11
|
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-3/+2
| | | | | | | | | | This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
* Support the updated spidermonkey bindingsMichael Wu2015-10-141-10/+10
|