mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #8428 - Ms2ger:conversions, r=Manishearth
Update js. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8428) <!-- Reviewable:end -->
This commit is contained in:
commit
b40882093a
20 changed files with 309 additions and 736 deletions
|
@ -1683,11 +1683,13 @@ impl ScriptTask {
|
|||
let script_source = String::from_utf8_lossy(&script_source_bytes);
|
||||
|
||||
// Script source is ready to be evaluated (11.)
|
||||
let mut jsval = RootedValue::new(self.get_cx(), UndefinedValue());
|
||||
window.evaluate_js_on_global_with_result(&script_source, jsval.handle_mut());
|
||||
let strval = DOMString::from_jsval(self.get_cx(), jsval.handle(),
|
||||
StringificationBehavior::Empty);
|
||||
strval.unwrap_or(DOMString::new())
|
||||
unsafe {
|
||||
let mut jsval = RootedValue::new(self.get_cx(), UndefinedValue());
|
||||
window.evaluate_js_on_global_with_result(&script_source, jsval.handle_mut());
|
||||
let strval = DOMString::from_jsval(self.get_cx(), jsval.handle(),
|
||||
StringificationBehavior::Empty);
|
||||
strval.unwrap_or(DOMString::new())
|
||||
}
|
||||
} else {
|
||||
DOMString::new()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue