summaryrefslogtreecommitdiff
path: root/js/src/vm/RegExpStatics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/RegExpStatics.cpp')
-rw-r--r--js/src/vm/RegExpStatics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/vm/RegExpStatics.cpp b/js/src/vm/RegExpStatics.cpp
index 27bc988db6..7073e084fd 100644
--- a/js/src/vm/RegExpStatics.cpp
+++ b/js/src/vm/RegExpStatics.cpp
@@ -81,7 +81,8 @@ RegExpStatics::executeLazy(JSContext* cx)
/* Retrieve or create the RegExpShared in this compartment. */
RootedRegExpShared shared(cx);
- if (!cx->compartment()->regExps.get(cx, lazySource, lazyFlags, &shared))
+ RootedAtom source(cx, lazySource);
+ if (!cx->compartment()->regExps.get(cx, source, lazyFlags, &shared))
return false;
/*
@@ -91,7 +92,8 @@ RegExpStatics::executeLazy(JSContext* cx)
/* Execute the full regular expression. */
RootedLinearString input(cx, matchesInput);
- RegExpRunStatus status = shared->execute(cx, input, lazyIndex, &this->matches, nullptr);
+ RegExpRunStatus status = RegExpShared::execute(cx, &shared, input, lazyIndex, &this->matches,
+ nullptr);
if (status == RegExpRunStatus_Error)
return false;