blob: 7736e4ce6895eb40813e50ddfeed15d72db3f33b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Upstream: Yes
Reason: Required for GJS
# HG changeset patch
# User Philip Chimento <philip.chimento@gmail.com>
# Date 1527544053 25200
# Mon May 28 14:47:33 2018 -0700
# Node ID a50e7374d0952b893f843e9d21d13d5b7ec8564c
# Parent a466172aed4bc2afc21169b749b8068a4b98c93f
Bug 1464912 - Add exposeToActiveJS specialization for JSString. r=sfink
diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -719,6 +719,10 @@ struct BarrierMethods<JSString*>
static void postBarrier(JSString** vp, JSString* prev, JSString* next) {
JS::HeapStringPostBarrier(vp, prev, next);
}
+ static void exposeToJS(JSString* v) {
+ if (v)
+ js::gc::ExposeGCThingToActiveJS(JS::GCCellPtr(v));
+ }
};
// Provide hash codes for Cell kinds that may be relocated and, thus, not have
|