Skip to content

Report exceptions for async script executions to webdriver - #27041

Merged
jdm merged 3 commits into
servo:mainfrom
jdm:webdriver-fixes
Apr 25, 2025
Merged

jdm merged 3 commits into
servo:mainfrom
jdm:webdriver-fixes

Conversation

@jdm

@jdm jdm commented Jun 22, 2020 •

Copy link
Copy Markdown
Member

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

Specification:


@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/webdriver_handlers.rs, components/script/dom/window.rs, components/script/dom/webidls/Window.webidl, components/webdriver_server/lib.rs
  • @jgraham: components/webdriver_server/lib.rs
  • @KiChjang: components/script/webdriver_handlers.rs, components/script/dom/window.rs, components/script/dom/webidls/Window.webidl, components/script_traits/webdriver_msg.rs

@highfive

Copy link
Copy Markdown

warning Warning warning

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 22, 2020
@jdm
jdm force-pushed the webdriver-fixes branch from f1120a7 to 126474e Compare June 22, 2020 20:28
@jdm

jdm commented Jun 22, 2020

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 126474e with merge 8f2a96a...

bors-servo added a commit that referenced this pull request Jun 22, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 22, 2020
@jdm
jdm force-pushed the webdriver-fixes branch from 126474e to eeb4871 Compare June 23, 2020 03:43
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Jun 23, 2020
@jdm

jdm commented Jun 23, 2020

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

bors-servo added a commit that referenced this pull request Jun 23, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit eeb4871 with merge 278988b...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 23, 2020
@jdm

jdm commented Jun 23, 2020

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit a2fd6a3 with merge e09cac8...

bors-servo added a commit that referenced this pull request Jun 23, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 23, 2020
@jdm

jdm commented Jun 23, 2020

Copy link
Copy Markdown
Member Author

@bors-servo try=wpt

bors-servo added a commit that referenced this pull request Jun 23, 2020
Report exceptions for async script executions to webdriver

Improving the accuracy of the async script execution for our webdriver implementation allows us to run many more webdriver tests without timeouts, which should help with web-platform-tests/wpt#24257.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27036 and #27035 and #27031.
- [x] There are tests for these changes
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit b2a229c with merge a2615e2...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 23, 2020
Comment thread components/webdriver_server/lib.rs Resolved

@Manishearth Manishearth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems okay

@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jul 19, 2020
@jdm
jdm force-pushed the webdriver-fixes branch from b2a229c to c4ec938 Compare April 23, 2025 12:12
@jdm
jdm requested review from gterzian and mrobinson as code owners April 23, 2025 12:12
@jdm jdm removed S-awaiting-review There is new code that needs to be reviewed. S-tests-failed The changes caused existing tests to fail. S-needs-rebase There are merge conflict errors. labels Apr 23, 2025
@jdm
jdm force-pushed the webdriver-fixes branch from c4ec938 to 9cdeba7 Compare April 23, 2025 12:14
@jdm

jdm commented Apr 23, 2025 •

Copy link
Copy Markdown
Member Author

These changes are rebased, and contain a couple additional commits to fix new errors exposed by the new exceptions. @yezhizhen Would you like to review this?

Relevant tests:

@jdm
jdm force-pushed the webdriver-fixes branch from 9cdeba7 to db5da79 Compare April 23, 2025 12:18
@jdm
jdm force-pushed the webdriver-fixes branch from db5da79 to abd5822 Compare April 23, 2025 13:23

@yezhizhen yezhizhen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, cyclic.py tests that cyclic references correctly throw exception, so that we won't have infinite loop when deserializing and TIMEOUT?

  • This PR added seen according to Clone an object to support above feature.
  • fn WebdriverException is defined to catch throw exception from also-modified script. That's why test_object_to_json_exception is passing now.

I am not familiar with codegen and can_gc. But rest looks good!

@jdm

jdm commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

Yep!

@jdm
jdm added this pull request to the merge queue Apr 25, 2025
Merged via the queue into servo:main with commit dc0c067 Apr 25, 2025
@jdm
jdm deleted the webdriver-fixes branch April 25, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants