summaryrefslogtreecommitdiff
path: root/js/src/vm/RegExpObject.h
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@protonmail.com>2023-01-25 19:39:25 +0800
committerJob Bautista <jobbautista9@protonmail.com>2023-01-26 15:26:32 +0800
commit523201f3e491f7a21e3f7401ce904404d7d468cb (patch)
tree4280cfb3fcf0e6725e95f3b44e8834cdd8a035a5 /js/src/vm/RegExpObject.h
parent997616e30830e6e2c030e7cfc9ca78c0606529eb (diff)
downloaduxp-523201f3e491f7a21e3f7401ce904404d7d468cb.tar.gz
Issue #2083 - Part 4: Give RegExpShared a finalizer.
Based on Mozilla bug 1345177.
Diffstat (limited to 'js/src/vm/RegExpObject.h')
-rw-r--r--js/src/vm/RegExpObject.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
index 89942c6fd5..289c4f0dc9 100644
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -149,7 +149,8 @@ class RegExpShared : public gc::TenuredCell
}
// Tables referenced by JIT code.
- Vector<uint8_t*, 0, SystemAllocPolicy> tables;
+ using JitCodeTables = Vector<uint8_t*, 0, SystemAllocPolicy>;
+ JitCodeTables tables;
/* Internal functions. */
RegExpShared(JSAtom* source, RegExpFlag flags);
@@ -172,7 +173,7 @@ class RegExpShared : public gc::TenuredCell
}
public:
- ~RegExpShared();
+ ~RegExpShared() = delete;
// Execute this RegExp on input starting from searchIndex, filling in
// matches if specified and otherwise only determining if there is a match.
@@ -222,6 +223,7 @@ class RegExpShared : public gc::TenuredCell
void traceChildren(JSTracer* trc);
void discardJitCode();
+ void finalize(FreeOp* fop);
static size_t offsetOfSource() {
return offsetof(RegExpShared, source);