mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Support the updated spidermonkey bindings
This commit is contained in:
parent
32daa17d5c
commit
e733a7c46a
20 changed files with 234 additions and 223 deletions
|
@ -13,7 +13,7 @@ use dom::bindings::js::{MutHeapJSVal, Root};
|
|||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||
use js::jsapi::{HandleValue, JSContext};
|
||||
use js::jsapi::{RootedValue, HandleValue, JSContext};
|
||||
use js::jsval::JSVal;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
|
@ -102,11 +102,14 @@ impl ErrorEvent {
|
|||
EventCancelable::NotCancelable
|
||||
};
|
||||
|
||||
// Dictionaries need to be rooted
|
||||
// https://github.com/servo/servo/issues/6381
|
||||
let error = RootedValue::new(global.get_cx(), init.error);
|
||||
let event = ErrorEvent::new(global, type_,
|
||||
bubbles, cancelable,
|
||||
msg, file_name,
|
||||
line_num, col_num,
|
||||
HandleValue { ptr: &init.error });
|
||||
error.handle());
|
||||
Ok(event)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue