mirror of
https://github.com/servo/servo.git
synced 2025-09-19 11:20:09 +01:00
webdriver: Reuse JSValue
as WebDriverJSValue
(#38751)
After #38748, `WebDriverJSValue` is almost same as `JSValue`. Now we turn "potentially merge into one in the future" into reality. The only thing we should be cautious is to properly serialize `WebFrame`, `WebWindow`, `WebElement` for WebDriver. Testing: No regression. Some error is fixed previously by #38709 which didn't update test :) Binary size reduced by 134KB. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
7471ad7730
commit
ec5872992b
7 changed files with 57 additions and 101 deletions
|
@ -20,10 +20,9 @@ use servo::webrender_api::ScrollLocation;
|
|||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize};
|
||||
use servo::{
|
||||
AllowOrDenyRequest, AuthenticationRequest, FilterPattern, FocusId, FormControl,
|
||||
GamepadHapticEffectType, KeyboardEvent, LoadStatus, PermissionRequest, Servo, ServoDelegate,
|
||||
ServoError, SimpleDialog, TraversalId, WebDriverCommandMsg, WebDriverJSResult,
|
||||
WebDriverJSValue, WebDriverLoadStatus, WebDriverUserPrompt, WebView, WebViewBuilder,
|
||||
WebViewDelegate,
|
||||
GamepadHapticEffectType, JSValue, KeyboardEvent, LoadStatus, PermissionRequest, Servo,
|
||||
ServoDelegate, ServoError, SimpleDialog, TraversalId, WebDriverCommandMsg, WebDriverJSResult,
|
||||
WebDriverLoadStatus, WebDriverUserPrompt, WebView, WebViewBuilder, WebViewDelegate,
|
||||
};
|
||||
use url::Url;
|
||||
|
||||
|
@ -500,8 +499,10 @@ impl RunningAppState {
|
|||
.borrow()
|
||||
.script_evaluation_interrupt_sender
|
||||
{
|
||||
sender.send(Ok(WebDriverJSValue::Null)).unwrap_or_else(|err| {
|
||||
info!("Notify dialog appear failed. Maybe the channel to webdriver is closed: {err}");
|
||||
sender.send(Ok(JSValue::Null)).unwrap_or_else(|err| {
|
||||
info!(
|
||||
"Notify dialog appear failed. Maybe the channel to webdriver is closed: {err}"
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue