mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Introduce GlobalScope::report_an_error
This commit is contained in:
parent
d4fccbace4
commit
86d2008137
6 changed files with 65 additions and 101 deletions
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
|
|||
use dom::bindings::codegen::PrototypeList::proto_id_to_name;
|
||||
use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
|
||||
use dom::bindings::conversions::root_from_object;
|
||||
use dom::bindings::global::global_root_from_context;
|
||||
use dom::bindings::global::global_scope_from_context;
|
||||
use dom::bindings::str::USVString;
|
||||
use dom::domexception::{DOMErrorName, DOMException};
|
||||
use dom::globalscope::GlobalScope;
|
||||
|
@ -246,8 +246,8 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, dispatch_event: bool)
|
|||
error_info.message);
|
||||
|
||||
if dispatch_event {
|
||||
let global = global_root_from_context(cx);
|
||||
global.r().report_an_error(error_info, value.handle());
|
||||
let global = global_scope_from_context(cx);
|
||||
global.report_an_error(error_info, value.handle());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue