Commit graph

85 commits

Author SHA1 Message Date
Ms2ger
bf3ecaa901 Create a run_with_memory_reporting method to reduce the boilerplate associated with registering memory reporters. 2015-08-06 15:24:27 +02:00
Ms2ger
95763a87b0 Move the worker script evaluation into a method on WorkerGlobalScope. 2015-08-04 18:16:07 +02:00
Ms2ger
11ea299105 Remove the parent_sender_for_reporter local from DedicatedWorkerGlobalScope::run_worker_scope. 2015-08-04 18:16:06 +02:00
Ms2ger
bc97b421d2 Register the worker memory reporter outside the _ar scope.
The comment that claims it needs to be in that scope appears to be incorrect.
2015-08-04 18:15:58 +02:00
Ms2ger
d19ddfe6f3 Use a while let loop for the DedicatedWorkerGlobalScope event loop. 2015-08-04 16:44:18 +02:00
Ms2ger
5e1be29743 Move the event processing in the DedicatedWorkerGlobalScope event loop into its own function. 2015-08-04 16:41:20 +02:00
Ms2ger
4f8827321c Rename DedicatedWorkerGlobalScope::handle_event to handle_script_event. 2015-08-04 16:37:04 +02:00
Ms2ger
17985e5296 Split out a receive_event method from the DedicatedWorkerGlobalScope event loop. 2015-08-04 16:32:54 +02:00
Ms2ger
6b61564f6d Pass WorkerGlobalScopeInit to DedicatedWorkerGlobalScope::run_worker_scope. 2015-08-03 19:54:04 +02:00
Ms2ger
0da0fcbe9b Implement a WorkerGlobalScopeInit struct to pass arguments to WorkerGlobalScope::new_inherited more easily. 2015-08-03 19:53:57 +02:00
Ms2ger
bd04cecceb Take WorkerGlobalScope's worker_id out of its Option.
Unsurprisingly, every worker has an id, so there is no need to wrap it in an
Option.
2015-08-03 18:28:48 +02:00
Harrison G
49c5408e65 Fixes issue #6866 2015-08-02 16:55:42 -04:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
9c9d7dc93b net: Make most of the resource task messages serializable. 2015-07-31 11:27:49 -07:00
Ms2ger
741aae709b Simplify AutoWorkerReset::new. 2015-07-28 16:55:44 +02:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
Patrick Walton
f10c076180 profile: Make the time and memory profilers run over IPC.
Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new
threads.
2015-07-24 17:02:17 -07:00
Ms2ger
9a143bb67e Remove leftover debug println. 2015-07-20 13:12:20 +02:00
Nicholas Nethercote
7429b90e02 Wire up the JS engine's memory reporting.
SpiderMonkey provides an extremely fine-grained breakdown of memory
usage, but for Servo we aggregate the measurements into a small number
of coarse buckets, which seems appropriate for the current level of
detail provided by Servo's memory profiler. Sample output:
```
|   10.99 MiB -- pages
|       7.75 MiB -- url(http://html5demos.com/worker)
|          4.63 MiB -- js
|             2.00 MiB -- gc-heap
|                0.94 MiB -- decommitted
|                0.92 MiB -- used
|                0.09 MiB -- unused
|                0.05 MiB -- admin
|             1.44 MiB -- malloc-heap
|             1.19 MiB -- non-heap
|          [...]
|       3.24 MiB -- url(http://html5demos.com/js/worker-cruncher.js)
|          3.24 MiB -- js
|             1.17 MiB -- malloc-heap
|             1.06 MiB -- non-heap
|             1.00 MiB -- gc-heap
|                0.69 MiB -- used
|                0.19 MiB -- decommitted
|                0.09 MiB -- unused
|                0.03 MiB -- admin
```
Most of the changes are plumbing to get the script and worker tasks
communicating with the memory profiler task.
2015-07-15 21:58:20 -07:00
David Zbarsky
bc1eb97671 Remove some more unnecessary let bindings 2015-07-14 14:48:16 -04:00
bors-servo
be9d60664d Auto merge of #6510 - mintern:fix-worker-redirect-location, r=Ms2ger
Update Worker location for redirects

Fixes #4146

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6510)
<!-- Reviewable:end -->
2015-07-02 03:28:29 -06:00
Brandon Mintern
0a3981cdc9 Update Worker location for redirects
Fixes #4146
2015-07-02 11:25:33 -04:00
David Winslow
4cf46bff2d Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
2015-07-01 18:27:06 -04:00
Michael Wu
b7301ca06c Fix some warnings caused by the SM upgrade 2015-06-19 22:07:08 -04:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
Ms2ger
cfe240d117 Remove reference counting from the Runtime implementation. 2015-05-10 18:09:09 +02:00
Ms2ger
9abe47b76f Move evaluate_script to Runtime. 2015-05-10 18:01:09 +02:00
Ms2ger
0f495afda6 Use Runtime in WorkerGlobalScope and DedicatedWorkerGlobalScope. 2015-05-10 17:16:17 +02:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Anthony Ramine
7197052c0d Uniformise root() methods
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Ms2ger
04b532e1fb Store a Runtime object in ScriptTask. 2015-04-22 11:17:09 +02:00
Josh Matthews
01e66035ff Implement sync XHR by creating and spinning on-demand event loops. 2015-04-16 11:46:40 -04:00
Corey Farwell
cc4a64e1fe Add/update comments with links to spec
Extracted out of #5649

* add more hyperlinks to associated specification for structs/methods
* follow redirects and update links
* replace broken links
* removal of WHATWG multipage page name since the page name is not
  guaranteed to be stable
2015-04-14 18:03:13 -04:00
thiagopnts
ea5c702f4a Add devtools_chan method to GlobalRef and make new globals notifications work with nested workers
fixup! Add devtools_chan method to GlobalRef and make new globals notifications work with nested workers

fixup! Add devtools_chan method to GlobalRef and make new globals notifications work with nested workers
2015-04-06 00:54:16 -03:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Avi Weinstock
7803f2b216 Subsume ScriptMsg::WorkerDispatchErrorEvent into ScriptMsg::RunnableMsg via introduction of Worker::WorkerErrorHandler (Closes #5171). 2015-03-09 09:24:40 -04:00
Prabhjyot Singh Sodhi
cc48797999 Fixing Intermittent failure in pages with timers
Fixes #4923
2015-02-22 00:27:16 +05:30
Keith Yeung
61086d6ee5 Worker now fires errorevent when url fetching failed, fixes #4511 2015-02-21 21:51:35 +08:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00
Shreya Bastikar
7309f2a428 Support firing error events from a dedicated worker at the containing worker object. 2015-02-05 21:42:10 +00:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
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.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
14ff55443f Implement StructuredCloneData::read. 2015-01-10 16:33:26 +01:00
Ms2ger
5978b21abf Implement StructuredCloneData::write. 2015-01-10 16:33:26 +01:00
Ms2ger
57aaa60fa5 Create a StructuredCloneData struct to encapsulate the result of a structured clone. 2015-01-10 16:33:25 +01:00
Ms2ger
edc1d89251 Deny unsafe blocks in script.
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00