Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSetting a devtools timeline marker may fail, due to pipeline lookup failure #13728
Conversation
…ailure.
highfive
commented
Oct 12, 2016
highfive
commented
Oct 12, 2016
|
r? @fitzgen |
|
r=me with question about whether @bors-servo r+ (is this still needed now that you can mark approval in github pull request reviews?) |
| @@ -190,6 +190,7 @@ pub struct AutoMargins { | |||
| } | |||
|
|
|||
| /// Messages to process in a particular script thread, as instructed by a devtools client. | |||
| /// TODO: better error handling, e.g. if pipeline id lookup fails? | |||
This comment has been minimized.
This comment has been minimized.
| window.set_devtools_timeline_markers(marker_types, reply); | ||
| reply: IpcSender<Option<TimelineMarker>>) { | ||
| match context.find(pipeline) { | ||
| None => reply.send(None).unwrap(), |
This comment has been minimized.
This comment has been minimized.
fitzgen
Oct 12, 2016
Member
What use does the receiver have for a None? What if we only sent the timeline marker if we find the pipeline, and therefore still have IpcSender<TimelineMarker> instead of introducing an Option in there?
This comment has been minimized.
This comment has been minimized.
fitzgen
Oct 12, 2016
Member
Yeah, it seems to me that the Option isn't carrying its weight since the receiver is giving up as soon as it gets a None in the while let Ok(Some(...)) = ... loop.
|
@bors-servo r+ |
|
@bors-servo r=fitzgen |
|
|
|
I suppose so, not 100% clear what the original issue's intent is.
Ok, fine by me. |
…il, r=fitzgen Setting a devtools timeline marker may fail, due to pipeline lookup failure <!-- Please describe your changes on the following line: --> Allow setting a devtools timeline marker to fail, due to pipeline lookup failure. This is part of tidying up pipeline lookup. cc @jdm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because I'm not sure how to test devtools. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13728) <!-- Reviewable:end -->
|
|
asajeffrey commentedOct 12, 2016
•
edited by larsbergstrom
Allow setting a devtools timeline marker to fail, due to pipeline lookup failure. This is part of tidying up pipeline lookup.
cc @jdm
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is