diff --git a/js/src/asmjs/AsmJSModule.cpp b/js/src/asmjs/AsmJSModule.cpp index 988583b5b02..1010ccf1039 100644 --- a/js/src/asmjs/AsmJSModule.cpp +++ b/js/src/asmjs/AsmJSModule.cpp @@ -139,7 +139,7 @@ AsmJSModule::trace(JSTracer* trc) for (unsigned i = 0; i < exports_.length(); i++) exports_[i].trace(trc); for (unsigned i = 0; i < names_.length(); i++) - MarkStringUnbarriered(trc, &names_[i].name(), "asm.js module function name"); + TraceManuallyBarrieredEdge(trc, &names_[i].name(), "asm.js module function name"); #if defined(MOZ_VTUNE) || defined(JS_ION_PERF) for (unsigned i = 0; i < profiledFunctions_.length(); i++) profiledFunctions_[i].trace(trc); @@ -149,11 +149,11 @@ AsmJSModule::trace(JSTracer* trc) perfProfiledBlocksFunctions_[i].trace(trc); #endif if (globalArgumentName_) - MarkStringUnbarriered(trc, &globalArgumentName_, "asm.js global argument name"); + TraceManuallyBarrieredEdge(trc, &globalArgumentName_, "asm.js global argument name"); if (importArgumentName_) - MarkStringUnbarriered(trc, &importArgumentName_, "asm.js import argument name"); + TraceManuallyBarrieredEdge(trc, &importArgumentName_, "asm.js import argument name"); if (bufferArgumentName_) - MarkStringUnbarriered(trc, &bufferArgumentName_, "asm.js buffer argument name"); + TraceManuallyBarrieredEdge(trc, &bufferArgumentName_, "asm.js buffer argument name"); if (maybeHeap_) gc::MarkObject(trc, &maybeHeap_, "asm.js heap"); } diff --git a/js/src/asmjs/AsmJSModule.h b/js/src/asmjs/AsmJSModule.h index 942a738e96d..13fd3ab4866 100644 --- a/js/src/asmjs/AsmJSModule.h +++ b/js/src/asmjs/AsmJSModule.h @@ -258,7 +258,7 @@ class AsmJSModule void trace(JSTracer* trc) { if (name_) - MarkStringUnbarriered(trc, &name_, "asm.js global name"); + TraceManuallyBarrieredEdge(trc, &name_, "asm.js global name"); MOZ_ASSERT_IF(pod.which_ == Variable && pod.u.var.initKind_ == InitConstant, !pod.u.var.u.numLit_.scalarValue().isMarkable()); } @@ -476,9 +476,9 @@ class AsmJSModule } void trace(JSTracer* trc) { - MarkStringUnbarriered(trc, &name_, "asm.js export name"); + TraceManuallyBarrieredEdge(trc, &name_, "asm.js export name"); if (maybeFieldName_) - MarkStringUnbarriered(trc, &maybeFieldName_, "asm.js export field"); + TraceManuallyBarrieredEdge(trc, &maybeFieldName_, "asm.js export field"); } public: @@ -680,7 +680,7 @@ class AsmJSModule void trace(JSTracer* trc) { if (name) - MarkStringUnbarriered(trc, &name, "asm.js profiled function name"); + TraceManuallyBarrieredEdge(trc, &name, "asm.js profiled function name"); } size_t serializedSize() const; diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp index f75692b09dd..3192e342097 100644 --- a/js/src/builtin/TypedObject.cpp +++ b/js/src/builtin/TypedObject.cpp @@ -2954,7 +2954,7 @@ MemoryTracingVisitor::visitReference(ReferenceTypeDescr& descr, uint8_t* mem) { HeapPtrString* stringPtr = reinterpret_cast(mem); if (*stringPtr) - gc::MarkString(trace_, stringPtr, "reference-str"); + TraceEdge(trace_, stringPtr, "reference-str"); return; } } diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 35adb515e90..c12c58e9797 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -1111,11 +1111,6 @@ DeclMarkerImpl(Object, SavedFrame) DeclMarkerImpl(Object, ScopeObject) DeclMarkerImpl(Object, SharedArrayBufferObject) DeclMarkerImpl(Object, SharedTypedArrayObject) -DeclMarkerImpl(String, JSAtom) -DeclMarkerImpl(String, JSString) -DeclMarkerImpl(String, JSFlatString) -DeclMarkerImpl(String, JSLinearString) -DeclMarkerImpl(String, PropertyName) } /* namespace gc */ } /* namespace js */ diff --git a/js/src/gc/Marking.h b/js/src/gc/Marking.h index 254f76d786c..68b5e4b684f 100644 --- a/js/src/gc/Marking.h +++ b/js/src/gc/Marking.h @@ -159,11 +159,6 @@ DeclMarker(Object, SavedFrame) DeclMarker(Object, ScopeObject) DeclMarker(Object, SharedArrayBufferObject) DeclMarker(Object, SharedTypedArrayObject) -DeclMarker(String, JSAtom) -DeclMarker(String, JSString) -DeclMarker(String, JSFlatString) -DeclMarker(String, JSLinearString) -DeclMarker(String, PropertyName) #undef DeclMarker diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 4afefe671d6..575e6614f28 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -99,7 +99,7 @@ MarkExactStackRootsAcrossTypes(T context, JSTracer* trc) MarkExactStackRootList(trc, context, "exact-baseshape"); MarkExactStackRootList( trc, context, "exact-objectgroup"); - MarkExactStackRootList(trc, context, "exact-string"); + MarkExactStackRootList(trc, context, "exact-string"); MarkExactStackRootList(trc, context, "exact-symbol"); MarkExactStackRootList(trc, context, "exact-jitcode"); MarkExactStackRootList(trc, context, "exact-script"); @@ -191,13 +191,13 @@ AutoGCRooter::trace(JSTracer* trc) case STRINGVECTOR: { AutoStringVector::VectorImpl& vector = static_cast(this)->vector; - MarkStringRootRange(trc, vector.length(), vector.begin(), "js::AutoStringVector.vector"); + TraceRootRange(trc, vector.length(), vector.begin(), "js::AutoStringVector.vector"); return; } case NAMEVECTOR: { AutoNameVector::VectorImpl& vector = static_cast(this)->vector; - MarkStringRootRange(trc, vector.length(), vector.begin(), "js::AutoNameVector.vector"); + TraceRootRange(trc, vector.length(), vector.begin(), "js::AutoNameVector.vector"); return; } @@ -402,7 +402,7 @@ js::gc::MarkPersistentRootedChains(JSTracer* trc) trc, rt->objectPersistentRooteds, "PersistentRooted"); PersistentRootedMarker::markChainIfNotNull( trc, rt->scriptPersistentRooteds, "PersistentRooted"); - PersistentRootedMarker::markChainIfNotNull( + PersistentRootedMarker::markChainIfNotNull( trc, rt->stringPersistentRooteds, "PersistentRooted"); // Mark the PersistentRooted chains of types that are never null. @@ -457,8 +457,7 @@ js::gc::GCRuntime::markRuntime(JSTracer* trc, "asyncStackForNewActivations"); if (rt->asyncCauseForNewActivations) - MarkStringRoot(trc, &rt->asyncCauseForNewActivations, - "asyncCauseForNewActivations"); + TraceRoot(trc, &rt->asyncCauseForNewActivations, "asyncCauseForNewActivations"); if (rt->scriptAndCountsVector) { ScriptAndCountsVector& vec = *rt->scriptAndCountsVector; diff --git a/js/src/gc/Tracer.cpp b/js/src/gc/Tracer.cpp index 77abcd4349d..4bc95360ef9 100644 --- a/js/src/gc/Tracer.cpp +++ b/js/src/gc/Tracer.cpp @@ -50,7 +50,7 @@ JS_CallUnbarrieredObjectTracer(JSTracer* trc, JSObject** objp, const char* name) JS_PUBLIC_API(void) JS_CallUnbarrieredStringTracer(JSTracer* trc, JSString** strp, const char* name) { - MarkStringUnbarriered(trc, strp, name); + TraceManuallyBarrieredEdge(trc, strp, name); } JS_PUBLIC_API(void) @@ -80,7 +80,7 @@ JS_CallObjectTracer(JSTracer* trc, JS::Heap* objp, const char* name) JS_PUBLIC_API(void) JS_CallStringTracer(JSTracer* trc, JS::Heap* strp, const char* name) { - MarkStringUnbarriered(trc, strp->unsafeGet(), name); + TraceManuallyBarrieredEdge(trc, strp->unsafeGet(), name); } JS_PUBLIC_API(void) diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index 565373288ba..eaf07f6cba0 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -222,20 +222,20 @@ ICStub::trace(JSTracer* trc) case ICStub::Call_StringSplit: { ICCall_StringSplit* callStub = toCall_StringSplit(); MarkObject(trc, &callStub->templateObject(), "baseline-callstringsplit-template"); - MarkString(trc, &callStub->expectedArg(), "baseline-callstringsplit-arg"); - MarkString(trc, &callStub->expectedThis(), "baseline-callstringsplit-this"); + TraceEdge(trc, &callStub->expectedArg(), "baseline-callstringsplit-arg"); + TraceEdge(trc, &callStub->expectedThis(), "baseline-callstringsplit-this"); break; } case ICStub::GetElem_NativeSlot: { ICGetElem_NativeSlot* getElemStub = toGetElem_NativeSlot(); TraceEdge(trc, &getElemStub->shape(), "baseline-getelem-native-shape"); - MarkString(trc, &getElemStub->name(), "baseline-getelem-native-name"); + TraceEdge(trc, &getElemStub->name(), "baseline-getelem-native-name"); break; } case ICStub::GetElem_NativePrototypeSlot: { ICGetElem_NativePrototypeSlot* getElemStub = toGetElem_NativePrototypeSlot(); TraceEdge(trc, &getElemStub->shape(), "baseline-getelem-nativeproto-shape"); - MarkString(trc, &getElemStub->name(), "baseline-getelem-nativeproto-name"); + TraceEdge(trc, &getElemStub->name(), "baseline-getelem-nativeproto-name"); MarkObject(trc, &getElemStub->holder(), "baseline-getelem-nativeproto-holder"); TraceEdge(trc, &getElemStub->holderShape(), "baseline-getelem-nativeproto-holdershape"); break; @@ -245,7 +245,7 @@ ICStub::trace(JSTracer* trc) ICGetElemNativePrototypeCallStub* callStub = reinterpret_cast(this); TraceEdge(trc, &callStub->shape(), "baseline-getelem-nativeprotocall-shape"); - MarkString(trc, &callStub->name(), "baseline-getelem-nativeprotocall-name"); + TraceEdge(trc, &callStub->name(), "baseline-getelem-nativeprotocall-name"); MarkObject(trc, &callStub->getter(), "baseline-getelem-nativeprotocall-getter"); MarkObject(trc, &callStub->holder(), "baseline-getelem-nativeprotocall-holder"); TraceEdge(trc, &callStub->holderShape(), "baseline-getelem-nativeprotocall-holdershape"); @@ -404,7 +404,7 @@ ICStub::trace(JSTracer* trc) case ICStub::GetProp_DOMProxyShadowed: { ICGetProp_DOMProxyShadowed* propStub = toGetProp_DOMProxyShadowed(); TraceEdge(trc, &propStub->shape(), "baseline-getproplistbaseshadowed-stub-shape"); - MarkString(trc, &propStub->name(), "baseline-getproplistbaseshadowed-stub-name"); + TraceEdge(trc, &propStub->name(), "baseline-getproplistbaseshadowed-stub-name"); break; } case ICStub::GetProp_CallScripted: { diff --git a/js/src/jit/JitFrames.cpp b/js/src/jit/JitFrames.cpp index 1769a7bc7c0..237a57fa471 100644 --- a/js/src/jit/JitFrames.cpp +++ b/js/src/jit/JitFrames.cpp @@ -1413,7 +1413,7 @@ MarkJitExitFrame(JSTracer* trc, const JitFrameIterator& frame) } case VMFunction::RootString: case VMFunction::RootPropertyName: - gc::MarkStringRoot(trc, reinterpret_cast(argBase), "ion-vm-args"); + TraceRoot(trc, reinterpret_cast(argBase), "ion-vm-args"); break; case VMFunction::RootFunction: gc::MarkObjectRoot(trc, reinterpret_cast(argBase), "ion-vm-args"); @@ -1447,7 +1447,7 @@ MarkJitExitFrame(JSTracer* trc, const JitFrameIterator& frame) break; case VMFunction::RootString: case VMFunction::RootPropertyName: - gc::MarkStringRoot(trc, footer->outParam(), "ion-vm-out"); + TraceRoot(trc, footer->outParam(), "ion-vm-out"); break; case VMFunction::RootFunction: gc::MarkObjectRoot(trc, footer->outParam(), "ion-vm-out"); diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 8bd121b83c4..0b8e55e1f75 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -1252,7 +1252,7 @@ void MarkStringFromIon(JSRuntime* rt, JSString** stringp) { if (*stringp) - gc::MarkStringUnbarriered(&rt->gc.marker, stringp, "write barrier"); + TraceManuallyBarrieredEdge(&rt->gc.marker, stringp, "write barrier"); } void diff --git a/js/src/jsapi-tests/testIntern.cpp b/js/src/jsapi-tests/testIntern.cpp index 809accf52a3..2378132f9bd 100644 --- a/js/src/jsapi-tests/testIntern.cpp +++ b/js/src/jsapi-tests/testIntern.cpp @@ -43,6 +43,6 @@ static void FinalizeCallback(JSFreeOp* fop, JSFinalizeStatus status, bool isCompartmentGC, void* data) { if (status == JSFINALIZE_GROUP_START) - sw.strOk = js::gc::IsStringMarked(&sw.str); + sw.strOk = js::gc::IsMarkedUnbarriered(&sw.str); } END_TEST(testInternAcrossGC) diff --git a/js/src/jsatom.cpp b/js/src/jsatom.cpp index 970e9189fa9..eaaa79f7a70 100644 --- a/js/src/jsatom.cpp +++ b/js/src/jsatom.cpp @@ -203,7 +203,7 @@ js::MarkAtoms(JSTracer* trc) JSAtom* atom = entry.asPtr(); bool tagged = entry.isTagged(); - MarkStringRoot(trc, &atom, "interned_atom"); + TraceRoot(trc, &atom, "interned_atom"); if (entry.asPtr() != atom) e.rekeyFront(AtomHasher::Lookup(atom), AtomStateEntry(atom, tagged)); } @@ -255,7 +255,7 @@ JSRuntime::sweepAtoms() for (AtomSet::Enum e(*atoms_); !e.empty(); e.popFront()) { AtomStateEntry entry = e.front(); JSAtom* atom = entry.asPtr(); - bool isDying = IsStringAboutToBeFinalized(&atom); + bool isDying = IsAboutToBeFinalizedUnbarriered(&atom); /* Pinned or interned key cannot be finalized. */ MOZ_ASSERT_IF(hasContexts() && entry.isTagged(), !isDying); diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp index 8dc0efdf88d..8276df36e29 100644 --- a/js/src/jscompartment.cpp +++ b/js/src/jscompartment.cpp @@ -622,7 +622,7 @@ JSCompartment::sweepCrossCompartmentWrappers() break; case CrossCompartmentKey::StringWrapper: MOZ_ASSERT(key.wrapped->asTenured().getTraceKind() == JSTRACE_STRING); - keyDying = IsStringAboutToBeFinalized( + keyDying = IsAboutToBeFinalizedUnbarriered( reinterpret_cast(&key.wrapped)); break; case CrossCompartmentKey::DebuggerScript: diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 6e4c7001053..5cdc9f3b372 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -726,7 +726,7 @@ JSFunction::trace(JSTracer* trc) } if (atom_) - MarkString(trc, &atom_, "atom"); + TraceEdge(trc, &atom_, "atom"); if (isInterpreted()) { // Functions can be be marked as interpreted despite having no script diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp index 87ba15c1159..edaacb6f2a5 100644 --- a/js/src/jsiter.cpp +++ b/js/src/jsiter.cpp @@ -58,7 +58,7 @@ void NativeIterator::mark(JSTracer* trc) { for (HeapPtrFlatString* str = begin(); str < end(); str++) - MarkString(trc, str, "prop"); + TraceEdge(trc, str, "prop"); if (obj) MarkObject(trc, &obj, "obj"); diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index 593958ab633..77b86eae063 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -322,7 +322,7 @@ Bindings::trace(JSTracer* trc) for (const Binding& b : *this) { PropertyName* name = b.name(); - MarkStringUnbarriered(trc, &name, "bindingArray"); + TraceManuallyBarrieredEdge(trc, &name, "bindingArray"); } } @@ -3434,7 +3434,7 @@ JSScript::markChildren(JSTracer* trc) for (uint32_t i = 0; i < natoms(); ++i) { if (atoms[i]) - MarkString(trc, &atoms[i], "atom"); + TraceEdge(trc, &atoms[i], "atom"); } if (hasObjects()) { @@ -3497,7 +3497,7 @@ LazyScript::markChildren(JSTracer* trc) FreeVariable* freeVariables = this->freeVariables(); for (size_t i = 0; i < numFreeVariables(); i++) { JSAtom* atom = freeVariables[i].atom(); - MarkStringUnbarriered(trc, &atom, "lazyScriptFreeVariable"); + TraceManuallyBarrieredEdge(trc, &atom, "lazyScriptFreeVariable"); } HeapPtrFunction* innerFunctions = this->innerFunctions(); diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp index edb7d8b012a..478a3bd9e82 100644 --- a/js/src/vm/RegExpObject.cpp +++ b/js/src/vm/RegExpObject.cpp @@ -581,7 +581,7 @@ RegExpShared::trace(JSTracer* trc) marked_ = true; if (source) - MarkString(trc, &source, "RegExpShared source"); + TraceEdge(trc, &source, "RegExpShared source"); for (size_t i = 0; i < ArrayLength(compilationArray); i++) { RegExpCompilation& compilation = compilationArray[i]; @@ -912,7 +912,7 @@ RegExpCompartment::sweep(JSRuntime* rt) // the RegExpShared if it was accidentally marked earlier but wasn't // marked by the current trace. bool keep = shared->marked() && - IsStringMarked(&shared->source); + IsMarked(&shared->source); for (size_t i = 0; i < ArrayLength(shared->compilationArray); i++) { RegExpShared::RegExpCompilation& compilation = shared->compilationArray[i]; if (compilation.jitCode && diff --git a/js/src/vm/RegExpStatics.h b/js/src/vm/RegExpStatics.h index 37cd6b31092..7813a8c6ac2 100644 --- a/js/src/vm/RegExpStatics.h +++ b/js/src/vm/RegExpStatics.h @@ -133,11 +133,11 @@ class RegExpStatics * RegExpStatics::AutoRooter::trace(). */ if (matchesInput) - MarkString(trc, &matchesInput, "res->matchesInput"); + TraceEdge(trc, &matchesInput, "res->matchesInput"); if (lazySource) - MarkString(trc, &lazySource, "res->lazySource"); + TraceEdge(trc, &lazySource, "res->lazySource"); if (pendingInput) - MarkString(trc, &pendingInput, "res->pendingInput"); + TraceEdge(trc, &pendingInput, "res->pendingInput"); } /* Value creators. */ @@ -201,16 +201,16 @@ class AutoRegExpStaticsBuffer : private JS::CustomAutoRooter private: virtual void trace(JSTracer* trc) { if (statics.matchesInput) { - MarkStringRoot(trc, reinterpret_cast(&statics.matchesInput), - "AutoRegExpStaticsBuffer matchesInput"); + TraceRoot(trc, reinterpret_cast(&statics.matchesInput), + "AutoRegExpStaticsBuffer matchesInput"); } if (statics.lazySource) { - MarkStringRoot(trc, reinterpret_cast(&statics.lazySource), - "AutoRegExpStaticsBuffer lazySource"); + TraceRoot(trc, reinterpret_cast(&statics.lazySource), + "AutoRegExpStaticsBuffer lazySource"); } if (statics.pendingInput) { - MarkStringRoot(trc, reinterpret_cast(&statics.pendingInput), - "AutoRegExpStaticsBuffer pendingInput"); + TraceRoot(trc, reinterpret_cast(&statics.pendingInput), + "AutoRegExpStaticsBuffer pendingInput"); } } diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index 9297a067439..8a9b99e3e8c 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -79,14 +79,14 @@ struct SavedFrame::Lookup { JSPrincipals* principals; void trace(JSTracer* trc) { - gc::MarkStringUnbarriered(trc, &source, "SavedFrame::Lookup::source"); + TraceManuallyBarrieredEdge(trc, &source, "SavedFrame::Lookup::source"); if (functionDisplayName) { - gc::MarkStringUnbarriered(trc, &functionDisplayName, - "SavedFrame::Lookup::functionDisplayName"); + TraceManuallyBarrieredEdge(trc, &functionDisplayName, + "SavedFrame::Lookup::functionDisplayName"); } if (asyncCause) { - gc::MarkStringUnbarriered(trc, &asyncCause, - "SavedFrame::Lookup::asyncCause"); + TraceManuallyBarrieredEdge(trc, &asyncCause, + "SavedFrame::Lookup::asyncCause"); } if (parent) { gc::MarkObjectUnbarriered(trc, &parent, @@ -847,7 +847,7 @@ SavedStacks::trace(JSTracer* trc) // Mark each of the source strings in our pc to location cache. for (PCLocationMap::Enum e(pcLocationMap); !e.empty(); e.popFront()) { LocationValue& loc = e.front().value(); - MarkString(trc, &loc.source, "SavedStacks::PCLocationMap's memoized script source name"); + TraceEdge(trc, &loc.source, "SavedStacks::PCLocationMap's memoized script source name"); } } diff --git a/js/src/vm/SavedStacks.h b/js/src/vm/SavedStacks.h index a73024f3243..11023582075 100644 --- a/js/src/vm/SavedStacks.h +++ b/js/src/vm/SavedStacks.h @@ -338,7 +338,7 @@ class SavedStacks { void trace(JSTracer* trc) { if (source) - gc::MarkString(trc, &source, "SavedStacks::LocationValue::source"); + TraceEdge(trc, &source, "SavedStacks::LocationValue::source"); } PreBarrieredAtom source; diff --git a/js/src/vm/String.h b/js/src/vm/String.h index 3fc7d75c894..30cd4e47a2b 100644 --- a/js/src/vm/String.h +++ b/js/src/vm/String.h @@ -468,7 +468,7 @@ class JSString : public js::gc::TenuredCell void markBase(JSTracer* trc) { MOZ_ASSERT(hasBase()); - js::gc::MarkStringUnbarriered(trc, &d.s.u3.base, "base"); + js::TraceManuallyBarrieredEdge(trc, &d.s.u3.base, "base"); } /* Only called by the GC for strings with the AllocKind::STRING kind. */ @@ -579,8 +579,8 @@ class JSRope : public JSString } void markChildren(JSTracer* trc) { - js::gc::MarkStringUnbarriered(trc, &d.s.u2.left, "left child"); - js::gc::MarkStringUnbarriered(trc, &d.s.u3.right, "right child"); + js::TraceManuallyBarrieredEdge(trc, &d.s.u2.left, "left child"); + js::TraceManuallyBarrieredEdge(trc, &d.s.u3.right, "right child"); } static size_t offsetOfLeft() { diff --git a/js/src/vm/Symbol.h b/js/src/vm/Symbol.h index 27c13132505..35413d4ac90 100644 --- a/js/src/vm/Symbol.h +++ b/js/src/vm/Symbol.h @@ -58,7 +58,7 @@ class Symbol : public js::gc::TenuredCell static inline js::ThingRootKind rootKind() { return js::THING_ROOT_SYMBOL; } inline void markChildren(JSTracer* trc) { if (description_) - js::gc::MarkStringUnbarriered(trc, &description_, "description"); + js::TraceManuallyBarrieredEdge(trc, &description_, "description"); } inline void finalize(js::FreeOp*) {} diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp index bdc98093793..218b81521c2 100644 --- a/js/src/vm/UnboxedObject.cpp +++ b/js/src/vm/UnboxedObject.cpp @@ -28,7 +28,7 @@ void UnboxedLayout::trace(JSTracer* trc) { for (size_t i = 0; i < properties_.length(); i++) - MarkStringUnbarriered(trc, &properties_[i].name, "unboxed_layout_name"); + TraceManuallyBarrieredEdge(trc, &properties_[i].name, "unboxed_layout_name"); if (newScript()) newScript()->trace(trc); @@ -364,7 +364,7 @@ UnboxedPlainObject::trace(JSTracer* trc, JSObject* obj) uint8_t* data = obj->as().data(); while (*list != -1) { HeapPtrString* heap = reinterpret_cast(data + *list); - MarkString(trc, heap, "unboxed_string"); + TraceEdge(trc, heap, "unboxed_string"); list++; } list++;