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 upReport panics using the top-level frame id rather than the pipeline id #14173
Conversation
highfive
commented
Nov 11, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Nov 11, 2016
|
I learned the hard way not to cc people or mention issues in the PR summary... This is part of fixing #633, hopefully the last remaining place that script threads assume there's a root pipeline. cc @jdm @ConnorGBrewster @paulrouget |
b74fe56
to
3ee4354
|
r? @paulrouget |
3ee4354
to
568cb37
|
|
568cb37
to
c228a4c
|
@paulrouget? This is blocking fixing #633, so it would be nice to land it! |
| warn!("Mozbrowser error after root pipeline closed."); | ||
| match self.frames.get(&top_level_frame_id) { | ||
| None => warn!("Mozbrowser error after top-level frame closed."), | ||
| Some(frame) => match self.pipelines.get(&frame.current.pipeline_id) { |
This comment has been minimized.
This comment has been minimized.
paulrouget
Nov 21, 2016
Contributor
Are we 100% sure it's the current pipeline that crashed?
As in, the pipeline we get in handle_send_error, is it always the current pipeline of that frame?
If not, we should pass pipeline_id to handle_panic and trigger_mozbrowsererror, not the frame_id.
This comment has been minimized.
This comment has been minimized.
asajeffrey
Nov 21, 2016
Author
Member
In the case of handle_send_error, all we know is that we tried sending to a pipeline which had closed its constellation channel (most likely because the pipeline exited). We could try being more precise in this case, but most panics come in via as log messages, where all we get is the frame id, not the pipeline id.
This comment has been minimized.
This comment has been minimized.
paulrouget
Nov 21, 2016
Contributor
Re-reading that code. I was confused about using frame.current, which is only used to get the parent frame (not to identify the failing pipeline).
This comment has been minimized.
This comment has been minimized.
asajeffrey
Nov 21, 2016
Author
Member
Yes, this is an artefact of the parent info being stored in the pipeline rather than the frame, where it should be. At some point we might fix that.
|
@bors-servo r+ |
|
|
|
Ah, you're not on the blessed list? |
|
@bors-servo r=paulrouget delegate=paulrouget |
|
|
|
|
|
Thanks! |
…e-id, r=paulrouget Report panics using the top-level frame id rather than the pipeline id <!-- Please describe your changes on the following line: --> At the moment, we report panics from script and layout using the root pipeline id. Once we are sharing more script threads, there won't be a root pipeline id any more. The plan is only to share script threads in the same tab, so there will be a top-level frame id that all the pipelines have in common. This PR reports panics using that top-level frame id. This mostly makes a difference to the browser API: rather than targeting a `mozbrowsererror` event at the root iframe of the script thread that panicked, it targets it at the containing mozbrowser iframe. --- <!-- 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 we don't test crash reporting <!-- 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/14173) <!-- Reviewable:end -->
|
|
asajeffrey commentedNov 11, 2016
•
edited by larsbergstrom
At the moment, we report panics from script and layout using the root pipeline id. Once we are sharing more script threads, there won't be a root pipeline id any more. The plan is only to share script threads in the same tab, so there will be a top-level frame id that all the pipelines have in common. This PR reports panics using that top-level frame id.
This mostly makes a difference to the browser API: rather than targeting a
mozbrowsererrorevent at the root iframe of the script thread that panicked, it targets it at the containing mozbrowser iframe../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is