mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1149352 - Part 7: Move String marking to TraceEdge; r=jonco
This commit is contained in:
parent
a660e808f9
commit
4ab2487d87
@ -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");
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -2954,7 +2954,7 @@ MemoryTracingVisitor::visitReference(ReferenceTypeDescr& descr, uint8_t* mem)
|
||||
{
|
||||
HeapPtrString* stringPtr = reinterpret_cast<js::HeapPtrString*>(mem);
|
||||
if (*stringPtr)
|
||||
gc::MarkString(trace_, stringPtr, "reference-str");
|
||||
TraceEdge(trace_, stringPtr, "reference-str");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
||||
|
@ -99,7 +99,7 @@ MarkExactStackRootsAcrossTypes(T context, JSTracer* trc)
|
||||
MarkExactStackRootList<BaseShape*, TraceRoot>(trc, context, "exact-baseshape");
|
||||
MarkExactStackRootList<ObjectGroup*, TraceRoot>(
|
||||
trc, context, "exact-objectgroup");
|
||||
MarkExactStackRootList<JSString*, MarkStringRoot>(trc, context, "exact-string");
|
||||
MarkExactStackRootList<JSString*, TraceRoot>(trc, context, "exact-string");
|
||||
MarkExactStackRootList<JS::Symbol*, TraceRoot>(trc, context, "exact-symbol");
|
||||
MarkExactStackRootList<jit::JitCode*, TraceRoot>(trc, context, "exact-jitcode");
|
||||
MarkExactStackRootList<JSScript*, TraceRoot>(trc, context, "exact-script");
|
||||
@ -191,13 +191,13 @@ AutoGCRooter::trace(JSTracer* trc)
|
||||
|
||||
case STRINGVECTOR: {
|
||||
AutoStringVector::VectorImpl& vector = static_cast<AutoStringVector*>(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<AutoNameVector*>(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<JSObject*>");
|
||||
PersistentRootedMarker<JSScript*>::markChainIfNotNull<TraceRoot>(
|
||||
trc, rt->scriptPersistentRooteds, "PersistentRooted<JSScript*>");
|
||||
PersistentRootedMarker<JSString*>::markChainIfNotNull<MarkStringRoot>(
|
||||
PersistentRootedMarker<JSString*>::markChainIfNotNull<TraceRoot>(
|
||||
trc, rt->stringPersistentRooteds, "PersistentRooted<JSString*>");
|
||||
|
||||
// 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;
|
||||
|
@ -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<JSObject*>* objp, const char* name)
|
||||
JS_PUBLIC_API(void)
|
||||
JS_CallStringTracer(JSTracer* trc, JS::Heap<JSString*>* strp, const char* name)
|
||||
{
|
||||
MarkStringUnbarriered(trc, strp->unsafeGet(), name);
|
||||
TraceManuallyBarrieredEdge(trc, strp->unsafeGet(), name);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
|
@ -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<ICGetElemNativePrototypeCallStub*>(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: {
|
||||
|
@ -1413,7 +1413,7 @@ MarkJitExitFrame(JSTracer* trc, const JitFrameIterator& frame)
|
||||
}
|
||||
case VMFunction::RootString:
|
||||
case VMFunction::RootPropertyName:
|
||||
gc::MarkStringRoot(trc, reinterpret_cast<JSString**>(argBase), "ion-vm-args");
|
||||
TraceRoot(trc, reinterpret_cast<JSString**>(argBase), "ion-vm-args");
|
||||
break;
|
||||
case VMFunction::RootFunction:
|
||||
gc::MarkObjectRoot(trc, reinterpret_cast<JSFunction**>(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<JSString*>(), "ion-vm-out");
|
||||
TraceRoot(trc, footer->outParam<JSString*>(), "ion-vm-out");
|
||||
break;
|
||||
case VMFunction::RootFunction:
|
||||
gc::MarkObjectRoot(trc, footer->outParam<JSFunction*>(), "ion-vm-out");
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -622,7 +622,7 @@ JSCompartment::sweepCrossCompartmentWrappers()
|
||||
break;
|
||||
case CrossCompartmentKey::StringWrapper:
|
||||
MOZ_ASSERT(key.wrapped->asTenured().getTraceKind() == JSTRACE_STRING);
|
||||
keyDying = IsStringAboutToBeFinalized(
|
||||
keyDying = IsAboutToBeFinalizedUnbarriered(
|
||||
reinterpret_cast<JSString**>(&key.wrapped));
|
||||
break;
|
||||
case CrossCompartmentKey::DebuggerScript:
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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 &&
|
||||
|
@ -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<JSString**>(&statics.matchesInput),
|
||||
"AutoRegExpStaticsBuffer matchesInput");
|
||||
TraceRoot(trc, reinterpret_cast<JSString**>(&statics.matchesInput),
|
||||
"AutoRegExpStaticsBuffer matchesInput");
|
||||
}
|
||||
if (statics.lazySource) {
|
||||
MarkStringRoot(trc, reinterpret_cast<JSString**>(&statics.lazySource),
|
||||
"AutoRegExpStaticsBuffer lazySource");
|
||||
TraceRoot(trc, reinterpret_cast<JSString**>(&statics.lazySource),
|
||||
"AutoRegExpStaticsBuffer lazySource");
|
||||
}
|
||||
if (statics.pendingInput) {
|
||||
MarkStringRoot(trc, reinterpret_cast<JSString**>(&statics.pendingInput),
|
||||
"AutoRegExpStaticsBuffer pendingInput");
|
||||
TraceRoot(trc, reinterpret_cast<JSString**>(&statics.pendingInput),
|
||||
"AutoRegExpStaticsBuffer pendingInput");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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() {
|
||||
|
@ -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*) {}
|
||||
|
||||
|
@ -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<UnboxedPlainObject>().data();
|
||||
while (*list != -1) {
|
||||
HeapPtrString* heap = reinterpret_cast<HeapPtrString*>(data + *list);
|
||||
MarkString(trc, heap, "unboxed_string");
|
||||
TraceEdge(trc, heap, "unboxed_string");
|
||||
list++;
|
||||
}
|
||||
list++;
|
||||
|
Loading…
Reference in New Issue
Block a user