Commit graph

259 commits

Author SHA1 Message Date
Anthony Ramine
864dd6aa8e servo: Merge #14686 - Improve dead_code handling a bit (from nox:dom); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2694463b08f8f37b8a5351fa3199b3283b90cb3d
2017-01-03 05:13:23 -08:00
Simon Sapin
cf8e6df581 servo: Merge #14644 - Ever so slightly less unstable (from servo:ever-so-slightly-less-unstable); r=heycam
<!-- 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 _____

<!-- 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: e13f0017931e7f87cad13a13e3fe4e9bcbb9c554
2016-12-19 22:09:02 -08:00
Alan Jeffrey
07258edab3 servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck
<!-- Please describe your changes on the following line: -->

This PR removes the `util` crate.

* Replaced the `spawn_named` and `clamp` functions by appropriate uses of `std:🧵:Builder::spawn`, `std::cmp::min` and `std::cmp::max`.
* Moved `opts`, `prefs` and `resource_files` into a new `config` crate.
* Moved `remutex` and `geometry` into their own crates.

---
<!-- 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 they are refactorings

<!-- 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: 4eb653817f87e5fb47de34356f558eb76ecbca9f

--HG--
rename : servo/components/util/Cargo.toml => servo/components/config/Cargo.toml
rename : servo/components/util/basedir.rs => servo/components/config/basedir.rs
rename : servo/components/util/lib.rs => servo/components/config/lib.rs
rename : servo/components/util/opts.rs => servo/components/config/opts.rs
rename : servo/components/util/prefs.rs => servo/components/config/prefs.rs
rename : servo/components/util/resource_files.rs => servo/components/config/resource_files.rs
rename : servo/components/util/geometry.rs => servo/components/geometry/lib.rs
rename : servo/components/util/remutex.rs => servo/components/remutex/lib.rs
rename : servo/tests/unit/util/lib.rs => servo/tests/unit/servo_config/lib.rs
rename : servo/tests/unit/util/opts.rs => servo/tests/unit/servo_config/opts.rs
rename : servo/tests/unit/util/prefs.rs => servo/tests/unit/servo_config/prefs.rs
rename : servo/tests/unit/util/remutex.rs => servo/tests/unit/servo_remutex/lib.rs
2016-12-14 16:48:42 -08:00
Corey Farwell
b429779be4 servo: Merge #14495 - Rename Reflectable to DomObject (from frewsxcv:reflectable-domobject); r=jdm
Fixes https://github.com/servo/servo/issues/8473.

Source-Repo: https://github.com/servo/servo
Source-Revision: b192ae9db7082346a4a6a985c5557d4cea75d50e
2016-12-08 12:41:08 -08:00
Anthony Ramine
8a68e5aa5a servo: Merge #14376 - Make WebIDL static items take a more specific global if possible (from nox:specialized-constructors); r=KiChjang,nox
Source-Repo: https://github.com/servo/servo
Source-Revision: e315da07319c115bd85f7da1baa1cf0577a1980b
2016-11-30 15:43:48 -08:00
Anthony Ramine
d8a9bfac17 servo: Merge #14225 - Update js (from servo:update-js); r=jdm,Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d69f53794c9f823d524d0d4382c04c4a57bea65
2016-11-27 05:03:15 -08:00
Abelardo E. Mendoza
7269bcf046 servo: Merge #14096 - 11485 make dom methods taking mut js content unsafe (from fflorent:11485-make-dom-methods-taking-mut-JSContent-unsafe); r=nox
This is a rebased version of PR #11595

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: no code logic was changed

<!-- 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: f70fc6644ddb142627c188ebbde2cc0a0282f9b4
2016-11-17 02:44:54 -06:00
Ms2ger
7f060a3a01 servo: Merge #14046 - Add a missing newline (from servo:ws-callback); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 97e205c8ef01545ad8abcf7ac2efa9e53b846847
2016-11-03 20:14:40 -05:00
Ms2ger
006da29587 servo: Merge #14022 - Update js (from servo:update-js); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 25e3ae6915bce0446a4bd1b1b89b2f0faaef2e02
2016-11-02 07:29:44 -05:00
Nikhil Shagrithaya
7c92108c55 servo: Merge #13729 - Implemented FileReader::readAsArrayBuffer (from cynicaldevil:readAsArrayBuffer); r=Ms2ger
<!-- 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 #12555

<!-- Either: -->
- [X] There are tests for these changes

There's still some small issues, but I suppose most of the work is done:
- test-tidy mentions a `method declared in webidl is missing a comment with a specification link` for the `getResult` method.
- I get an 'unused code' warning for code present in `UnionTypes.rs`, which is auto-generated.

Passing tests:
- [x]  `FileAPI/reading-data-section/filereader_result.html`
- [x]  `FileAPI/reading-data-section/filereader_readAsArrayBuffer.html`
- [x]  `FileAPI/idlharness.html`
- [ ]  `FileAPI/reading-data-section/FileReader-multiple-reads.html`

<!-- 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: ceb18e7d8624a6d78e3f712dc335928adaa7dc79
2016-10-31 14:01:18 -05:00
Anthony Ramine
ae68a2636c servo: Merge #13949 - Update Rust to 1.14.0-nightly (c59cb71d9 2016-10-26) (from nox:rustup); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 7205d5a657141f9498f385852fbc2328b802c3ec
2016-10-27 13:45:40 -05:00
Anthony Ramine
cf69fd522f servo: Merge #13647 - Unify all rooting traits under RootedReference (from nox:rootedreference); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: cf2a6475cb3d7d98b925e7a235ebf36f6abe883d
2016-10-11 17:00:55 -05:00
Anthony Ramine
4adf074ce8 servo: Merge #13675 - Clean up the parsers into a single interface (from nox:servoparser); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 928e5ad1e5ca4344e69cd8029749ecb623eabd9f

--HG--
rename : servo/components/script/parse/html.rs => servo/components/script/dom/servoparser/html.rs
rename : servo/components/script/parse/xml.rs => servo/components/script/dom/servoparser/xml.rs
rename : servo/components/script/dom/webidls/ServoXMLParser.webidl => servo/components/script/dom/webidls/ServoParser.webidl
2016-10-11 10:16:23 -05:00
Anthony Ramine
b95407a112 servo: Merge #13596 - Get rid of dom::bindings::global (from nox:inline); r=Ms2ger
Globals in that PR are now represented by the fake IDL interface `GlobalScope`.

Source-Repo: https://github.com/servo/servo
Source-Revision: a6e4b5bb86ad707a0863acff87344ca4239cfd2c

--HG--
rename : servo/components/script/dom/webidls/ServoXMLParser.webidl => servo/components/script/dom/webidls/GlobalScope.webidl
2016-10-07 07:52:09 -05:00
Anthony Ramine
6462d85db4 servo: Merge #13224 - Make TopTypeId an untagged union (from nox:union); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 73aa4fc5d23c9393d10e4c5d116b7cc0608cbb94
2016-10-06 13:27:28 -05:00
Anthony Ramine
5298bce936 servo: Merge #13554 - Some cleanups related to globals (from nox:cleanup-global); r=<try>
Source-Repo: https://github.com/servo/servo
Source-Revision: 522734de22ddbbc256cad94d1f07a8149e6e58fa
2016-10-03 04:48:13 -05:00
Ms2ger
d9c8eb37af servo: Merge #13449 - Pass a MutableHandle to fill_property_descriptor (from servo:fill_property_descriptor); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ec4f61e5386d05055dab405953f462a06a0ec5df
2016-09-30 05:06:15 -05:00
Till Schneidereit
2e6770cfa9 servo: Merge #13508 - Fix codegen for iterable's forEach method (from tschneidereit:fix-sh-methods-codegen); r=emilio
<!-- 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 #13451 (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. -->

The `forEach` method installed on iterable DOM interfaces uses SpiderMonkey's self-hosted implementation of `Array.prototype.forEach`, but it has the wrong value for `nargs`, causing failing asserts in debug and wrong behavior in release builds.

Fixes #13451

Source-Repo: https://github.com/servo/servo
Source-Revision: c212234258524af4cd7346b5ee1224a94ebedca9
2016-09-29 20:21:32 -05:00
Anthony Ramine
0ab3a9c52e servo: Merge #13431 - Update the WebIDL parser (from nox:webidl); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 341fb72fc9692b5cdabb97cf6d6e8d89c1a56701
2016-09-28 07:07:16 -05:00
Hugo Thiessard
7ee5d170ea servo: Merge #13406 - Extract panic-catching for JS engine callbacks into a separate function (from Mylainos:issue-13377); r=jdm
All of our generated code for script contains inline code like this:
```
let result = panic::catch_unwind(AssertUnwindSafe(|| {
    ...
};
match result {
    Ok(result) => result,
    Err(error) => {
        store_panic_result(error);
        return false;
    }
}
```
This PR change it to something like this:
```
wrap_panic(|| { ... }, false)
```

---
- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix #13377

- [ ] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 06bb57bdcb7eb60ffe4058ced7301a5f285eede5
2016-09-27 09:58:42 -05:00
Alexandrov Sergey
e1f3d0a1a6 servo: Merge #13380 - Html options collection#13129 (from splav:HTMLOptionsCollection#13129); r=KiChjang
<!-- Please describe your changes on the following line: -->
Implement HTMLOptionsCollection and related HTMLSelectElement items

---
<!-- 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 #13129 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 7de13a6e26665322f5d9a6c51b7aa99caaa96110
2016-09-26 15:49:45 -05:00
Josh Matthews
bbc61ddf79 servo: Merge #12830 - Implement promise bindings (from jdm:promises); r=Ms2ger
This implements support for using Promises in WebIDL, executing promise callbacks in batches (equivalent to running all enqueued jobs from a setTimeout(0)), and attaching native callbacks to promise objects. This is the combined work of myself, @dati91, and @mmatyas based on the following prior work in Gecko:
* Codegen.py
* Promise.webidl
* Promise.cpp/Promise.h
* PromiseNativeHandler.h

This does not implement microtasks per #4283. This allows us to make progress on testing code that requires the use of Promises right now; the microtasks work is more complicated, but also largely orthogonal to implement.

Requires https://github.com/servo/mozjs/pull/89, https://github.com/servo/rust-mozjs/pull/287, and https://github.com/servo/rust-mozjs/pull/294.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4282
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b1a39c2ae14b78e437551d05f0e691a13e5d183
2016-09-22 15:23:23 -05:00
Alexandrov Sergey
6aeef13f21 servo: Merge #13333 - fix JS IndexedGetter and NamedSetter bindings generation (from splav:JS-setters-fix#13327); r=jdm
<!-- Please describe your changes on the following line: -->
Fix JS IndexedGetter and NamedSetter bindings generation.

---
<!-- 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 #13327 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the test will be in PR for #13129 as currently these setters are used by nobody.

<!-- 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: 73b296350927bad6d526cce21434ce68a75216fa
2016-09-22 01:36:25 -05:00
Ms2ger
79853a3dde servo: Merge #13332 - Implement the MozMap type (from servo:mozmap); r=jdm
Fixes #13144.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7b98c8a78819c57d90ed06c83f1376d4f38c8748
2016-09-21 10:09:58 -05:00
Anthony Ramine
b4dd54ac64 servo: Merge #13185 - Make console a namespace (fixes #13010) (from nox:namespaces); r=jdm,Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 84f3cf22bfa3a8897a687e9282b1a9df1cbcb8cc
2016-09-10 07:33:25 -05:00
Keith Yeung
3cdf22b83d servo: Merge #13201 - Properly generate typedef identities in unions (from KiChjang:codegen-typedefs); r=nox
Fixes #10605.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1b3c7ed0ee8e968df01258ca8858295ead77dfa4
2016-09-09 18:45:56 -05:00
Josh Matthews
74e6f5873f servo: Merge #13194 - Extract mutability out of Reflectable trait (from servo:mutreflectable); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: dd33be45485fefd148759c77462c484157026055
2016-09-07 04:17:36 -05:00
Anthony Ramine
26d596d985 servo: Merge #13183 - Clean up stuff in bindings::interface (from nox:cleanup-interface); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 628c644feeb2ba72b17ec5d74e559223accabbf3
2016-09-06 08:48:15 -05:00
Ms2ger
deb0a7234a servo: Merge #13181 - Add missing IsCallable checks (from servo:iscallable); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 69b5a0d0d0b2869dd6f96cb71fea6135bb0e94fe
2016-09-06 07:51:12 -05:00
Anthony Ramine
1c0d09c584 servo: Merge #13100 - Use Option<T> to return from getters (from nox:better-getters); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3649a356c8ddd04d3beebff9978b1bffa407c307
2016-08-31 04:10:42 -05:00
tp6vup54
d5b20f9845 servo: Merge #13070 - Convert imports in generate_imports into one per line, so that it can… (from tp6vup54:master); r=KiChjang
<!-- Please describe your changes on the following line: -->
Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order.

---
<!-- 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 #13036 (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. -->

… easily add new ones with alphabetical order.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd2577e51b1f643035616db2f56fd8ca8138b74
2016-08-27 07:27:50 -05:00
Tetsuharu OHZEKI
f4a9dfdded servo: Merge #13062 - Make DOMJSClass use JSClass instead of Class (fixes #13031) (from nox:bump-js); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: fe1225b4ba5b89bb7e22ea827edbc40d44a5d4d6
2016-08-26 19:41:51 -05:00
Anthony Ramine
c596568bd1 servo: Merge #13043 - Implement [Replaceable] (fixes #13033) (from nox:replaceable); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6457a31b5ae40f537d583234219aa399b970014f
2016-08-26 04:15:32 -05:00
Anthony Ramine
0c9713c259 servo: Merge #13017 - Pass the receiver to get_property_on_prototype (fixes #11600) (from nox:wrong-receiver); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 160d15670ef2e27b286a54ccd8e3b79cb59fda23
2016-08-25 11:49:54 -05:00
Anthony Ramine
b52ec1cde9 servo: Merge #13030 - Improve prototypes of global objects (from nox:global); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 8b84566097c6cce549f4ce3c6eba803dc8a537b4
2016-08-25 07:45:39 -05:00
Josh Matthews
cde449925a servo: Merge #12819 - Support pair and value iterable WebIDL bindings (from jdm:iterable2); r=nox
The actual iterator implementation and JSAPI calls related to setting up the interface are ported directly from Gecko's Codegen.py, IterableIterator.h, and IterableIterator.webidl. The changes to support multiple interfaces in one file are required because the internal iterator interface the parser generates gets associated with the original interface's WebIDL file. It seemed like a good time to address #571 in that case.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12628 and fix #571.
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 1370fa5e3b38f3000c0b1439177cc7b7b81d380e
2016-08-24 12:47:53 -05:00
Ms2ger
d47ed65c77 servo: Merge #13016 - Refactor some from_jsval implementations (from servo:fromjsval-interface); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 77af4e26cee2f9c02c1da9085d243aad32c667c6
2016-08-24 11:04:29 -05:00
Guillaume Gomez
2ceae6c5a3 servo: Merge #12954 - Update rust-mozjs (from GuillaumeGomez:dictionary_error); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3c4a08c016c0fd62496bcc7ffdbe850ce8813ccd
2016-08-24 06:19:37 -05:00
Boris Zbarsky
34381e2c19 servo: Merge #13009 - Use JS_SplicePrototype to set the right proto on the global, instead of JS_SetPrototype, since the latter will permanently deoptimize it (from bzbarsky:fix-proto-splice); 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's a performance improvement and I have no idea how to add performance tests.

<!-- 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: 9d320881160f2d64d9e5b79e8c17336037dfbede
2016-08-24 02:10:33 -05:00
Malisa Smith
cf9ad6bd7a servo: Merge #12790 - Update bindings generator to support default ByteString values in a dictionary (from malisas:malisa-bytestring-generator); r=Ms2ger
<!-- Please describe your changes on the following line: -->
Update bindings generator to support default ByteString values in a dictionary.

---
<!-- 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 #12737 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b7facf41cbc7ba727666e95fd0c390d432d862fa
2016-08-11 04:36:23 -05:00
Ms2ger
43fbda2530 servo: Merge #12255 - Update SpiderMonkey to m-c bcf4ff0c3eef (from servo:smup); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ae1fcd6fe35f942f1cb29fd0efdc9c2de393ee6
2016-07-28 06:58:59 -05:00
Malisa Smith
a5ed24f32c servo: Merge #12546 - Union types now allow ByteString (from malisas:malisa-bytestring-unions); r=KiChjang
<!-- Please describe your changes on the following line: -->
This PR addresses issue #12527 to allow ByteStrings in union types.
---
<!-- 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 #12527  (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6064f31f1959fa877e96029eedf8723962a10311
2016-07-21 21:25:42 -05:00
Josh Matthews
490ff75371 servo: Merge #12541 - Support sequences of sequences in generated bindings (from jdm:seqseq); r=nox
This fixes a blocker for #11897. `unroll` recursively gets the inner type of any sequence type encountered, so it's inappropriate for codegen that only wants the immediate inner type. However, if a type identifies as a sequence and is nullable, we need to reach through the nullable wrapper first. Gecko does very similar things.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ae0897175143351439ff5b903d05a79c17e3725
2016-07-21 14:24:52 -05:00
Josh Matthews
75e683bbec servo: Merge #12451 - Generate a list of supported DOM APIs from parsed WebIDLs (from jdm:generate-dom-apis); r=Ms2ger
Supplement the existing list of supported CSS properties with an equivalent list of DOM APIs.

---
<!-- 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 automatic generated documentation

Source-Repo: https://github.com/servo/servo
Source-Revision: 73ad0b928dd158be1eeba30dd21e67d4b9d82048
2016-07-15 15:13:22 -07:00
Josh Matthews
3922629c1d servo: Merge #12395 - Avoid calling JS_WrapValue for same-compartment DOM reflectors (from jdm:nowrap); r=Ms2ger
This change shaves off 15-20ns per iteration of the node.firstChild getter test in tests/html/bindings_perf.html. Based on [similar Gecko code](http://searchfox.org/mozilla-central/rev/f43c9e0ffa92e72dbdbcbf57eecf04a43d46da63/dom/bindings/BindingUtils.h#781).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #12358

Source-Repo: https://github.com/servo/servo
Source-Revision: e2e7013e7629af1b1da4b944798bee00d4eae2d2
2016-07-12 05:50:46 -07:00
Ms2ger
17ae29befe servo: Merge #12353 - Implement [Exposed] (from Ms2ger:expose); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 6d59be17bedbf9a96915b854df8ae8a0cd371831
2016-07-12 04:35:53 -07:00
Eduard Burtescu
da092febcb servo: Merge #11872 - Replace return_address usage for rooting with stack guards and convenience macros (from eddyb:back-to-roots); r=Ms2ger
The existing `Rooted` and `RootedVec` users were migrated the the following two macros:
```rust
let x = Rooted::new(cx, value);
// Was changed to:
rooted!(in(cx) let x = value);
// Which expands to:
let mut __root = Rooted::new_unrooted(value);
let x = RootedGuard::new(cx, &mut __root);
```
```rust
let mut v = RootedVec::new();
v.extend(iterator);
// Was changed to:
rooted_vec!(let v <- iterator);
// Which expands to:
let mut __root = RootableVec::new();
let v = RootedVec::new(&mut __root, iterator);
```

The `rooted!` macro depends on servo/rust-mozjs#272.
These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`.

Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10.

Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway.
`RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT.

By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix rust-lang/rust#34227
- [x] These changes do not require tests because they are not functional changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 80cb0cf8214fd52d2884724614c40cb278ee7575
2016-07-04 11:03:35 -07:00
Corey Farwell
df29454b47 servo: Merge #12178 - Refactor util::prefs operations to be methods on static struct (from frewsxcv:prefs); r=emilio
<!-- 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
- [X] 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: b0a8ce5341f5148e36523fee0b0fcbc2684c0a68
2016-07-03 08:19:04 -07:00
Ms2ger
f660aeb599 servo: Merge #11883 - Some bindings improvements (from Ms2ger:bindings-refactor); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 00af25b6855b1c3cd2ddf5119478e9119efaffd9
2016-06-27 18:07:07 -05:00
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