Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Michael Wu
941f7dc04b
Move EventTargetTypeId/NodeTypeId to DOMClass
2015-09-12 01:09:46 +02:00
Corey Farwell
3a1d140ab5
Enforce linking to spec for method implementations via macros
2015-08-31 21:02:23 -04:00
erneyja
8d4ed7292d
Implemented onerror event handler for AbstractWorker
2015-08-30 11:37:16 -04:00
benshu
1e6a2f08fc
Time distribution across script event categories.
2015-08-28 00:52:41 +02:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
Anthony Ramine
c831c2c0a5
Remove helper traits
...
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:02 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
bors-servo
0466766b2c
Auto merge of #7238 - Wafflespeanut:workerglobal, r=Ms2ger
...
Improved field names for devtools-related channels...
(for #6924 ) - I took this because the confusion was actually caused by me while working on #6829
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7238 )
<!-- Reviewable:end -->
2015-08-20 08:17:30 -06:00
Ravi Shankar
46195f29df
Improved field names for devtools-related channels; r=Ms2ger
2015-08-20 19:38:23 +05:30
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Ravi Shankar
89153116fb
Splitting ScriptMsg into various enums; r=jdm
2015-08-15 02:00:48 +05:30
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
Ms2ger
6b61564f6d
Pass WorkerGlobalScopeInit to DedicatedWorkerGlobalScope::run_worker_scope.
2015-08-03 19:54:04 +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
Bogdan Cuza
233a769c67
Add spec links
2015-07-28 13:28:41 +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
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
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -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
a862479ca8
Remove as_slice() calls from script.
2015-04-26 10:52:55 +02:00
Corey Farwell
8b08c6f43f
Don't link to specific WHATWG multipage page
...
"Links to the multipage version of the specification are unfortunately
likely to break over time."
-- https://html.spec.whatwg.org/multipage/asefij.html
This commit removes all references to the specific pages when viewing
WHATWG using multipage mode. I went through all these links and they
redirect fine.
Regex used to generate this commit:
`s_whatwg.org/multipage/.*#_whatwg.org/multipage/#_g`
2015-04-16 22:39:25 -04:00
Corey Farwell
5eaa922045
Update WHATWG links to use HTTPS
...
Extracted this out of #5649
This commit was created with the following commands:
```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07: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
Corey Farwell
46f14449d0
Add links to spec for script::dom structs/methods
2015-03-28 20:04:30 -04:00
Thiago Pontes
1244f9e016
Notify devtools about new worker globals
2015-03-27 16:04:53 -03: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
bors-servo
1ad9c678f7
auto merge of #4931 : KiChjang/servo/worker-error-event, r=jdm
...
Fixes #4511
2015-02-21 07:39:51 -07:00
Keith Yeung
61086d6ee5
Worker now fires errorevent when url fetching failed, fixes #4511
2015-02-21 21:51:35 +08:00
Ms2ger
03408d69fb
Remove the unused Worker::refcount field.
2015-02-20 14:45:46 +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
a71ccfabef
Use snake case in Worker.
2015-01-30 16:15:46 +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
b2f40b9873
Make Runnable::handler take self by value.
...
With my thanks to kimundi and eddyb for their help in making this approach
work.
2015-01-10 17:47:18 +01: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
Matt McCoy
85df7f0d6f
Fixes #4164 Make Constructor and new functions take GlobalRef by value
2015-01-07 18:52:41 -05:00
Bharath M R
50d53c9fa3
Issue 4497: Converts WorkerPostMessage into a Runnable.
...
Implements WorkerMessage handler implementing Runnable trait.
2015-01-04 12:26:27 +05:30
Ms2ger
6077ed0ce8
Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency.
2015-01-01 20:38:04 +01:00
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Josh Matthews
9a7cd31134
Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed.
2014-12-29 13:53:49 -05:00
Josh Matthews
2f059c15e7
Allow refcounting arbitrary DOM objects in concert with the GC to enable safe, asynchronous/cross-task references to pinned objects.
2014-12-29 13:53:48 -05:00