Implement report_an_error on GlobalRef.

This commit is contained in:
Ms2ger 2016-09-05 17:14:28 +02:00
parent 5f702d6e7f
commit b3050855e7
2 changed files with 11 additions and 3 deletions

View file

@ -245,9 +245,7 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, dispatch_event: bool)
if dispatch_event {
let global = global_root_from_context(cx);
if let GlobalRef::Window(window) = global.r() {
window.report_an_error(error_info, value.handle());
}
global.r().report_an_error(error_info, value.handle());
}
}
}