diff options
author | Job Bautista <jobbautista9@protonmail.com> | 2023-01-26 15:02:09 +0800 |
---|---|---|
committer | Job Bautista <jobbautista9@protonmail.com> | 2023-01-26 15:26:31 +0800 |
commit | c566c36791d2220872d18d00bb0b8f6d55626641 (patch) | |
tree | 08d8e0b76f6812f95bf7cc14034fd07bedcca57c /xpcom | |
parent | 5a4478b4094481173fed334e5a026f2c541da45e (diff) | |
download | uxp-c566c36791d2220872d18d00bb0b8f6d55626641.tar.gz |
Issue #2083 - Part 1: Make RegExpShared a GC thing.
Based on Mozilla bug 1345177.
Changes from the original bug's patch:
- We don't have JS::CurrentThreadIsHeapCollecting, so let's use
trc->runtime()->isHeapCollecting() instead.
- Mozilla bug 1337117 renamed runtimeFromMainThread to
runtimeFromActiveCooperatingThread for Firefox 54, so let's use the former
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/base/CycleCollectedJSContext.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xpcom/base/CycleCollectedJSContext.h b/xpcom/base/CycleCollectedJSContext.h index 366a1ea3bb..b9fc8e6045 100644 --- a/xpcom/base/CycleCollectedJSContext.h +++ b/xpcom/base/CycleCollectedJSContext.h @@ -543,7 +543,10 @@ void TraceScriptHolder(nsISupports* aHolder, JSTracer* aTracer); // Returns true if the JS::TraceKind is one the cycle collector cares about. inline bool AddToCCKind(JS::TraceKind aKind) { - return aKind == JS::TraceKind::Object || aKind == JS::TraceKind::Script || aKind == JS::TraceKind::Scope; + return aKind == JS::TraceKind::Object || + aKind == JS::TraceKind::Script || + aKind == JS::TraceKind::Scope || + aKind == JS::TraceKind::RegExpShared; } bool |