Commit graph

618 commits

Author SHA1 Message Date
Kagami Sascha Rosylight
22278a8895 Require PromiseRejectionEventInit dictionary 2019-11-22 10:18:11 +09:00
bors-servo
a7008d1cf7
Auto merge of #24665 - saschanaz:timerhandler, r=nox
Use TimerHandler IDL union type

<!-- 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
- [x] These changes fix #20700

<!-- 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. -->
2019-11-17 10:30:51 -05:00
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
bors-servo
df9065afb6
Auto merge of #24636 - saschanaz:windowproxy, r=nox,jdm
Use MessageEventSource on MessageEvent IDL

<!-- 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
- [x] These changes fix #22617

<!-- 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. -->
2019-11-07 22:35:43 -05:00
Kagami Sascha Rosylight
1b22c10483 Use TimerHandler IDL union type 2019-11-05 23:55:15 +09:00
Kagami Sascha Rosylight
01e0b2cb5e Use IDL sequence default value 2019-11-04 23:39:37 +09:00
Kagami Sascha Rosylight
f8b61c0315 Use MessageEventSource on MessageEvent IDL 2019-11-04 23:12:52 +09:00
Kagami Sascha Rosylight
691af0e98b Support stringifier attributes 2019-10-29 21:35:40 +09:00
bors-servo
5011e9c21c
Auto merge of #24471 - saschanaz:enum-default, r=ferjm
Support enum value as a union default value

<!-- Please describe your changes on the following line: -->

Didn't implement the actual latency thing because the relevant things are already marked as TODO.

---
<!-- 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 #21342

<!-- 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. -->
2019-10-21 03:27:18 -04:00
Kagami Sascha Rosylight
40ee701283 Support enum value as a union default value 2019-10-19 12:19:25 +09:00
Kagami Sascha Rosylight
e81b678645 Support [LegacyWindowAlias] 2019-10-19 12:01:00 +09:00
bors-servo
118a9ecdfe
Auto merge of #24476 - saschanaz:nonenumerable, r=jdm
Mark @@iterator as nonenumerable

<!-- 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
- [x] These changes fix #15497

<!-- 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. -->
2019-10-18 16:31:17 -04:00
bors-servo
32eb858a6a
Auto merge of #24469 - saschanaz:urp-default, r=Manishearth
Support USVString as default value of a union argument

<!-- Please describe your changes on the following line: -->

I don't expect this fixes any test though...

---
<!-- 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 #22543

<!-- 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. -->
2019-10-18 04:02:13 -04:00
Kagami Sascha Rosylight
1c717bc086 Mark @@iterator as nonenumerable 2019-10-17 22:08:14 +09:00
Kagami Sascha Rosylight
e905a4606a Support USVString as default value of a union argument 2019-10-17 12:06:41 +09:00
bors-servo
aa916ad20e
Auto merge of #24429 - saschanaz:getpropertykeys, r=jdm
Return false when GetPropertyKeys fails

<!-- Please describe your changes on the following line: -->

As stated in https://github.com/servo/servo/pull/24377#discussion_r333844560.

---
<!-- 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. -->
2019-10-15 11:59:09 -04:00
Kagami Sascha Rosylight
b697621b05 Support WebIDL record<> 2019-10-15 17:14:00 +09:00
Kagami Sascha Rosylight
764f1a3724 Return false when GetPropertyKeys fails 2019-10-12 18:57:05 +09:00
Kagami Sascha Rosylight
2660f35925 Remove [PrimaryGlobal] 2019-10-03 14:25:23 +09:00
Simon Sapin
5c60023cb8 WebIDL codegen: Replace cmake with a single Python script
When playing around with Cargo’s new timing visualization:
https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/21

… I was surprised to see the `script` crate’s build script take 76 seconds.
I did not expect WebIDL bindings generation to be *that* computationally
intensive.

It turns out almost all of this time is overhead. The build script uses CMake
to generate bindings for each WebIDL file in parallel, but that causes a lot
of work to be repeated 366 times:

* Starting up a Python VM
* Importing (parts of) the Python standard library
* Importing ~16k lines of our Python code
* Recompiling the latter to bytecode, since we used `python -B` to disable
  writing `.pyc` file
* Deserializing with `cPickle` and recreating in memory the results
  of parsing all WebIDL files

----

This commit remove the use of CMake and cPickle for the `script` crate.
Instead, all WebIDL bindings generation is done sequentially
in a single Python process. This takes 2 to 3 seconds.
2019-09-27 13:53:19 +02:00
bors-servo
2be3c2a1af
Auto merge of #23987 - saschanaz:update-webidl, r=jdm
Update WebIDL parser

<!-- Please describe your changes on the following line: -->

This includes IDL mixin support.

---
<!-- 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 does not fix but helps #22539 / fixes #16244

<!-- 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/23987)
<!-- Reviewable:end -->
2019-09-25 00:59:36 -04:00
bors-servo
8eddb60150
Auto merge of #24137 - gterzian:fix_error_throwing_on_unknown_js_arg, r=jdm
Codegen: throw type error when encountering an unknown argument

<!-- Please describe your changes on the following line: -->

FIX #24130

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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. -->

<!-- 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/24137)
<!-- Reviewable:end -->
2019-09-05 13:39:52 -04:00
Gregory Terzian
5149aefd85 codegen: throw type error when encountering an unknown argument 2019-09-05 18:29:02 +08:00
Kagami Sascha Rosylight
5695ee94a5 Add [Default] toJSON() to performance interfaces 2019-09-01 23:23:57 +09:00
Simon Sapin
98e4a53b72 Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15) 2019-08-23 08:23:21 +02:00
bors-servo
4275420a56
Auto merge of #23844 - saschanaz:tojson, r=Manishearth
Support default toJSON in WebIDL

<!-- Please describe your changes on the following line: -->

Ported related lines from gecko.

---
<!-- 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 #22781

<!-- 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/23844)
<!-- Reviewable:end -->
2019-08-20 17:27:14 -04:00
Kagami Sascha Rosylight
1806b9ede2 Update WebIDL parser 2019-08-16 23:17:50 +09:00
marmeladema
357b6c54ff Use safe JSContext in callbacks 2019-08-09 00:43:29 +01:00
marmeladema
0703a1ad6d Use safe JSContext as first argument for throw_dom_exception 2019-08-09 00:43:28 +01:00
marmeladema
6c26518f61 Remove usage of various unsafe keyword 2019-08-09 00:43:28 +01:00
marmeladema
78034a90d0 Use safe JSContext when possible in interface.rs 2019-08-09 00:43:24 +01:00
marmeladema
b18fa8b8a7 Use safe JSContext in compartments 2019-08-09 00:02:10 +01:00
marmeladema
8968286aa1 Don't mark new methods as unsafe in code generation 2019-08-09 00:02:09 +01:00
marmeladema
51e22fbc26 Remove some usage of unsafe code in Promise 2019-08-09 00:02:07 +01:00
Simon Sapin
c38c964f1b Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
Simon Sapin
0215d09ccb Generate apis.html and css-properties.json for docs as part of crates’ build scripts
… rather than as an extra step after `cargo doc`.
This helps always using the correct set of CSS properties
(for layout 2013 v.s. 2020).
2019-07-30 08:37:33 +02:00
Josh Matthews
410d5bc772 Update SpiderMonkey bindings for Windows arm64 crash fix. 2019-07-25 20:23:21 -04:00
Kagami Sascha Rosylight
bf70decdd3 remove redundant extra scoping 2019-07-25 12:43:43 +09:00
Kagami Sascha Rosylight
87cc409579 use SafeJSContext 2019-07-25 11:14:21 +09:00
Kagami Sascha Rosylight
caf7a2488e
Merge branch 'master' into tojson 2019-07-25 10:09:33 +09:00
Kagami Sascha Rosylight
16b4e3446b Support default toJSON in WebIDL 2019-07-24 22:01:55 +09:00
marmeladema
2c5d0a6ebc Convert CGTraitInterface to use safe JSContext instead of raw JSContext 2019-07-24 08:24:50 +01:00
marmeladema
808fa65aef Convert internal methods to handle safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
marmeladema
2fb3f1f983 Callbacks now uses safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
marmeladema
6e4caf1153 DefineDOMInterfaceMethod now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:22 +01:00
marmeladema
aa0e4f5c76 GetPerInterfaceObject methods now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:22 +01:00
marmeladema
0a5a9bc7bc CreateInterfaceObjects now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
marmeladema
35dc5320ab Wrap(Global)Method now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
marmeladema
cd0eb88a3e ConstructorEnabled now takes a SafeJSContext instead of a JSContext
a first argument. The function cannot be made safe because of call
to unsafe function is_exposed_in.
2019-07-24 08:18:20 +01:00
sreeise
871239a3e3 Change bindings generation to make Exposed annotation aware of members/partial interfaces 2019-07-14 09:24:43 -04:00