diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 5747478acc2..fa799cb4025 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -311,7 +311,7 @@ class ProtoAndIfaceCache void Trace(JSTracer* aTracer) { for (size_t i = 0; i < ArrayLength(*this); ++i) { - JS::TraceNullableEdge(aTracer, &(*this)[i], "protoAndIfaceCache[i]"); + JS::TraceEdge(aTracer, &(*this)[i], "protoAndIfaceCache[i]"); } } @@ -370,7 +370,7 @@ class ProtoAndIfaceCache Page* p = mPages[i]; if (p) { for (size_t j = 0; j < ArrayLength(*p); ++j) { - JS::TraceNullableEdge(trc, &(*p)[j], "protoAndIfaceCache[i]"); + JS::TraceEdge(trc, &(*p)[j], "protoAndIfaceCache[i]"); } } } diff --git a/dom/bindings/TypedArray.h b/dom/bindings/TypedArray.h index dd609aff558..8305dff4764 100644 --- a/dom/bindings/TypedArray.h +++ b/dom/bindings/TypedArray.h @@ -44,12 +44,8 @@ protected: public: inline void TraceSelf(JSTracer* trc) { - if (mTypedObj) { - JS::UnsafeTraceRoot(trc, &mTypedObj, "TypedArray.mTypedObj"); - } - if (mWrappedObj) { - JS::UnsafeTraceRoot(trc, &mTypedObj, "TypedArray.mWrappedObj"); - } + JS::UnsafeTraceRoot(trc, &mTypedObj, "TypedArray.mTypedObj"); + JS::UnsafeTraceRoot(trc, &mTypedObj, "TypedArray.mWrappedObj"); } private: diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index ec59de0f90a..fa36cf997ce 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -288,7 +288,7 @@ TraceJSObjWrappers(JSTracer *trc, void *data) nsJSObjWrapperKey key = e.front().key(); JS::UnsafeTraceRoot(trc, &key.mJSObj, "sJSObjWrappers key object"); nsJSObjWrapper *wrapper = e.front().value(); - JS::TraceNullableEdge(trc, &wrapper->mJSObj, "sJSObjWrappers wrapper object"); + JS::TraceEdge(trc, &wrapper->mJSObj, "sJSObjWrappers wrapper object"); if (key != e.front().key()) { e.rekeyFront(key); } @@ -2266,8 +2266,8 @@ NPObjectMember_Trace(JSTracer *trc, JSObject *obj) // There's no strong reference from our private data to the // NPObject, so make sure to mark the NPObject wrapper to keep the // NPObject alive as long as this NPObjectMember is alive. - JS::TraceNullableEdge(trc, &memberPrivate->npobjWrapper, - "NPObject Member => npobjWrapper"); + JS::TraceEdge(trc, &memberPrivate->npobjWrapper, + "NPObject Member => npobjWrapper"); } static bool diff --git a/dom/xul/nsXULElement.h b/dom/xul/nsXULElement.h index 67665561d19..767184d2100 100644 --- a/dom/xul/nsXULElement.h +++ b/dom/xul/nsXULElement.h @@ -249,7 +249,7 @@ public: void TraceScriptObject(JSTracer* aTrc) { - JS::TraceNullableEdge(aTrc, &mScriptObject, "active window XUL prototype script"); + JS::TraceEdge(aTrc, &mScriptObject, "active window XUL prototype script"); } void Trace(const TraceCallbacks& aCallbacks, void* aClosure) diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 915fa2bf24a..02e80dcfbcb 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -2196,7 +2196,7 @@ public: // This is the only time we should be tracing our mFlatJSObject, // normally somebody else is doing that. Be careful not to trace the // bogus INVALID_OBJECT value we can have during init, though. - JS::TraceNullableEdge(trc, &mFlatJSObject, "XPCWrappedNative::mFlatJSObject"); + JS::TraceEdge(trc, &mFlatJSObject, "XPCWrappedNative::mFlatJSObject"); } static void Trace(JSTracer* trc, JSObject* obj); diff --git a/xpcom/base/CycleCollectedJSRuntime.cpp b/xpcom/base/CycleCollectedJSRuntime.cpp index 6b923ff96b2..d65b9e8081d 100644 --- a/xpcom/base/CycleCollectedJSRuntime.cpp +++ b/xpcom/base/CycleCollectedJSRuntime.cpp @@ -801,7 +801,7 @@ struct JsGcTracer : public TraceCallbacks virtual void Trace(JS::TenuredHeap* aPtr, const char* aName, void* aClosure) const override { - JS::TraceNullableEdge(static_cast(aClosure), aPtr, aName); + JS::TraceEdge(static_cast(aClosure), aPtr, aName); } virtual void Trace(JS::Heap* aPtr, const char* aName, void* aClosure) const override