From ac1e02405d062f1f1051e27321306a140e9aad9f Mon Sep 17 00:00:00 2001 From: Yusuf Simonson Date: Wed, 28 Mar 2018 10:11:32 +0800 Subject: [PATCH] Assert that we successfully got the pending exception --- components/script/body.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/body.rs b/components/script/body.rs index 06d48af7365..1ae05e4b043 100644 --- a/components/script/body.rs +++ b/components/script/body.rs @@ -138,7 +138,7 @@ fn run_json_data_algorithm(cx: *mut JSContext, json_text.len() as u32, rval.handle_mut()) { rooted!(in(cx) let mut exception = UndefinedValue()); - JS_GetPendingException(cx, exception.handle_mut()); + assert!(JS_GetPendingException(cx, exception.handle_mut())); JS_ClearPendingException(cx); return Ok(FetchedData::JSException(RootedTraceableBox::from_box(Heap::boxed(exception.get())))); }