auto merge of #4996 : jdm/servo/reportpending, r=Ms2ger

I believe this problem was introduced with the mozjs error reporting changes, since we don't see errors reported from `<script>` blocks any more.
This commit is contained in:
bors-servo 2015-02-23 20:30:48 -07:00
commit 99617557d4
2 changed files with 4 additions and 1 deletions

View file

@ -10,7 +10,7 @@ use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
use dom::bindings::codegen::InheritTypes::EventTargetCast;
use dom::bindings::global::global_object_for_js_object;
use dom::bindings::error::Fallible;
use dom::bindings::error::{report_pending_exception, Fallible};
use dom::bindings::error::Error::InvalidCharacter;
use dom::bindings::global::GlobalRef;
use dom::bindings::js::{MutNullableJS, JSRef, Temporary};
@ -362,6 +362,7 @@ impl<'a, T: Reflectable> ScriptHelpers for JSRef<'a, T> {
code.len() as libc::c_uint,
filename.as_ptr(), 1, &mut rval) == 0 {
debug!("error evaluating JS string");
report_pending_exception(cx, global);
}
rval
}