Repository navigation
Redesign ScriptMsg to be more specific to DOMManipulationTaskSource - #9217
Conversation
ff54a69 to
9bb1a2e
Compare
|
r? @jdm |
There was a problem hiding this comment.
This is unimplemented because I have no idea how the Worker handles script channels.
|
In my own rebased PRs I've been using the |
|
My main objection with these changes as they stand is that the DocumentLoadsComplete and SendStorageNotification messages are now divorced from the related code, and the implementation of document loading is already complex. It may be worth reinstating the runnable concept for the DOM manipulation task source in order to accommodate this. |
4759e53 to
2c4055e
Compare
|
Re-added the Runnable stuff, but with a twist. I dislike the fact that we are making a generic RunnableMsg for all different kinds of tasks, so instead I have created new messages that better reflect what the purpose of each Runnable is. |
|
☔ The latest upstream changes (presumably #9214) made this pull request unmergeable. Please resolve the merge conflicts. |
0596b11 to
67d0b5d
Compare
86c871f to
1c62bab
Compare
|
☔ The latest upstream changes (presumably #9257) made this pull request unmergeable. Please resolve the merge conflicts. |
1c62bab to
3a3d012
Compare
|
☔ The latest upstream changes (presumably #9261) made this pull request unmergeable. Please resolve the merge conflicts. |
0323f1a to
2f3c96b
Compare
|
As an extension of my earlier request about the runnables, I think we can do better. While reading through these changes, I wasn't thrilled by all of the data definitions and business logic moving into dom_manipulation.rs, because it separates the places that actually implement parts of the specification from each other. I propose the variants of DOMManipulationTaskMsg be simple wrappers around inner types that are defined in the original modules, so all dom_manipulation.rs is in charge of doing is collecting variants and invoking variant-specific processing code that it doesn't need to know anything about. It's like what you've done for StorageNotificationRunnable & co. but I don't believe any traits are necessary. |
|
Just to be sure, |
|
Yes, for common actions like firing a simple event we can stick with general ones like that. |
2f3c96b to
d7711d9
Compare
|
Haven't addressed |
d321db2 to
5dad80b
Compare
|
As soon as it passes Travis CI, I believe this is ready to be reviewed. |
5dad80b to
599c9cc
Compare
|
-S-awaiting-review +S-needs-code-changes Reviewed 1 of 15 files at r1, 16 of 17 files at r2. components/script/dom/worker.rs, line 149 [r2] (raw file): components/script/dom/bindings/global.rs, line 149 [r2] (raw file): components/script/task_source/dom_manipulation.rs, line 56 [r2] (raw file): components/script/task_source/dom_manipulation.rs, line 68 [r2] (raw file): Comments from the review on Reviewable.io |
|
☔ The latest upstream changes (presumably #9858) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Great work! There's only one issue that still needs to be addressed, as far as I can tell. I would expect several tests in Reviewed 4 of 4 files at r3, 3 of 3 files at r4. Comments from the review on Reviewable.io |
|
Yeah... I'll have to figure out a way to fix that last remaining issue. |
Use DOMManipulationTaskSource whenever possible
|
Comments addressed. |
|
@bors-servo: r+ Reviewed 2 of 2 files at r5. Comments from the review on Reviewable.io |
|
📌 Commit 3f2cbf0 has been approved by |
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor |
This is a large-ish PR that contains the following:
components/script/calledtask_source, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones.DOMManipulationTaskMsgwhich eliminates some usage ofRunnables to fire events. Instead, they send event information to theDOMManipulationTaskSourceand lets theScriptTaskhandle all the event firing.fn script_chan, since I can't think of any other way to giveTrustedvalues an appropriate sender.DOMManipulationTaskSourcePartial #7959