Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit fb2e070

Browse files
committed
Bug 1464912 - Add exposeToActiveJS specialization for JSString. r=sfink
1 parent 0735c38 commit fb2e070

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

js/public/RootingAPI.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,10 @@ struct BarrierMethods<JSString*>
719719
static void postBarrier(JSString** vp, JSString* prev, JSString* next) {
720720
JS::HeapStringPostBarrier(vp, prev, next);
721721
}
722+
static void exposeToJS(JSString* v) {
723+
if (v)
724+
js::gc::ExposeGCThingToActiveJS(JS::GCCellPtr(v));
725+
}
722726
};
723727

724728
// Provide hash codes for Cell kinds that may be relocated and, thus, not have

0 commit comments

Comments
 (0)