mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to Spidermonkey 67.
This commit is contained in:
parent
ce9f35e0e3
commit
63714c90fb
19 changed files with 260 additions and 139 deletions
|
@ -207,8 +207,8 @@ impl ErrorInfo {
|
|||
})
|
||||
}
|
||||
|
||||
fn from_dom_exception(object: HandleObject) -> Option<ErrorInfo> {
|
||||
let exception = match root_from_object::<DOMException>(object.get()) {
|
||||
fn from_dom_exception(object: HandleObject, cx: *mut JSContext) -> Option<ErrorInfo> {
|
||||
let exception = match root_from_object::<DOMException>(object.get(), cx) {
|
||||
Ok(exception) => exception,
|
||||
Err(_) => return None,
|
||||
};
|
||||
|
@ -242,7 +242,7 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, dispatch_event: bool)
|
|||
let error_info = if value.is_object() {
|
||||
rooted!(in(cx) let object = value.to_object());
|
||||
ErrorInfo::from_native_error(cx, object.handle())
|
||||
.or_else(|| ErrorInfo::from_dom_exception(object.handle()))
|
||||
.or_else(|| ErrorInfo::from_dom_exception(object.handle(), cx))
|
||||
.unwrap_or_else(|| ErrorInfo {
|
||||
message: format!("uncaught exception: unknown (can't convert to string)"),
|
||||
filename: String::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue