Skip to content

Removed some sources of panic from script thread.#11695

Merged
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:script-thread-dont-panic
Jun 24, 2016
Merged

Removed some sources of panic from script thread.#11695
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:script-thread-dont-panic

Conversation

@asajeffrey
Copy link
Copy Markdown
Contributor

@asajeffrey asajeffrey commented Jun 9, 2016

This PR needs some thought!

It removes some sources of panic from script_thread.rs, caused by pipeline lookup failure. It's incomplete, as there are some uses of get_browsing_context elsewhere in the code.



This change is Reviewable

@asajeffrey asajeffrey added A-content/script Related to the script thread I-panic Servo encounters a panic. labels Jun 9, 2016
@highfive
Copy link
Copy Markdown

highfive commented Jun 9, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/script_thread.rs

@highfive
Copy link
Copy Markdown

highfive commented Jun 9, 2016

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 9, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

cc @Ms2ger, @Manishearth and @mbrubeck

@bors-servo
Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11680) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jun 11, 2016
@asajeffrey asajeffrey force-pushed the script-thread-dont-panic branch from ae665c8 to 3c75ac9 Compare June 12, 2016 16:38
@asajeffrey
Copy link
Copy Markdown
Contributor Author

Rebased.

@asajeffrey asajeffrey removed the S-needs-rebase There are merge conflict errors. label Jun 12, 2016
@cbrewster cbrewster mentioned this pull request Jun 19, 2016
5 tasks
@Ms2ger
Copy link
Copy Markdown
Contributor

Ms2ger commented Jun 22, 2016

I feel like this is too ad-hoc in places. I think in general when we get a message with a pipeline id, we should immediately get the browsing context and return, before doing anything else.

Also, why don't we use find_child_context everywhere? That would also avoid a panic when the root browsing context is gone.


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/script/script_thread.rs, line 1089 [r2] (raw file):

        if let Some(ref context) = self.find_child_context(id) {
            let window = match context.find(id) {
                Some(browsing_context) => browsing_context.active_window(),

This is the same as context.


Comments from Reviewable

@asajeffrey
Copy link
Copy Markdown
Contributor Author

I'm not sure why this is more ad hoc than what we had before: I just replaced all uses of get_browsing_context(&context,id) by a match on context.find(id).

OK, I see what you mean about using find_child_context rather than context.find on the root context. Is that a separate PR?


Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/script/script_thread.rs, line 1089 [r2] (raw file):

Previously, Ms2ger wrote…

This is the same as context.

Fixed.

Comments from Reviewable

@Ms2ger
Copy link
Copy Markdown
Contributor

Ms2ger commented Jun 24, 2016

r+ after squash, I guess.

@asajeffrey asajeffrey force-pushed the script-thread-dont-panic branch from b54a37c to 9da00e2 Compare June 24, 2016 13:18
@asajeffrey
Copy link
Copy Markdown
Contributor Author

@Ms2ger you don't need to sound so excited :)
@bors-servo r=Ms2ger

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 9da00e2 has been approved by Ms2ger

@highfive highfive 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 Jun 24, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 9da00e2 with merge 654104e...

bors-servo pushed a commit that referenced this pull request Jun 24, 2016
Removed some sources of panic from script thread.

<!-- Please describe your changes on the following line: -->
**This PR needs some thought!**

It removes some sources of panic from script_thread.rs, caused by pipeline lookup failure. It's incomplete, as there are some uses of `get_browsing_context` elsewhere in the code.

---
<!-- 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 fix #11693 and #11685 (and probably some other intermittents)
- [X] These changes do not require tests because it is fixing intermittent panic

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11695)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 24, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

@bors-servo retry

  • etc/ci/manifest_changed.sh failing for some reason.

@asajeffrey
Copy link
Copy Markdown
Contributor Author

@bors-servo retry

@bors-servo
Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, arm32, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only arm64, linux-dev, linux-rel...

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - arm64

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 24, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

@bors-servo retry

  • etc/ci/manifest_changed.sh

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 9da00e2 with merge 66d508d...

bors-servo pushed a commit that referenced this pull request Jun 24, 2016
Removed some sources of panic from script thread.

<!-- Please describe your changes on the following line: -->
**This PR needs some thought!**

It removes some sources of panic from script_thread.rs, caused by pipeline lookup failure. It's incomplete, as there are some uses of `get_browsing_context` elsewhere in the code.

---
<!-- 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 fix #11693 and #11685 (and probably some other intermittents)
- [X] These changes do not require tests because it is fixing intermittent panic

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11695)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 24, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 24, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 9da00e2 with merge 0427112...

bors-servo pushed a commit that referenced this pull request Jun 24, 2016
Removed some sources of panic from script thread.

<!-- Please describe your changes on the following line: -->
**This PR needs some thought!**

It removes some sources of panic from script_thread.rs, caused by pipeline lookup failure. It's incomplete, as there are some uses of `get_browsing_context` elsewhere in the code.

---
<!-- 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 fix #11693 and #11685 (and probably some other intermittents)
- [X] These changes do not require tests because it is fixing intermittent panic

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11695)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 24, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - android

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 24, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

@bors-servo retry

(Finally got rout to submitting an issue for that one.)

@bors-servo
Copy link
Copy Markdown
Contributor

⚡ Previous build results for arm64, linux-dev, mac-dev-unit, windows are reusable. Rebuilding only android, arm32, linux-rel, mac-rel-css, mac-rel-wpt...

@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 24, 2016
@asajeffrey
Copy link
Copy Markdown
Contributor Author

@bors-servo
Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel, mac-rel-css...

@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-content/script Related to the script thread I-panic Servo encounters a panic. S-tests-failed The changes caused existing tests to fail.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent CRASH in /html/semantics/embedded-content/the-iframe-element/change_parentage.html

4 participants