Commit graph

78 commits

Author SHA1 Message Date
marmeladema
0703a1ad6d Use safe JSContext as first argument for throw_dom_exception 2019-08-09 00:43:28 +01:00
Alan Jeffrey
aa0a72df0f Added framebuffer and related attributes to XRWebGLLayer 2019-07-18 14:24:50 -05:00
Julien Tregoat
28fcde9e10 Propagate JSFailed error & conditionally execute initial assertion when converting error to JS value. 2019-07-03 13:48:48 -04:00
Josh Matthews
63714c90fb Upgrade to Spidermonkey 67. 2019-06-26 18:10:46 -04:00
Simon Sapin
389e69bafe Upgrade to rustc 1.35.0-nightly (4c27fb19b 2019-03-25) 2019-03-26 15:12:55 +01:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Josh Matthews
06bca43aee script: Optionally store backtraces when throwing DOM exceptions. 2018-10-01 16:04:56 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Anthony Ramine
900a19058e Support unions of objects in overloads
Part of #20513, implementing the parts useful for WebGL.
2018-08-30 16:15:40 +02:00
Alan Jeffrey
74c1e00d81 Upgraded to SM 60 2018-08-20 18:22:29 -04:00
Jonas Reinwald
0fdafb08c8 Implement read methods on FileReaderSync 2018-06-04 15:53:08 -04:00
Marcin Mielniczuk
356c57e628 Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
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`.
2017-10-18 22:20:37 +11:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Ms2ger
154b16a25d Don't return early from report_pending_exception() if the value is an unexpected object.
We will now dispatch the error event in this case as well.
2016-11-27 10:27:11 +01:00
Florian Hartwig
f064d9ad83 Invert conditional and return early from report_pending_exception 2016-10-13 23:28:24 +02:00
Anthony Ramine
b6bbd41e11 Remove GlobalRoot and GlobalRef 2016-10-06 21:36:00 +02:00
Anthony Ramine
86d2008137 Introduce GlobalScope::report_an_error 2016-10-06 21:35:46 +02:00
Anthony Ramine
ac5c4c2194 Make Error::to_jsval take a &GlobalScope 2016-10-06 21:35:42 +02:00
Anthony Ramine
896d8d4781 Make throw_dom_exception take a &GlobalScope 2016-10-06 21:35:39 +02:00
Anthony Ramine
fcb59d3057 Make reflect_dom_object take a &GlobalScope 2016-10-06 20:59:09 +02:00
Josh Matthews
27d44c8d10 Add a simple API to reject promises with DOM error values. 2016-09-22 16:16:58 -04:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Ms2ger
b3050855e7 Implement report_an_error on GlobalRef. 2016-09-05 17:14:28 +02:00
Ms2ger
137845d47b Panic when stringifying an primitive fails.
This should not happen.
2016-09-02 11:44:46 +02:00
Ms2ger
ae38c53de7 Dispatch error events at the window object. 2016-09-02 11:44:44 +02:00
Ms2ger
5662f0d346 Remove the JSAutoCompartment from report_pending_exception.
It doesn't really belong there.
2016-08-26 17:59:31 +02:00
Guillaume Gomez
2f3f4a5bd6 Update rust-mozjs dependency 2016-08-24 12:56:49 +02:00
Ms2ger
5a61142720 Remove an unused argument to ErrorInfo::from_dom_exception. 2016-07-29 10:24:29 +02:00
Ms2ger
89efccc426 Update SpiderMonkey to m-c bcf4ff0c3eef.
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.
2016-07-28 13:05:56 +02:00
bors-servo
7da28b7ca6 Auto merge of #12261 - szeged:gattcharacteristicfunctions, r=jdm
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 -->
2016-07-06 11:11:26 -07:00
zakorgy
52e1d8325f Missing steps of Characteristic's readValue, writeValue functions 2016-07-06 09:31:52 +02:00
Eduard Burtescu
0db1faf876 Switch to using the new rooted!/RootedGuard API for rooting. 2016-07-04 20:59:01 +03:00
Anthony Ramine
27620320f3 Make report_pending_exception unsafe 2016-06-07 00:26:49 +02:00
Ms2ger
e4db7b6e9c Remove JS_SaveFrameChain and JS_RestoreFrameChain calls.
They were cargo-culted from Gecko, where they haven't been necessary for a
while either.
2016-05-17 16:32:04 +02:00
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
Ms2ger
acb24e80b8 Use throw_type_error and throw_range_error from js. 2015-11-12 10:20:19 +01:00
Ms2ger
6b75078503 Make DOMString a newtype around String, rather than a typedef.
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.
2015-11-04 12:09:11 +01:00
Michael Wu
e733a7c46a Support the updated spidermonkey bindings 2015-10-14 15:30:52 -04:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00
bors-servo
6247a96761 Auto merge of #6223 - nox:merge-generic-functions, r=Ms2ger
Merge generic funs to share them across all bindings (fixes #2684)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6223)
<!-- Reviewable:end -->
2015-06-24 03:54:56 -06:00
Anthony Ramine
a90983553b Merge generic funs to share them across all bindings (fixes #2684) 2015-06-24 11:34:30 +02:00