From 1e02445fd17fd7d44ef2e5f9c06b69a399ebda02 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Wed, 14 Jun 2006 01:31:25 +0000 Subject: [PATCH] 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 --- mozilla/content/xul/content/src/nsXULElement.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp index 6ece0c74db3..53c298ab894 100644 --- a/mozilla/content/xul/content/src/nsXULElement.cpp +++ b/mozilla/content/xul/content/src/nsXULElement.cpp @@ -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);