зеркало из https://github.com/mozilla/gecko-dev.git
Fix build bustage by not using debug-only member in opt code. Bug 398668
This commit is contained in:
Родитель
080b478af0
Коммит
98f7334314
|
@ -99,6 +99,10 @@ public:
|
||||||
// return means a JS exception was set.
|
// return means a JS exception was set.
|
||||||
PRBool ResolveAllFields(JSContext *cx, JSObject *obj) const;
|
PRBool ResolveAllFields(JSContext *cx, JSObject *obj) const;
|
||||||
|
|
||||||
|
PRBool CompiledMembers() const {
|
||||||
|
return mClassObject != nsnull;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Function to call if compilation of a member fails. When this is called,
|
// Function to call if compilation of a member fails. When this is called,
|
||||||
// all members before aBrokenMember are compiled, compilation of
|
// all members before aBrokenMember are compiled, compilation of
|
||||||
|
|
|
@ -287,13 +287,7 @@ nsXBLProtoImplMethod::Traverse(nsCycleCollectionTraversalCallback &cb) const
|
||||||
nsresult
|
nsresult
|
||||||
nsXBLProtoImplAnonymousMethod::Execute(nsIContent* aBoundElement)
|
nsXBLProtoImplAnonymousMethod::Execute(nsIContent* aBoundElement)
|
||||||
{
|
{
|
||||||
if (!mIsCompiled) {
|
NS_PRECONDITION(mIsCompiled, "Can't execute uncompiled method");
|
||||||
// Someone might have enabled script between when the binding would have
|
|
||||||
// been compiled and now. If this is the constructor we shouldn't run it
|
|
||||||
// because our other scripted stuff is not set up, and if it's the
|
|
||||||
// destructor then the constructor never ran. In either case, bail out.
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mJSMethodObject) {
|
if (!mJSMethodObject) {
|
||||||
// Nothing to do here
|
// Nothing to do here
|
||||||
|
|
|
@ -137,7 +137,9 @@ protected:
|
||||||
JSObject * mJSMethodObject; // The JS object for the method (after compilation)
|
JSObject * mJSMethodObject; // The JS object for the method (after compilation)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
PRBool mIsCompiled;
|
PRBool mIsCompiled;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class nsXBLProtoImplAnonymousMethod : public nsXBLProtoImplMethod {
|
class nsXBLProtoImplAnonymousMethod : public nsXBLProtoImplMethod {
|
||||||
|
|
|
@ -473,7 +473,8 @@ nsXBLPrototypeBinding::FlushSkinSheets()
|
||||||
nsresult
|
nsresult
|
||||||
nsXBLPrototypeBinding::BindingAttached(nsIContent* aBoundElement)
|
nsXBLPrototypeBinding::BindingAttached(nsIContent* aBoundElement)
|
||||||
{
|
{
|
||||||
if (mImplementation && mImplementation->mConstructor)
|
if (mImplementation && mImplementation->CompiledMembers() &&
|
||||||
|
mImplementation->mConstructor)
|
||||||
return mImplementation->mConstructor->Execute(aBoundElement);
|
return mImplementation->mConstructor->Execute(aBoundElement);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -481,7 +482,8 @@ nsXBLPrototypeBinding::BindingAttached(nsIContent* aBoundElement)
|
||||||
nsresult
|
nsresult
|
||||||
nsXBLPrototypeBinding::BindingDetached(nsIContent* aBoundElement)
|
nsXBLPrototypeBinding::BindingDetached(nsIContent* aBoundElement)
|
||||||
{
|
{
|
||||||
if (mImplementation && mImplementation->mDestructor)
|
if (mImplementation && mImplementation->CompiledMembers() &&
|
||||||
|
mImplementation->mDestructor)
|
||||||
return mImplementation->mDestructor->Execute(aBoundElement);
|
return mImplementation->mDestructor->Execute(aBoundElement);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче