webdriver: Allow Promise for synchronous script execution#41823
Merged
jdm merged 4 commits intoservo:mainfrom Jan 10, 2026
Merged
webdriver: Allow Promise for synchronous script execution#41823jdm merged 4 commits intoservo:mainfrom
jdm merged 4 commits intoservo:mainfrom
Conversation
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
d2122d4 to
b336add
Compare
|
🔨 Triggering try run (#20878861644) for Linux (WPT) |
|
Test results for linux-wpt from try job (#20878861644): Flaky unexpected result (1)
|
|
✨ Try run (#20878861644) succeeded. |
jdm
reviewed
Jan 10, 2026
components/webdriver_server/lib.rs
Outdated
| func_body, | ||
| r#"(async function() {{ | ||
| try {{ | ||
| let result = (function() {{ |
Member
There was a problem hiding this comment.
Should this also be async? I notice one last await test is still failing.
Member
Author
There was a problem hiding this comment.
pid:5072 [2026-01-10T12:55:58Z ERROR script::dom::bindings::error] Error at :5:19 await is only valid in async functions, async generators and modules
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 11, 2026
#41830) Follow-up to #41823. Now that we always execute JS with callback, we can safely remove the obsolete sync script handler. - Rename `ExecuteAsyncScript` to `ExecuteScriptWithCallback` - Remove `ExecuteScript` related logic. - Rewrite async callback wrapper to simplify things. Testing: I expect no change in behaviour. See if WPT tests agree with it. --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a promise is given, it must be honoured.
Testing:
/classic/execute_script/promise.pyfully pass.