Skip to content

Commit 2795fb4

Browse files
committed
Bug 1593975 - update linearWeakMarkingDisabled_ to MainThreadOrGCTaskData. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51810 --HG-- extra : moz-landing-system : lando
1 parent fc552d5 commit 2795fb4

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

js/src/gc/GCMarker.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class GCMarker : public JSTracer {
455455
* If the weakKeys table OOMs, disable the linear algorithm and fall back
456456
* to iterating until the next GC.
457457
*/
458-
MainThreadData<bool> linearWeakMarkingDisabled_;
458+
MainThreadOrGCTaskData<bool> linearWeakMarkingDisabled_;
459459

460460
/* The count of marked objects during GC. */
461461
size_t markCount;
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function runtest(func) {
2+
func();
3+
}
4+
const g1 = newGlobal({
5+
newCompartment: true
6+
});
7+
enqueueMark("enter-weak-marking-mode");
8+
function transplantMarking() {
9+
const vals = {};
10+
vals.map = new WeakMap();
11+
enqueueMark(vals.map);
12+
enqueueMark("yield");
13+
enqueueMark("enter-weak-marking-mode");
14+
}
15+
runtest(transplantMarking);
16+
egc = 60;
17+
gcslice(egc * 100);
18+
try {
19+
x();
20+
} catch(e) {}

0 commit comments

Comments
 (0)