Bug 1300211 - Trace XULDocument::mCurrentPrototype. r=smaug
This ensures that if mCurrentPrototype gets added to mPrototypes, it
won't go from gray to black.
MozReview-Commit-ID: 7PyZEa1kpt6
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -2155,16 +2155,20 @@ XULDocument::ApplyPersistentAttributesTo
void
XULDocument::TraceProtos(JSTracer* aTrc, uint32_t aGCNumber)
{
uint32_t i, count = mPrototypes.Length();
for (i = 0; i < count; ++i) {
mPrototypes[i]->TraceProtos(aTrc, aGCNumber);
}
+
+ if (mCurrentPrototype) {
+ mCurrentPrototype->TraceProtos(aTrc, aGCNumber);
+ }
}
//----------------------------------------------------------------------
//
// XULDocument::ContextStack
//
XULDocument::ContextStack::ContextStack()