mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +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
|
@ -3979,16 +3979,14 @@ impl ScriptThread {
|
|||
return;
|
||||
};
|
||||
|
||||
let result = match jsval_to_webdriver(
|
||||
let result = jsval_to_webdriver(
|
||||
context,
|
||||
global_scope,
|
||||
return_value.handle(),
|
||||
(&realm).into(),
|
||||
can_gc,
|
||||
) {
|
||||
Ok(ref value) => Ok(value.into()),
|
||||
Err(_) => Err(JavaScriptEvaluationError::SerializationError),
|
||||
};
|
||||
)
|
||||
.map_err(|_| JavaScriptEvaluationError::SerializationError);
|
||||
|
||||
let _ = self.senders.pipeline_to_constellation_sender.send((
|
||||
pipeline_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue