Bug 1096329 - Check ToJSValue result in PopProfileTimelineMarkers. r=smaug

This commit is contained in:
Tom Tromey 2014-11-11 11:30:00 -05:00
parent 5c13f486ab
commit f64c2a6298

View File

@ -2941,11 +2941,14 @@ nsDocShell::PopProfileTimelineMarkers(JSContext* aCx,
}
}
ToJSValue(aCx, profileTimelineMarkers, aProfileTimelineMarkers);
ClearProfileTimelineMarkers();
mProfileTimelineMarkers.SwapElements(keptMarkers);
if (!ToJSValue(aCx, profileTimelineMarkers, aProfileTimelineMarkers)) {
JS_ClearPendingException(aCx);
return NS_ERROR_UNEXPECTED;
}
return NS_OK;
#else
return NS_ERROR_FAILURE;