Commit graph

43 commits

Author SHA1 Message Date
benshu
0d2fab2fb7 servo: Merge #7341 - Add profiling to the script event loop (#5331) (from benschulz:script-profiling); r=Manishearth
I fear the category names are unimaginative; in some cases they may even be misleading or downright incorrect. Requests to rename categories as well as any other feedback are highly appreciated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6431e8da43817e8a6b1e4757afbcf45c1a629707
2015-08-27 17:00:15 -06:00
Anthony Ramine
c327bc7867 servo: Merge #7416 - Make the traits for the IDL interfaces take &self (from nox:methods-ref); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b277d5675556e61a82ae9dbf3105449c3a8275
2015-08-27 15:08:41 -06:00
Anthony Ramine
d2ee701ee9 servo: Merge #7401 - Remove helper traits (from nox:rm-helpers); r=Manishearth
Now that `JSRef<T>` is gone, there is no need to have helper traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 909429702972d53bf02dfe9a4aa93ea0cb588cf4
2015-08-27 09:38:48 -06:00
João Oliveira
d39bd47b08 servo: Merge #7361 - make dom_struct derive HeapSizeOf (from jxs:master); r=Ms2ger
closes #7357

Source-Repo: https://github.com/servo/servo
Source-Revision: 532fd19d69fd11d06bca7539c722a46fab2c4419
2015-08-27 02:35:45 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Manish Goregaokar
d4e45231ec servo: Merge #7224 - Integrate clippy into Servo; cleanup some of script (from Manishearth:clippy); r=Ms2ger
The integration is off by default for now. You can try it out with `./mach build --features "script/plugins/clippy"`.

We're using a branch of clippy with some of the lints changed to Allow, either because they don't apply to us, or because they're noisy and dwarf other warnings (but still should be fixed)

After going through the rest of Servo's warnings I'll figure out which lints we should be keeping.

There's a cargo bug with optional deps that makes it hard for this to work with Cargo.lock -- so this PR contains no changes to lockfiles (and running the build with clippy on may dirty the lockfile, though it gets fixed later)

Source-Repo: https://github.com/servo/servo
Source-Revision: 50e1c967e4299c1515575f73d407f5f6b977d818
2015-08-18 08:15:51 -06:00
Josh Matthews
6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -06:00
Tom Jakubowski
b5d4709aa6 servo: Merge #7214 - Implement WebSocket#binaryType (from tomjakubowski:websocket-binaryType); r=Ms2ger
Closes #7098

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c63c7d7c109165b9584da5b31658ff89af21ef9
2015-08-15 19:57:58 -06:00
Ravi Shankar
35668fd5a5 servo: Merge #7006 - Splitting ScriptMsg into various enums (from Wafflespeanut:script_cleanup); r=jdm
... for #3734, which is also one of the oldest issues. (/cc @jdm)

Source-Repo: https://github.com/servo/servo
Source-Revision: 6a52ec94840fbaf43a29d76879e2b59542a9963d
2015-08-15 03:48:47 -06:00
Bogdan Cuza
b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
Ms2ger
099b2bd2fe servo: Merge #7066 - Dispatch message events for WebSocket (from Ms2ger:ws-event); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: d8b4611a79fbb8c4675d9de763280ada34e63b13
2015-08-08 03:00:50 -06:00
James Graham
a77654c4c2 servo: Merge #6416 - Use hosts-replaced URL only when loading resources (from jgraham:hosts_replaced); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8602d01af2b2081ea1e9d600abdb1ea609a65038
2015-08-05 08:01:03 -06:00
Bogdan Cuza
e9c4da1e57 servo: Merge #6699 - Tidy check for FooMethods in components/script/dom/*.rs and color for tidy (from boghison:tidyspec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 14ccb22e679722ed3374c8facec21adcf0f2b247
2015-07-28 08:56:39 -06:00
Ms2ger
21d6151f37 servo: Merge #6706 - Move the WebSocket constructor logic out of WebSocket::new (from Ms2ger:ctor); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c24d37dfccc0a57fa37efc56d08de2679db963e1
2015-07-23 01:44:20 -06:00
Ms2ger
486816229b servo: Merge #6635 - Spawn a thread for WebSocket messages (from Ms2ger:ws-task); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 6fd31867baabd36a7a6fee5541c0d9816d877138
2015-07-22 14:26:21 -06:00
Josh Matthews
0c8cda2cbb servo: Merge #6694 - Reject websocket protocol requests that don't match https://tools.iet… (from jdm:websocketprotocol); r=Ms2ger
…f.org/html/rfc6455#section-4.1 .

Source-Repo: https://github.com/servo/servo
Source-Revision: 6b4f1a42f08f66519af310b7c7777d77cc3d0834
2015-07-22 09:44:34 -06:00
Ms2ger
cd719fa849 servo: Merge #6647 - Don't try to send a message in WebSocket#close if the sender isn't present (from Ms2ger:ws-send-closing-closed); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7e91577d0ad6ba539ef70ff74cde100c16655d35
2015-07-16 02:27:13 -06:00
Ms2ger
a871d28906 servo: Merge #6634 - Remove parse_web_socket_url in favour of functions in rust-websocket (from Ms2ger:ws-parse); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 8fa6e0abdc7a346101ebf6f4b6983a096675bb7c
2015-07-14 23:37:57 -06:00
Ms2ger
a3f8c64cfa servo: Merge #6622 - Throw an InvalidStateError from WebSocket#send when it is called too early (from Ms2ger:send-invalid-state); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: a2903091e4ff06a1de8792bb6b09cf888c1edbfc
2015-07-14 03:34:47 -06:00
Ms2ger
8985822b47 servo: Merge #6620 - Stop panicking while establishing a WebSocket connection (from Ms2ger:ws-crash); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d91a6f3834aa7fbf47148480e16d06d9e3891340
2015-07-14 02:06:17 -06:00
Josh Matthews
98484aa7c5 servo: Merge #6611 - Add Origin header to WebSocket connections (from jdm:websocketorigin); r=jdm
Closes #6532.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0fb9f22ff7622940669faf4ec25e9bb9856c5def
2015-07-13 23:39:16 -06:00
Ms2ger
63ad015327 servo: Merge #6610 - Replace WebSocketTask::Open by ConnectionEstablished (from Ms2ger:task-readystate); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 12195a5c4ac08f1e6eeaf8888c279fea8e5be48a
2015-07-13 02:47:16 -06:00
Ms2ger
e2555f39eb servo: Merge #6609 - Return the parsed URL from WebSocket#url (from Ms2ger:ws-url); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c2dbc4587f70a15f0acefcff214c649d009c2f76
2015-07-13 00:24:35 -06:00
David Winslow
b9c1f245a1 servo: Merge #6529 - Refactor #[jstraceable] to #[derive(JSTraceable)] (from dwins:master); r=Manishearth
fixes #6524.  I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.

Source-Repo: https://github.com/servo/servo
Source-Revision: bbb39082e0f640400546d2084a450a8675820a82
2015-07-01 18:27:40 -06:00
Michael Wu
7512d04e93 servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck
> Here it is.
>
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
>
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
>
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
>
> Generational GC works. SM doesn't work without it.
>
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
>
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
>
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
>
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
>
> This has been tested with the following zeal settings:
>
> GC after every allocation
> JS_GC_ZEAL=2,1
>
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
>
> Verify pre barriers
> JS_GC_ZEAL=4,1
>
> Verify post barriers
> JS_GC_ZEAL=11,1

Source-Repo: https://github.com/servo/servo
Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 16:46:55 -06:00
Jinwoo Song
787247886d servo: Merge #6397 - WebSocket constructor should not panic (from servo:ws-connect); r=Ms2ger
Make an early return when the WebSocket connection fails in the constructor.
Also let the WebSocket connection to be closed when the connection could
not be established.

Fixes #6082.

Source-Repo: https://github.com/servo/servo
Source-Revision: a5d76e4b2c6ae8e2db82fc5156ad1bebf7961f80
2015-06-16 01:47:10 -06:00
Ms2ger
3e4e83073b servo: Merge #6353 - Revert "WebSocket constructor should not panic" (from servo:revert); r=Ms2ger
This reverts commit 877c369e0bc5db4286457be36d015eeb1f0ae2f2.

Source-Repo: https://github.com/servo/servo
Source-Revision: 85d839fb5c6ff023897828b0873caa8972842969
2015-06-12 02:44:37 -06:00
Jinwoo Song
fb5908901f servo: Merge #6338 - WebSocket constructor should not panic (from servo:ws-connect); r=Ms2ger
Make an early return when the WebSocket connection fails in the constructor.
Also let the WebSockect connection to be closed when the connection could
not be established.

Fixes #6082.
Fixes #6086.

Source-Repo: https://github.com/servo/servo
Source-Revision: a3eb253bdce7ed4ad5bcc2c2e7af9cfe01826d99
2015-06-11 05:58:56 -06:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Alexander Putilin
2ba83cc42b servo: Merge #6170 - fixes 6111: WebSocket close event shouldn't be Cancelable (from eleweek:fix-6111); r=Ms2ger
This fixes #6111 , @jdm said that I can work on this issue

Source-Repo: https://github.com/servo/servo
Source-Revision: 16f19b628fa630aab8cfd275a90128da7b59723b
2015-05-24 10:27:41 -05:00
Paul Faria
e75d4a7ceb servo: Merge #6154 - Adding in a missed algorithm step number in the comments (from Nashenas88:websocket-parse-url-typo); r=jdm
This is a really small typo fix for an issue I worked on recently.

Source-Repo: https://github.com/servo/servo
Source-Revision: b84aa41c229a18fa77f4ae815fc0166cb3fbb1b6
2015-05-21 06:59:06 -05:00
Paul Faria
8af3f9a70e servo: Merge #6127 - Throw a SyntaxError if the WebSocket URL can't be parsed. Fix #6061 (from Nashenas88:websockets-invalid-urls); r=Ms2ger
Fix #6061.

Source-Repo: https://github.com/servo/servo
Source-Revision: d869a3c7a8378a77a9a5e86c118115f969ade193
2015-05-20 01:13:57 -05:00
Paul Faria
175f0c39b1 servo: Merge #6094 - Fixed definition of Close and Send in WebSocket.webidl and updated im… (from Nashenas88:websockets-USVString); r=Ms2ger
Fix #6063
Fix #6062
Fixed definition of Close and Send in WebSocket.webidl and updated implementation in websocket.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: fe8760cce206ede76b71ccf3cc94fa37addddfc9
2015-05-20 00:20:06 -05:00
Keith Yeung
476a71a377 servo: Merge #6102 - Made open event in WebScoket not cancelable (fixes #6101) (from KiChjang:websocket-open-event-noncancelable); r=Ms2ger
Fixes #6101

Source-Repo: https://github.com/servo/servo
Source-Revision: d6c3ddd8fd80853b6f679c5a9539ae86587c9b8e
2015-05-17 12:57:58 -05:00
Ms2ger
a13d7d197e servo: Merge #6044 - Various cleanup (from Ms2ger:cleanup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7bda431e61d06113306c3f12d9f4240a58a7d34d
2015-05-14 07:16:42 -05:00
William Galliher
178b16eed9 servo: Merge #5939 - Implement incomplete opening, sending, and closing behaviour for WebSock (from jdm:websocket); r=jdm
...ets using rust-websocket.

Authors:
Shivaji Vidhale <savidhal@ncsu.edu>
William Galliher <wpgallih@ncsu.edu>
Allen Chen <achen4@ncsu.edu>
Rucha Jogaikar <rsjogaik@ncsu.edu>

Source-Repo: https://github.com/servo/servo
Source-Revision: 6d2f70a4fd275510ca90c5da27bb841dd25d39bd
2015-05-05 12:57:48 -05:00
Corey Farwell
6a9953cad1 servo: Merge #5440 - Add links to spec for script::dom structs/methods (from frewsxcv:spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4cf76d65baa8ced9f748b0d5cd632c8852da134d
2015-03-28 19:01:03 -06:00
Ms2ger
3cee792603 servo: Merge #4766 - Import the util crate as util rather than servo_util (from Ms2ger:util); r=Manishearth
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27e0f16407629422b5e047e067d458142372c97e
2015-01-29 05:12:49 -07:00
Matt McCoy
8fca9b5656 servo: Merge #4566 - Fixes #4164 Make Constructor and new functions take GlobalRef by value (from mattnenterprise:globalref-by-value); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7800d98728bfa1375ad8b6a2dac7f2f35603b6d1
2015-01-08 13:12:55 -07:00
Manish Goregaokar
e0c8a4271d servo: Merge #4173 - plugins: Autogeneration of Reflectable; Inheritance lint (from Manishearth:a-more-dom-struct); r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.

Source-Repo: https://github.com/servo/servo
Source-Revision: 56d1b16d1b3a18d5ffa1d9c32562d3b209851711
2014-12-27 22:12:45 -07:00
Glenn Watson
b185394a0f servo: Merge #4405 - Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d (from servo:rustup_20141124); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fbf42c951b2f53d91e2f32f8035484a07ea83493
2014-12-17 18:45:49 -07:00
Michael Booth
8b0b657cb0 servo: Merge #4156 - Updated reflect_dom_object to be passed by value fixes #4122 (from Michael03:master); r=Ms2ger
This fixes issue #4122

Source-Repo: https://github.com/servo/servo
Source-Revision: ed45aa9efd6cf238a83fcae6a772886df61771f7
2014-12-02 05:24:49 -07:00
Hinali Marfatia
fafec6e841 servo: Merge #4096 - Adding a new webidl and websocket.rs file (from servo:websocket); r=Ms2ger
Closes #3813.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62edb842c7d89f2349c4c030139cbf5a927d1eb1
2014-11-25 07:45:42 -07:00