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:
bors-servo 2015-11-13 01:13:52 +05:30
commit b40882093a
20 changed files with 309 additions and 736 deletions

View file

@ -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()
};