Bug 1379585 part 2 - Disable interrupt callback when doing pattern matching. r=baku

MozReview-Commit-ID: 86VY6ZCtpew

--HG--
extra : rebase_source : c3ee4e05030061283f9b6fede6d2b121d23d635e
This commit is contained in:
Xidorn Quan 2017-07-14 10:03:43 +10:00
parent 2fa56dab45
commit 0fdde10882

View File

@ -7164,9 +7164,8 @@ nsContentUtils::IsPatternMatching(nsAString& aValue, nsAString& aPattern,
{
NS_ASSERTION(aDocument, "aDocument should be a valid pointer (not null)");
AutoJSAPI jsapi;
jsapi.Init();
JSContext* cx = jsapi.cx();
AutoJSContext cx;
AutoDisableJSInterruptCallback disabler(cx);
// We can use the junk scope here, because we're just using it for
// regexp evaluation, not actual script execution.