Bug 650161 - Allow for the possibility that the wrapper cache hasn't been initialized yet when updating it r=bz

This commit is contained in:
Jon Coppeard 2014-10-03 10:04:19 +01:00
parent 298d965f7b
commit efaffdfe97

View File

@ -123,9 +123,11 @@ public:
*/ */
void UpdateWrapper(JSObject* aNewObject, const JSObject* aOldObject) void UpdateWrapper(JSObject* aNewObject, const JSObject* aOldObject)
{ {
if (mWrapper) {
MOZ_ASSERT(mWrapper == aOldObject); MOZ_ASSERT(mWrapper == aOldObject);
mWrapper = aNewObject; mWrapper = aNewObject;
} }
}
bool PreservingWrapper() bool PreservingWrapper()
{ {