Issue #2083 - Part 2: Remove use of RegExpGuard.

Based on Mozilla bug 1345177.
There were more uses of RegExpGuard in js/src/builtin/RegExp.cpp not found in
 the original bug's patch.
This commit is contained in:
Job Bautista 2023-01-26 15:13:53 +08:00 committed by roytam1
commit d163d08cb2
21 changed files with 92 additions and 73 deletions

View file

@ -6141,7 +6141,7 @@ JS_GetRegExpFlags(JSContext* cx, HandleObject obj)
AssertHeapIsIdle(cx);
CHECK_REQUEST(cx);
RegExpGuard shared(cx);
RootedRegExpShared shared(cx);
if (!RegExpToShared(cx, obj, &shared))
return false;
return shared->getFlags();
@ -6153,7 +6153,7 @@ JS_GetRegExpSource(JSContext* cx, HandleObject obj)
AssertHeapIsIdle(cx);
CHECK_REQUEST(cx);
RegExpGuard shared(cx);
RootedRegExpShared shared(cx);
if (!RegExpToShared(cx, obj, &shared))
return nullptr;
return shared->getSource();