Commit graph

210 commits

Author SHA1 Message Date
Josh Matthews
b6061f6085 servo: Merge #11803 - Avoid unwinding into C stack frames (from jdm:catch-unwind); r=nox
Fix the biggest cause of #6462 by wrapping lots of JS->Rust transitions in catch_panic, and calling resume_panic after all Rust->JS transitions return.

Known issue:
* Finalizers can be called in response to any JS engine allocation that triggers a GC, so it's possible for a Rust object's Drop implementation that panics to leave an interrupted panic in TLS. This is why 30d8009 is part of this PR; the underlying problem is that there's no clear place to resume the panic after it is interrupted.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #6462 (github issue number if applicable).
- [X] There are tests for these changes OR

Source-Repo: https://github.com/servo/servo
Source-Revision: 87d991ebd24886051ad1131bdbe3b9019cb1c4b3
2016-06-22 08:36:01 -05:00
Jansen Jan
4da054ca26 servo: Merge #11214 - Support WindowProxy return values in bindings (from farodin91:windowproxy); 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 --faster` does not report any errors
- [x] These changes fix #10965 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

Source-Repo: https://github.com/servo/servo
Source-Revision: 08a55e29511a2b26b7ae26ebb0b9271f80e2a7bd
2016-06-10 10:53:35 -05:00
Anthony Ramine
b5c0573c3d servo: Merge #11620 - Implement [Unscopable] (fixes #11583) (from nox:unscopable); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: f56848a0e8a9137f128088d1dd0f86e11fad841a
2016-06-07 09:04:15 -05:00
Anthony Ramine
6c7df3f453 servo: Merge #11465 - Implement window.openURLInDefaultBrowser() (fixes #11292) (from nox:open); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3052e4f478e660a60c01dcd2368607429d423e10
2016-05-27 12:03:56 -05:00
Anthony Ramine
35439b7531 servo: Merge #11308 - Implement [Func] (from nox:guarded); r=jdm
First part of #11292, this just includes support of `[Func]`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 073c5e3b6b8950c01c9e5691925d24787fd06d53
2016-05-27 04:45:06 -05:00
Anthony Ramine
5aa3cb5ed3 servo: Merge #11326 - Move DOMString back to script (from nox:non-geckolib); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6abcd793d780369767385b01b02ee725d6b10585
2016-05-24 02:07:29 -07:00
Anthony Ramine
2a7c8273fe servo: Merge #11231 - Update Rust to 1.10.0-nightly (cd6a40017 2016-05-16) (from servo:rustup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 82036b57c728578d9fd9b5991aabcf2b12eddb71
2016-05-17 07:04:12 -07:00
Anthony Ramine
81c5e4cfed servo: Merge #11188 - Use JS_NewStringCopyN for the representation of interface objects (from nox:n-better-than-z); r=Ms2ger
This removes the need for the final null byte and we can make NonCallbackInterfaceObjectClass::new safe again I guess.

Source-Repo: https://github.com/servo/servo
Source-Revision: 252b0d8fa53f0ffff247f38743627b6e5ffb74e9
2016-05-16 06:26:13 -07:00
Ms2ger
6d664715e1 servo: Merge #11173 - Stop using JSAutoRequest (from servo:requests); r=nox
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
- [X] These changes do not require tests because no functional change

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

Source-Repo: https://github.com/servo/servo
Source-Revision: ea84601bf08618254200b3faca055c36e9ff29b4
2016-05-13 06:41:22 -07:00
Emilio Cobos Álvarez
67d95b1def servo: Merge #11155 - codegen: Fix dictionary handling and semantics (from emilio:codegen-dict-keyword); r=Ms2ger
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 #11152 (github issue number if applicable).

Either:
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

Fixes #11152

Source-Repo: https://github.com/servo/servo
Source-Revision: 221db56b08e01157c97f5adba43799eeaee32f64
2016-05-13 02:47:08 -07:00
AgostonSzepessy
4fc3b7fe82 servo: Merge #9890 - update.sh downloads all *.py tests from mozilla central (from AgostonSzepessy:update-webidl-tests); r=nox
components/script/dom/bindings/codegen/parser/update.sh downloads all *.py tests from https://dxr.mozilla.org/mozilla-central/source/dom/bindings/parser/tests

Source-Repo: https://github.com/servo/servo
Source-Revision: b054cb82a6b50b07209c9a8670076d1d9ed61605
2016-05-09 05:04:57 -07:00
Anthony Ramine
da31a4c64f servo: Merge #10756 - Update SpiderMonkey (from servo:smup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 2c69278067a23703b251a69c875bee49449c6bfc
2016-05-03 15:46:40 -07:00
Josh Matthews
2e1e7b6406 servo: Merge #10081 - Support controlling interface and member visibility via preferences (from jdm:interfacepref); r=nox
This was easier to throw together than per-attribute/method support, and it gets rid of some nonstandard properties from our globals.

Fixes #7626.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 8255e74a61d62be94ef53caa9ebe6cd5082dcb4d
2016-05-02 11:35:38 -07:00
Anthony Ramine
dbaf1869d4 servo: Merge #10819 - Refactor the call hook on non-callback interface objects (fixes #10744) (from nox:call-without-new); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a92a6360cf2833c405ec668ee144db5de44c15cf
2016-04-25 02:45:29 -07:00
Keith Yeung
db9fff8daa servo: Merge #10674 - Avoid generating parameter names that are Rust keywords (from KiChjang:codegen-avoid-rust-keywords); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f93379ff4e33a74922b859ac2be14c43c58ec24f
2016-04-18 04:41:43 +05:01
Arnaud Marant
6bc6d2d94a servo: Merge #10545 - remove unreachable code in codegen (from amarant:unreachable-codegen); r=Ms2ger
code is unreachable after return, and identical to the upper block

Source-Repo: https://github.com/servo/servo
Source-Revision: 155e4052d150179ea8423a7ea626a84e25409718
2016-04-13 02:36:33 +05:01
Josh Matthews
7bc8e96798 servo: Merge #10288 - Enable dictionaries in WebIDL sequences. Fixes #10282 (from jdm:dictseq); r=nox
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: acaac52be7973cfbf6621796d4fb944fbfd343ff
2016-03-31 23:59:13 +05:01
Ben
0218098aa7 servo: Merge #10152 - Fix #9511. Export webidl enums using "pub use" (from jdm:9511-rebase); r=nox
Change typedef codegen to export the underlying enum itself, rather
than an alias. Works around https://github.com/rust-lang/rust/issues/31355

Rebase of #9691.

Source-Repo: https://github.com/servo/servo
Source-Revision: edcf24fd4d39e86548717ecdfe36e2f1df30daac
2016-03-24 10:11:44 +05:01
Guillaume Gomez
d5f008cc87 servo: Merge #10096 - Make all interface objects share the same funToString (from GuillaumeGomez:fun_to_string); r=nox
Fixes #9280

Source-Repo: https://github.com/servo/servo
Source-Revision: e95368df6297e664122da8ae15f25724be557353
2016-03-21 16:21:44 +05:01
Peter
0b443ce56f servo: Merge #9786 - Fixed compile error in generated code, when webidl constructors have same number of args (from peterjoel:fix_codegen_is_array_like); r=jdm
One of the ways that generated code differentiates constructors is by comparing if the args are array-like. The generated code was calling a function `IsArrayLike` that no longer exists. I re-implemented it with a more rust-like naming scheme.

Source-Repo: https://github.com/servo/servo
Source-Revision: c37a0866608421d9e3afd67f0777e27091104f0f
2016-03-04 14:45:20 +05:01
Anthony Ramine
76517d377c servo: Merge #9652 - Lazily define interface objects on globals (fixes #6419) (from nox:lazy-interface-object); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: b188cb542e92f3490b049e8db8473c7e2acf6dc9
2016-02-25 21:13:11 +05:01
Anthony Ramine
125de5e009 servo: Merge #9067 - Make NamedNodeMap's named properties unenumerable (from nox:unenumerable-named-properties); r=jdm
https://dom.spec.whatwg.org/#dom-htmlcollection-item

Source-Repo: https://github.com/servo/servo
Source-Revision: 7192495e1a5ae24b62c61b718df38ee2f8803e03
2016-02-23 22:29:30 +05:01
Anthony Ramine
b008636747 servo: Merge #9728 - Preliminary commits for lazy interface objects in #9652 (from nox:lazy-preliminaries); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3550993075a0dedb5857a421cf39c3e8942b30f8
2016-02-23 19:44:45 +05:01
Guillaume Gomez
1eea3df8a9 servo: Merge #9633 - All interface objects now share the same hasInstance (from GuillaumeGomez:has_instance); r=nox
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 267630779316d2291b10ed8e60d0f9f5f2100ab1
2016-02-19 19:20:33 +05:01
zakorgyula
105f36d259 servo: Merge #9580 - Fixing issue with uniontypes not created with primitive types (from zakorgy:pythonfix); r=Ms2ger
Fixes #9531

Source-Repo: https://github.com/servo/servo
Source-Revision: 9778e5e84d95af1d1dadf71ad8a28701762bf8fc
2016-02-18 16:11:10 +05:01
Ms2ger
19b3af46cf servo: Merge #9678 - Derive the Debug trait for WebIDL-generated enums (from servo:debug-enum); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 07cb6599d0829d2eccdd8a2a0cf46ff657901593
2016-02-18 09:22:57 +05:01
Anthony Ramine
66105be900 servo: Merge #9676 - Support [ExceptionClass] (from nox:domexception); r=KiChjang
Use it on DOMException.

Source-Repo: https://github.com/servo/servo
Source-Revision: 61f09cce4e7c1681fd1f7fbefada596316f06809
2016-02-17 18:22:47 +05:01
Alexander Lopatin
6da1d8c042 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:30:57 +05:01
Prabhjyot Singh Sodhi
84cdb8c94c servo: Merge #9419 - generate typedefs in CodegenRust (from psdh:includeTypedef); r=nox
fixes #9384

Source-Repo: https://github.com/servo/servo
Source-Revision: a75f2cecda9b259dcfe576de53f690d9c96a36d8
2016-01-26 21:41:57 +05:01
Michael Rosenberg
2d8d6310cf servo: Merge #9430 - Fix issue #9411 - Do not generate empty WebIDL 'Constant' modules (from doomrobo:WebIDL-no-empty-const-modules); r=nox
Fixes issue #9411

Source-Repo: https://github.com/servo/servo
Source-Revision: a19b14313a333c5e895e481768237275f564044f
2016-01-26 15:11:16 +05:01
nxnfufunezn
28dd0cb227 servo: Merge #9413 - Move ConstantSpec, NonNullJSNative and define_constants from utils to interface (from nxnfufunezn:issue-9412); r=nox
Fixes #9412
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: e93a460db4902195ec64e6fe67817f9e3a7c1da9
2016-01-24 20:19:57 +05:01
Emilio Cobos Álvarez
52314ac85d servo: Merge #9304 - webidl: Implement sequences in unions (from emilio:sequence-in-unions); r=nox
Unblocks #9053

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f0daa1d47a2c720be241720b2083be4968404b6
2016-01-17 16:50:49 +05:01
Emilio Cobos Álvarez
59da8760a5 servo: Merge #9056 - Implement WebIDL sequence arguments (from emilio:sequence-args); r=nox
And use it for `WebGLRenderingContext#uniform1fv`.

Blocked on https://github.com/servo/rust-mozjs/pull/226

Fixes #544

Source-Repo: https://github.com/servo/servo
Source-Revision: c97d557720b2ef312b964534bd511d45161a2729
2016-01-12 22:58:30 +05:01
Anthony Ramine
46b9c7f311 servo: Merge #8954 - Fix prototypes of interface objects (fixes #2665) (from nox:protochain); r=Ms2ger
Callback interface objects' (i.e. NodeFilter's) prototype is now Object instead of
Function and non-callback interface objects' their proper ancestor, starting with
the Function prototype.

The function do_create_interface_objects is removed in favour of 4 functions:
create_callback_interface_object, create_interface_prototype_object,
create_noncallback_interface_object and create_named_constructors.

While this increases the amount of codegen'd code, this greatly improves the
readability of the code involved in this part of DOM, instead of having one function
doing 4 different things. We can always find a more adequate abstraction later.

NativeProperties and everything related to the interface objects have been removed
from the utils module.

Fixes #2665.

Source-Repo: https://github.com/servo/servo
Source-Revision: e977a6e69a06ad69e87cc235b4ede60f8fb3eca3
2016-01-12 21:31:47 +05:01
Corey Farwell
226d983d0f servo: Merge #9200 - Remove unneeded dict sorting functions in CodegenRust.py (from frewsxcv:unnecessary-sorting-functions); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 85792d281964858d3a9ff4fa46e2c7cd8700c03f
2016-01-11 02:12:42 +05:01
Guillaume Gomez
c2448b55aa servo: Merge #9146 - Generate PartialEq automatically (from GuillaumeGomez:generate_partial_eq); r=nox
r? @nox

Fixes #8804

Source-Repo: https://github.com/servo/servo
Source-Revision: 1096183cceea9ec78ab02caa33ee2d14668d977d
2016-01-04 00:08:10 +05:01
Anthony Ramine
c866440a7c servo: Merge #8993 - Slightly reduce the output of codegen (from nox:small-codegen-slimming); r=Ms2ger
Interfaces which we know are never instantiated can generate less code.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8dc4b8dcb927ba8f61b99d869efb688903504c07
2015-12-18 06:06:15 +05:01
Anthony Ramine
fc06cf52ab servo: Merge #8996 - Do not create modules from files with nothing to codegen (fixes #8711) (from nox:rm-empty-modules); r=frewsxcv
Fixes #8711.

Source-Repo: https://github.com/servo/servo
Source-Revision: d1ea209f0fb4951ee7cd773e448ee65968968d38
2015-12-16 20:37:37 +05:01
Anthony Ramine
d5b0ce5bfa servo: Merge #8055 - Remove all our patches to the WebIDL parser (from nox:rm-webidl-patches); r=Ms2ger
All the tweaks we need can just be made through Configuration.py.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9c4ca39ebe57502b74d75aa9d6953b017d884f54
2015-12-16 14:50:25 +05:01
Anthony Ramine
f502bfb306 servo: Merge #8991 - Merge CGClassConstructHook and CGClassNameConstructHook (fixes #8934) (from nox:clean-construct-hook); r=frewsxcv
Fixes #8934.

Source-Repo: https://github.com/servo/servo
Source-Revision: 59a354427923f1c4febd9b8bcd6692900aa10f98
2015-12-16 04:44:50 +05:01
Guillaume Gomez
994b1c9d37 servo: Merge #8986 - Fix invalid returned value for dictionary types (from GuillaumeGomez:patch-2); r=nox
part of #8882

cc @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 432087c0ea6a5a419273b448eec62eb7549ba242
2015-12-15 22:28:58 +05:01
Guillaume Gomez
421e148400 servo: Merge #8966 - Fix invalid dictionary inheritance (from GuillaumeGomez:patch-1); r=nox
Needed by #8882.

cc @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 201b5c98202fc6fbdd7478c650199777e5eb9dd8
2015-12-14 16:39:23 +05:01
Keith Yeung
277a5024e0 servo: Merge #8854 - Treat 'undefined' passed to optional JS arguments as missing (from KiChjang:undefined-as-missing); r=frewsxcv
@frewsxcv please don't hurt me for this.

I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments.

Fixes #8813.
Fixes #6558.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bab1cd7a4634618d18985d273c6997984919ecc
2015-12-13 10:12:56 +05:01
Josh Matthews
b54ed93b4a servo: Merge #8827 - Avoid a null-dereference using debug mozjs builds. This matches the e… (from jdm:debugmozjscrash); r=Ms2ger
…quivalent code upstream in Gecko.

Source-Repo: https://github.com/servo/servo
Source-Revision: 59029325c04d94af636e0b48478b00404afc4f7c
2015-12-08 11:42:53 +05:01
Anthony Ramine
192fe9ad11 servo: Merge #7988 - Implement [Unforgeable] (from nox:unforgeable); r=jdm
This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.

Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.

No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.

Source-Repo: https://github.com/servo/servo
Source-Revision: 20df7fb7c82a5501342ac85278294e4bcb5b1ab7
2015-12-03 10:34:05 +05:01
Anthony Ramine
0d9105190f servo: Merge #8751 - Remove unused slot in prototype object (fixes #8588) (from nox:rm-prototype-slot); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 29c42a9f78a20ddeb5aa89b79d578a039c087967
2015-11-30 18:58:57 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Anthony Ramine
628d175690 servo: Merge #8147 - Implement weak-referenceable JS-managed objects (from nox:weakref); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e63b1e83d4acd272cdf293292f2a496455405098
2015-11-13 05:53:40 +05:01
Anthony Ramine
a0a6e0cd40 servo: Merge #8498 - Properly handle variadic arguments preceded by default values (from nox:fix-variadic-and-default-arguments); r=jdm
I broke that in #8197.

Source-Repo: https://github.com/servo/servo
Source-Revision: c44c73aa00ced6235266bd692833e22018f31138
2015-11-13 03:53:11 +05:01
Ms2ger
3890fca29d servo: Merge #8428 - Update js (from Ms2ger:conversions); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b40882093a306032d38ad02e30f0095e0a49ec21
2015-11-13 00:44:52 +05:01