Always call BindCompiledEventHandler now that we treat all event handlers as being shared. bug 341356, r=mhammond sr=sicking a=pavlov

git-svn-id: svn://10.0.0.236/trunk@199858 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2006-06-14 01:31:25 +00:00
parent d779957f04
commit 1e02445fd1

View File

@@ -695,16 +695,11 @@ nsXULElement::CompileEventHandler(nsIScriptContext* aContext,
aBody, aURL, aLineNo, aHandler);
if (NS_FAILED(rv)) return rv;
if (mPrototype && xuldoc) {
// If it's a shared handler, we need to bind the shared
// function object to the real target.
// XXX: Shouldn't this use context and not aContext?
// XXXmarkh - is GetNativeGlobal() the correct scope?
rv = aContext->BindCompiledEventHandler(aTarget, aContext->GetNativeGlobal(),
aName, aHandler);
if (NS_FAILED(rv)) return rv;
}
// XXX: Shouldn't this use context and not aContext?
// XXXmarkh - is GetNativeGlobal() the correct scope?
rv = aContext->BindCompiledEventHandler(aTarget, aContext->GetNativeGlobal(),
aName, aHandler);
if (NS_FAILED(rv)) return rv;
nsXULPrototypeAttribute *attr =
FindPrototypeAttribute(kNameSpaceID_None, aName);