mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout Bug 1235598 Part 2 because of merge bustage on a CLOSED TREE
This commit is contained in:
parent
90dc49a329
commit
e2ccf2b5df
@ -258,7 +258,7 @@ protected:
|
||||
void TraceWrapper(JSTracer* aTrc, const char* name)
|
||||
{
|
||||
if (mWrapper) {
|
||||
js::UnsafeTraceManuallyBarrieredEdge(aTrc, &mWrapper, name);
|
||||
JS_CallUnbarrieredObjectTracer(aTrc, &mWrapper, name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,9 @@ class ProtoAndIfaceCache
|
||||
|
||||
void Trace(JSTracer* aTracer) {
|
||||
for (size_t i = 0; i < ArrayLength(*this); ++i) {
|
||||
JS::TraceNullableEdge(aTracer, &(*this)[i], "protoAndIfaceCache[i]");
|
||||
if ((*this)[i]) {
|
||||
JS_CallObjectTracer(aTracer, &(*this)[i], "protoAndIfaceCache[i]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,7 +395,9 @@ class ProtoAndIfaceCache
|
||||
Page* p = mPages[i];
|
||||
if (p) {
|
||||
for (size_t j = 0; j < ArrayLength(*p); ++j) {
|
||||
JS::TraceNullableEdge(trc, &(*p)[j], "protoAndIfaceCache[i]");
|
||||
if ((*p)[j]) {
|
||||
JS_CallObjectTracer(trc, &(*p)[j], "protoAndIfaceCache[i]");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,9 @@ TraceJSObjWrappers(JSTracer *trc, void *data)
|
||||
nsJSObjWrapperKey key = e.front().key();
|
||||
JS_CallUnbarrieredObjectTracer(trc, &key.mJSObj, "sJSObjWrappers key object");
|
||||
nsJSObjWrapper *wrapper = e.front().value();
|
||||
JS::TraceNullableEdge(trc, &wrapper->mJSObj, "sJSObjWrappers wrapper object");
|
||||
if (wrapper->mJSObj) {
|
||||
JS_CallObjectTracer(trc, &wrapper->mJSObj, "sJSObjWrappers wrapper object");
|
||||
}
|
||||
if (key != e.front().key()) {
|
||||
e.rekeyFront(key);
|
||||
}
|
||||
@ -2258,16 +2260,21 @@ NPObjectMember_Trace(JSTracer *trc, JSObject *obj)
|
||||
if (!memberPrivate)
|
||||
return;
|
||||
|
||||
// Our NPIdentifier is not always interned, so we must trace it.
|
||||
JS::TraceEdge(trc, &memberPrivate->methodName, "NPObjectMemberPrivate.methodName");
|
||||
// Our NPIdentifier is not always interned, so we must root it explicitly.
|
||||
JS_CallIdTracer(trc, &memberPrivate->methodName, "NPObjectMemberPrivate.methodName");
|
||||
|
||||
JS::TraceEdge(trc, &memberPrivate->fieldValue, "NPObject Member => fieldValue");
|
||||
if (!memberPrivate->fieldValue.isPrimitive()) {
|
||||
JS_CallValueTracer(trc, &memberPrivate->fieldValue,
|
||||
"NPObject Member => fieldValue");
|
||||
}
|
||||
|
||||
// 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,
|
||||
if (memberPrivate->npobjWrapper) {
|
||||
JS_CallObjectTracer(trc, &memberPrivate->npobjWrapper,
|
||||
"NPObject Member => npobjWrapper");
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -559,8 +559,8 @@ public:
|
||||
private:
|
||||
virtual void trace(JSTracer* aTrc)
|
||||
{
|
||||
JS::TraceEdge(aTrc, &mStateData->mResponse,
|
||||
"XMLHttpRequest::StateData::mResponse");
|
||||
JS_CallValueTracer(aTrc, &mStateData->mResponse,
|
||||
"XMLHttpRequest::StateData::mResponse");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -249,7 +249,9 @@ public:
|
||||
|
||||
void TraceScriptObject(JSTracer* aTrc)
|
||||
{
|
||||
JS::TraceNullableEdge(aTrc, &mScriptObject, "active window XUL prototype script");
|
||||
if (mScriptObject) {
|
||||
JS_CallScriptTracer(aTrc, &mScriptObject, "active window XUL prototype script");
|
||||
}
|
||||
}
|
||||
|
||||
void Trace(const TraceCallbacks& aCallbacks, void* aClosure)
|
||||
|
@ -630,7 +630,7 @@ static PLDHashOperator
|
||||
MarkScriptsInGC(nsIURI* aKey, JS::Heap<JSScript*>& aScript, void* aClosure)
|
||||
{
|
||||
JSTracer* trc = static_cast<JSTracer*>(aClosure);
|
||||
JS::TraceEdge(trc, &aScript, "nsXULPrototypeCache script");
|
||||
JS_CallScriptTracer(trc, &aScript, "nsXULPrototypeCache script");
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,10 @@ IdToObjectMap::init()
|
||||
void
|
||||
IdToObjectMap::trace(JSTracer* trc)
|
||||
{
|
||||
for (Table::Range r(table_.all()); !r.empty(); r.popFront())
|
||||
JS::TraceEdge(trc, &r.front().value(), "ipc-object");
|
||||
for (Table::Range r(table_.all()); !r.empty(); r.popFront()) {
|
||||
DebugOnly<JSObject*> prior = r.front().value().get();
|
||||
JS_CallObjectTracer(trc, &r.front().value(), "ipc-object");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -66,7 +66,7 @@ XPCTraceableVariant::~XPCTraceableVariant()
|
||||
void XPCTraceableVariant::TraceJS(JSTracer* trc)
|
||||
{
|
||||
MOZ_ASSERT(mJSVal.isMarkable());
|
||||
JS::TraceEdge(trc, &mJSVal, "XPCTraceableVariant::mJSVal");
|
||||
JS_CallValueTracer(trc, &mJSVal, "XPCTraceableVariant::mJSVal");
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(XPCVariant)
|
||||
|
@ -291,7 +291,7 @@ void
|
||||
nsXPCWrappedJS::TraceJS(JSTracer* trc)
|
||||
{
|
||||
MOZ_ASSERT(mRefCnt >= 2 && IsValid(), "must be strongly referenced");
|
||||
JS::TraceEdge(trc, &mJSObj, "nsXPCWrappedJS::mJSObj");
|
||||
JS_CallObjectTracer(trc, &mJSObj, "nsXPCWrappedJS::mJSObj");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -2360,5 +2360,5 @@ XPCJSObjectHolder::~XPCJSObjectHolder()
|
||||
void
|
||||
XPCJSObjectHolder::TraceJS(JSTracer* trc)
|
||||
{
|
||||
JS::TraceEdge(trc, &mJSObj, "XPCJSObjectHolder::mJSObj");
|
||||
JS_CallObjectTracer(trc, &mJSObj, "XPCJSObjectHolder::mJSObj");
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ XPCWrappedNativeScope::~XPCWrappedNativeScope()
|
||||
void
|
||||
XPCWrappedNativeScope::TraceWrappedNativesInAllScopes(JSTracer* trc, XPCJSRuntime* rt)
|
||||
{
|
||||
// Do JS::TraceEdge for all wrapped natives with external references, as
|
||||
// Do JS_CallTracer for all wrapped natives with external references, as
|
||||
// well as any DOM expando objects.
|
||||
for (XPCWrappedNativeScope* cur = gScopes; cur; cur = cur->mNext) {
|
||||
for (auto i = cur->mWrappedNativeMap->Iter(); !i.Done(); i.Next()) {
|
||||
@ -479,7 +479,7 @@ XPCWrappedNativeScope::TraceWrappedNativesInAllScopes(JSTracer* trc, XPCJSRuntim
|
||||
|
||||
if (cur->mDOMExpandoSet) {
|
||||
for (DOMExpandoSet::Enum e(*cur->mDOMExpandoSet); !e.empty(); e.popFront())
|
||||
JS::TraceEdge(trc, &e.mutableFront(), "DOM expando object");
|
||||
JS_CallObjectTracer(trc, &e.mutableFront(), "DOM expando object");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -781,17 +781,17 @@ struct JsGcTracer : public TraceCallbacks
|
||||
virtual void Trace(JS::Heap<JS::Value>* aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
{
|
||||
JS::TraceEdge(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
JS_CallValueTracer(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
}
|
||||
virtual void Trace(JS::Heap<jsid>* aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
{
|
||||
JS::TraceEdge(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
JS_CallIdTracer(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
}
|
||||
virtual void Trace(JS::Heap<JSObject*>* aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
{
|
||||
JS::TraceEdge(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
JS_CallObjectTracer(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
}
|
||||
virtual void Trace(JSObject** aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
@ -806,17 +806,17 @@ struct JsGcTracer : public TraceCallbacks
|
||||
virtual void Trace(JS::Heap<JSString*>* aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
{
|
||||
JS::TraceEdge(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
JS_CallStringTracer(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
}
|
||||
virtual void Trace(JS::Heap<JSScript*>* aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
{
|
||||
JS::TraceEdge(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
JS_CallScriptTracer(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
}
|
||||
virtual void Trace(JS::Heap<JSFunction*>* aPtr, const char* aName,
|
||||
void* aClosure) const override
|
||||
{
|
||||
JS::TraceEdge(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
JS_CallFunctionTracer(static_cast<JSTracer*>(aClosure), aPtr, aName);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,7 @@ TraceArray(JSTracer* trc, void* data)
|
||||
{
|
||||
ArrayT* array = static_cast<ArrayT *>(data);
|
||||
for (unsigned i = 0; i < array->Length(); ++i)
|
||||
JS::TraceEdge(trc, &array->ElementAt(i), "array-element");
|
||||
JS_CallObjectTracer(trc, &array->ElementAt(i), "array-element");
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user