Bug 887116 - Don't hold a reference to nsLayoutStatics in WebIDL CallbackObject. r=khuey

This commit is contained in:
Nikhil Marathe 2013-08-13 14:20:01 -07:00
parent 71a3bf1139
commit de03dc1d8a

View File

@ -97,8 +97,6 @@ private:
// Set mCallback before we hold, on the off chance that a GC could somehow
// happen in there... (which would be pretty odd, granted).
mCallback = aCallback;
// Make sure we'll be able to drop as needed
nsLayoutStatics::AddRef();
NS_HOLD_JS_OBJECTS(this, CallbackObject);
}
@ -108,7 +106,6 @@ protected:
if (mCallback) {
mCallback = nullptr;
NS_DROP_JS_OBJECTS(this, CallbackObject);
nsLayoutStatics::Release();
}
}