mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix build bustage by not using debug-only member in opt code. Bug 398668
This commit is contained in:
parent
406024c657
commit
9fecf5cc61
@ -99,6 +99,10 @@ public:
|
||||
// return means a JS exception was set.
|
||||
PRBool ResolveAllFields(JSContext *cx, JSObject *obj) const;
|
||||
|
||||
PRBool CompiledMembers() const {
|
||||
return mClassObject != nsnull;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Function to call if compilation of a member fails. When this is called,
|
||||
// all members before aBrokenMember are compiled, compilation of
|
||||
|
@ -287,13 +287,7 @@ nsXBLProtoImplMethod::Traverse(nsCycleCollectionTraversalCallback &cb) const
|
||||
nsresult
|
||||
nsXBLProtoImplAnonymousMethod::Execute(nsIContent* aBoundElement)
|
||||
{
|
||||
if (!mIsCompiled) {
|
||||
// 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;
|
||||
}
|
||||
NS_PRECONDITION(mIsCompiled, "Can't execute uncompiled method");
|
||||
|
||||
if (!mJSMethodObject) {
|
||||
// Nothing to do here
|
||||
|
@ -137,7 +137,9 @@ protected:
|
||||
JSObject * mJSMethodObject; // The JS object for the method (after compilation)
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
PRBool mIsCompiled;
|
||||
#endif
|
||||
};
|
||||
|
||||
class nsXBLProtoImplAnonymousMethod : public nsXBLProtoImplMethod {
|
||||
|
@ -473,7 +473,8 @@ nsXBLPrototypeBinding::FlushSkinSheets()
|
||||
nsresult
|
||||
nsXBLPrototypeBinding::BindingAttached(nsIContent* aBoundElement)
|
||||
{
|
||||
if (mImplementation && mImplementation->mConstructor)
|
||||
if (mImplementation && mImplementation->CompiledMembers() &&
|
||||
mImplementation->mConstructor)
|
||||
return mImplementation->mConstructor->Execute(aBoundElement);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -481,7 +482,8 @@ nsXBLPrototypeBinding::BindingAttached(nsIContent* aBoundElement)
|
||||
nsresult
|
||||
nsXBLPrototypeBinding::BindingDetached(nsIContent* aBoundElement)
|
||||
{
|
||||
if (mImplementation && mImplementation->mDestructor)
|
||||
if (mImplementation && mImplementation->CompiledMembers() &&
|
||||
mImplementation->mDestructor)
|
||||
return mImplementation->mDestructor->Execute(aBoundElement);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user