Skip to content

Persuading devtools to communicate with the workers; r=jdm - #6829

Merged
bors-servo merged 1 commit into
masterfrom
unknown repository
Aug 1, 2015
Merged

bors-servo merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 29, 2015

Copy link
Copy Markdown

For now, this just gives some purpose to the abandoned receiver and later selects over the two receivers (for #6767). (oh wait, forgot to check the local build - there are still a few errors)...

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 29, 2015
@highfive

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon.

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@jdm

jdm commented Jul 29, 2015

Copy link
Copy Markdown
Member

Good start! Now we just need to fix the build errors ;)
-S-awaiting-review +S-needs-code-changes


Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


components/script/devtools.rs, line 28 [r1] (raw file):
Let's file an issue about this and add the issue number here.


components/script/dom/dedicatedworkerglobalscope.rs, line 114 [r1] (raw file):
This should be a DevtoolScriptControlMsg receiver instead, since it's going to be receiving messages sent by the devtools.


components/script/dom/dedicatedworkerglobalscope.rs, line 233 [r1] (raw file):
This should use unwrap here, or it will break in cases where we don't use the devtools.


components/script/dom/dedicatedworkerglobalscope.rs, line 238 [r1] (raw file):
Use an if let on the devtools_port Option value.


components/script/dom/dedicatedworkerglobalscope.rs, line 246 [r1] (raw file):
We shouldn't use unwrap on these calls; we can use Ok/Err in the match still.


components/script/dom/dedicatedworkerglobalscope.rs, line 254 [r1] (raw file):
// TODO: process messages from the devtools as appropriate


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 29, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jul 29, 2015
@ghost

ghost commented Jul 29, 2015

Copy link
Copy Markdown
Author

This still requires some code changes...

@metajack metajack added the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Jul 29, 2015
@jdm

jdm commented Jul 29, 2015

Copy link
Copy Markdown
Member

-S-awaiting-review


Reviewed 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


components/script/dom/bindings/trace.rs, line 48 [r2] (raw file):
This change seems out of place without an accompanying change.


components/script/dom/dedicatedworkerglobalscope.rs, line 17 [r2] (raw file):
This seems to be unused.


components/script/dom/dedicatedworkerglobalscope.rs, line 233 [r1] (raw file):
Sorry, shouldn't.


Comments from the review on Reviewable.io

@jdm jdm removed the S-awaiting-review There is new code that needs to be reviewed. label Jul 29, 2015
@ghost

ghost commented Jul 30, 2015

Copy link
Copy Markdown
Author

@jdm That was not meant to be reviewed...

@jdm

jdm commented Jul 30, 2015

Copy link
Copy Markdown
Member

Sorry, I tend to leap on things labelled "S-awaiting-review".

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jul 30, 2015
@ghost

ghost commented Jul 31, 2015

Copy link
Copy Markdown
Author

@jdm A few questions regarding my changes (and r?)...


Review status: 1 of 7 files reviewed at latest revision, 10 unresolved discussions, all commit checks successful.


components/script/devtools.rs, line 163 [r3] (raw file):
I guess I'm wrong here, because the worker has no actual use in this function.


components/script/dom/dedicatedworkerglobalscope.rs, line 193 [r3] (raw file):
I decided to unwrap here because there's no reason for devtools_ipc_port to come up with an error, and that's because we're just sending a newly created ipc::channel.


components/script/dom/dedicatedworkerglobalscope.rs, line 255 [r3] (raw file):
I'm not sure how we should go for an error, because if I leave it with a debug!, then the loop never stops and the code below becomes unreachable. That's why I decided to break (for both the errors).


components/script/dom/dedicatedworkerglobalscope.rs, line 271 [r3] (raw file):
Am I right that the pipeline ID won't have any use in the worker?


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 31, 2015
@jdm

jdm commented Jul 31, 2015

Copy link
Copy Markdown
Member

Great! Looks like it will still fail when creating a worker and the devtools aren't attached, so that's important to fix :)
-S-awaiting-review +S-needs-code-changes


Reviewed 6 of 6 files at r3.
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


components/script/devtools.rs, line 32 [r3] (raw file):
Add this method to GlobalRef and use the ScriptHelpers trait to call it on both the window and worker: http://mxr.mozilla.org/servo/source/components/script/dom/window.rs#615


components/script/devtools.rs, line 163 [r3] (raw file):
It actually means that we should add this functionality to GlobalRef as well as WorkerGlobalScope (just duplicate http://mxr.mozilla.org/servo/source/components/script/dom/window.rs#141). We can either do that here or file a follow easy issue.


components/script/dom/dedicatedworkerglobalscope.rs, line 193 [r3] (raw file):
In that case we shouldn't be taking an Option value :)


components/script/dom/dedicatedworkerglobalscope.rs, line 241 [r1] (raw file):
Sorry, I obviously wasn't looking at the model code in script_task.rs when I made this comment :/


components/script/dom/dedicatedworkerglobalscope.rs, line 255 [r3] (raw file):
We just unwrap result of recv() in the script task. I'd say follow that example.


components/script/dom/dedicatedworkerglobalscope.rs, line 271 [r3] (raw file):
That is correct.


Comments from the review on Reviewable.io

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jul 31, 2015
@ghost

ghost commented Jul 31, 2015

Copy link
Copy Markdown
Author

@jdm I've fixed the conflicts. r?

@jdm

jdm commented Jul 31, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+
-S-awaiting-review +S-awaiting-merge


Reviewed 5 of 5 files at r4, 4 of 4 files at r5.
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


components/script/dom/workerglobalscope.rs, line 62 [r4] (raw file):
Not processing, but sending them to the devtools server.


components/script/dom/workerglobalscope.rs, line 66 [r4] (raw file):
There's an extra 's' on "exist".


Comments from the review on Reviewable.io

@jdm jdm added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 31, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 8fc70c0 has been approved by SimonSapin

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 8fc70c0 with merge 768a5c8...

bors-servo pushed a commit that referenced this pull request Aug 1, 2015
Persuading devtools to communicate with the workers; r=jdm

For now, this just gives some purpose to the abandoned receiver and later selects over the two receivers (for #6767). (oh wait, forgot to check the local build - there are still a few errors)...

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6829)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux2

@ghost

ghost commented Aug 1, 2015

Copy link
Copy Markdown
Author

Hmm, there's something wrong with the script_task. All the tests in the log show a few lines of script_task in their backtrace. And, the crashes are a result of an unwrap somewhere.

@ghost ghost closed this Aug 1, 2015
@ghost ghost reopened this Aug 1, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 8fc70c0 with merge 3bcb4a1...

bors-servo pushed a commit that referenced this pull request Aug 1, 2015
Persuading devtools to communicate with the workers; r=jdm

For now, this just gives some purpose to the abandoned receiver and later selects over the two receivers (for #6767). (oh wait, forgot to check the local build - there are still a few errors)...

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6829)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac1

@ghost

ghost commented Aug 1, 2015

Copy link
Copy Markdown
Author

@bors-servo I know. I'm just waiting for @jdm :P

@jdm

jdm commented Aug 1, 2015

Copy link
Copy Markdown
Member

Guh, I was sure I left a comment about this at one point and then couldn't find it in reviewable: https://github.com/servo/servo/pull/6829/files#diff-91ad86111bfa2f963e7769c3edf5a28fR100

This is broken in the case when we don't launch with devtools. I thought I asked you to test this case?

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 1, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Aug 1, 2015
@jdm

jdm commented Aug 1, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+
-S-awaiting-review +S-awaiting-merge


Reviewed 2 of 2 files at r6, 2 of 2 files at r7.
Review status: all files reviewed at latest revision, 4 unresolved discussions, all commit checks successful.


Comments from the review on Reviewable.io

@jdm jdm added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 1, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 79b6540 has been approved by jdm

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 79b6540 with merge effb17b...

bors-servo pushed a commit that referenced this pull request Aug 1, 2015
Persuading devtools to communicate with the workers; r=jdm

For now, this just gives some purpose to the abandoned receiver and later selects over the two receivers (for #6767). (oh wait, forgot to check the local build - there are still a few errors)...

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6829)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux1, linux2, linux3, mac1, mac2, mac3

@bors-servo
bors-servo merged commit 79b6540 into servo:master Aug 1, 2015
@ghost
ghost deleted the devtools branch August 1, 2015 16:58
bors-servo pushed a commit that referenced this pull request Aug 20, 2015
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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants