Backed out changeset 3d769520a0be (bug 937303) for build bustage

This commit is contained in:
Wes Kocher 2013-11-11 14:50:00 -08:00
Родитель 102145c94d
Коммит b4defcfe2f
4 изменённых файлов: 16 добавлений и 34 удалений

Просмотреть файл

@ -518,10 +518,8 @@ CycleCollectedJSRuntime::DescribeGCThing(bool aIsMarked, void* aThing,
}
char name[72];
uint64_t compartmentAddress = 0;
if (aTraceKind == JSTRACE_OBJECT) {
JSObject* obj = static_cast<JSObject*>(aThing);
compartmentAddress = (uint64_t)js::GetObjectCompartment(obj);
const js::Class* clasp = js::GetObjectClass(obj);
// Give the subclass a chance to do something
@ -557,7 +555,7 @@ CycleCollectedJSRuntime::DescribeGCThing(bool aIsMarked, void* aThing,
}
// Disable printing global for objects while we figure out ObjShrink fallout.
aCb.DescribeGCedNode(aIsMarked, name, compartmentAddress);
aCb.DescribeGCedNode(aIsMarked, name);
}
void

Просмотреть файл

@ -1115,7 +1115,7 @@ GraphWalker<Visitor>::DoWalk(nsDeque &aQueue)
struct CCGraphDescriber : public LinkedListElement<CCGraphDescriber>
{
CCGraphDescriber()
: mAddress("0x"), mCnt(0), mType(eUnknown) {}
: mAddress("0x"), mToAddress("0x"), mCnt(0), mType(eUnknown) {}
enum Type
{
@ -1129,8 +1129,8 @@ struct CCGraphDescriber : public LinkedListElement<CCGraphDescriber>
};
nsCString mAddress;
nsCString mToAddress;
nsCString mName;
nsCString mCompartmentOrToAddress;
uint32_t mCnt;
Type mType;
};
@ -1290,8 +1290,7 @@ public:
return NS_OK;
}
NS_IMETHOD NoteGCedObject(uint64_t aAddress, bool aMarked,
const char *aObjectDescription,
uint64_t aCompartmentAddress)
const char *aObjectDescription)
{
if (!mDisableLog) {
fprintf(mStream, "%p [gc%s] %s\n", (void*)aAddress,
@ -1306,12 +1305,6 @@ public:
CCGraphDescriber::eGCedObject;
d->mAddress = mCurrentAddress;
d->mName.Append(aObjectDescription);
if (aCompartmentAddress) {
d->mCompartmentOrToAddress.AssignLiteral("0x");
d->mCompartmentOrToAddress.AppendInt(aCompartmentAddress, 16);
} else {
d->mCompartmentOrToAddress.SetIsVoid(true);
}
}
return NS_OK;
}
@ -1325,8 +1318,7 @@ public:
mDescribers.insertBack(d);
d->mType = CCGraphDescriber::eEdge;
d->mAddress = mCurrentAddress;
d->mCompartmentOrToAddress.AssignLiteral("0x");
d->mCompartmentOrToAddress.AppendInt(aToAddress, 16);
d->mToAddress.AppendInt(aToAddress, 16);
d->mName.Append(aEdgeName);
}
return NS_OK;
@ -1429,12 +1421,11 @@ public:
aHandler->NoteGCedObject(d->mAddress,
d->mType ==
CCGraphDescriber::eGCMarkedObject,
d->mName,
d->mCompartmentOrToAddress);
d->mName);
break;
case CCGraphDescriber::eEdge:
aHandler->NoteEdge(d->mAddress,
d->mCompartmentOrToAddress,
d->mToAddress,
d->mName);
break;
case CCGraphDescriber::eRoot:
@ -1607,8 +1598,7 @@ public:
// nsCycleCollectionTraversalCallback methods.
NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt refCount,
const char *objName);
NS_IMETHOD_(void) DescribeGCedNode(bool isMarked, const char *objName,
uint64_t aCompartmentAddress);
NS_IMETHOD_(void) DescribeGCedNode(bool isMarked, const char *objName);
NS_IMETHOD_(void) NoteXPCOMChild(nsISupports *child);
NS_IMETHOD_(void) NoteJSChild(void *child);
@ -1792,15 +1782,14 @@ GCGraphBuilder::DescribeRefCountedNode(nsrefcnt refCount, const char *objName)
}
NS_IMETHODIMP_(void)
GCGraphBuilder::DescribeGCedNode(bool isMarked, const char *objName,
uint64_t aCompartmentAddress)
GCGraphBuilder::DescribeGCedNode(bool isMarked, const char *objName)
{
uint32_t refCount = isMarked ? UINT32_MAX : 0;
mCollector->mVisitedGCed++;
if (mListener) {
mListener->NoteGCedObject((uint64_t)mCurrPi->mPointer, isMarked,
objName, aCompartmentAddress);
objName);
}
DescribeNode(refCount, objName);
@ -1934,8 +1923,7 @@ public:
NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt refcount,
const char *objname) {}
NS_IMETHOD_(void) DescribeGCedNode(bool ismarked,
const char *objname,
uint64_t aCompartmentAddress) {}
const char *objname) {}
NS_IMETHOD_(void) NoteNextEdgeName(const char* name) {}
bool MayHaveChild() {
return mMayHaveChild;

Просмотреть файл

@ -4,7 +4,7 @@
#include "nsISupports.idl"
[scriptable, uuid(39a8f80e-7eee-4141-b9ef-6e2a7d6e466d)]
[scriptable, uuid(0ef15f15-7783-4991-af68-4976d7ec2267)]
interface nsICycleCollectorHandler : nsISupports
{
void noteRefCountedObject(in ACString aAddress,
@ -12,8 +12,7 @@ interface nsICycleCollectorHandler : nsISupports
in ACString aObjectDescription);
void noteGCedObject(in ACString aAddress,
in boolean aMarked,
in ACString aObjectDescription,
in ACString aCompartmentAddress);
in ACString aObjectDescription);
void noteEdge(in ACString aFromAddress,
in ACString aToAddress,
in ACString aEdgeName);
@ -35,7 +34,7 @@ interface nsICycleCollectorHandler : nsISupports
* a call to end(). If begin() returns an error none of the other
* functions will be called.
*/
[scriptable, builtinclass, uuid(7096e77d-7834-4996-b52c-50564144d4be)]
[scriptable, builtinclass, uuid(32a3ab19-82a3-4096-a12a-de37274f51c3)]
interface nsICycleCollectorListener : nsISupports
{
nsICycleCollectorListener allTraces();
@ -56,8 +55,7 @@ interface nsICycleCollectorListener : nsISupports
in string aObjectDescription);
void noteGCedObject (in unsigned long long aAddress,
in boolean aMarked,
in string aObjectDescription,
in unsigned long long aCompartmentAddress);
in string aObjectDescription);
void noteEdge(in unsigned long long aToAddress,
in string aEdgeName);
void noteWeakMapEntry(in unsigned long long aMap,

Просмотреть файл

@ -19,10 +19,8 @@ public:
// WANT_DEBUG_INFO in mFlags.
NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt refcount,
const char* objname) = 0;
// Note, aCompartmentAddress is 0 if it is unknown.
NS_IMETHOD_(void) DescribeGCedNode(bool ismarked,
const char* objname,
uint64_t aCompartmentAddress = 0) = 0;
const char* objname) = 0;
NS_IMETHOD_(void) NoteXPCOMChild(nsISupports *child) = 0;
NS_IMETHOD_(void) NoteJSChild(void *child) = 0;