зеркало из https://github.com/mozilla/pjs.git
Bug 696666 - Give nsIScriptContext::BindCompiledEventHandler a JSObject scope parameter; r=jst
This commit is contained in:
Родитель
c756600ca1
Коммит
c3e7897ca3
|
@ -74,8 +74,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContextPrincipal,
|
|||
NS_ISCRIPTCONTEXTPRINCIPAL_IID)
|
||||
|
||||
#define NS_ISCRIPTCONTEXT_IID \
|
||||
{ 0xddc9b75f, 0xa230, 0x4966, \
|
||||
{ 0xa6, 0xe0, 0x67, 0x5a, 0xba, 0xc9, 0x08, 0x8c } }
|
||||
{ 0x530d739f, 0x6d79, 0x4919, \
|
||||
{ 0x82, 0xb0, 0xef, 0xeb, 0x75, 0xf8, 0xa6, 0x3f } }
|
||||
|
||||
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
|
||||
know what language we have is a little silly... */
|
||||
|
@ -251,7 +251,7 @@ public:
|
|||
* @return NS_OK if the function was successfully bound
|
||||
*/
|
||||
virtual nsresult BindCompiledEventHandler(nsISupports* aTarget,
|
||||
void *aScope,
|
||||
JSObject* aScope,
|
||||
void* aHandler,
|
||||
nsScriptObjectHolder& aBoundHandler) = 0;
|
||||
|
||||
|
|
|
@ -1969,7 +1969,7 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, void *aScope, void *aHandler
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsJSContext::BindCompiledEventHandler(nsISupports* aTarget, void *aScope,
|
||||
nsJSContext::BindCompiledEventHandler(nsISupports* aTarget, JSObject* aScope,
|
||||
void *aHandler,
|
||||
nsScriptObjectHolder& aBoundHandler)
|
||||
{
|
||||
|
@ -1981,8 +1981,7 @@ nsJSContext::BindCompiledEventHandler(nsISupports* aTarget, void *aScope,
|
|||
|
||||
// Get the jsobject associated with this target
|
||||
JSObject *target = nsnull;
|
||||
nsresult rv = JSObjectFromInterface(aTarget, static_cast<JSObject*>(aScope),
|
||||
&target);
|
||||
nsresult rv = JSObjectFromInterface(aTarget, aScope, &target);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
JSObject *funobj = (JSObject*) aHandler;
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
void* aHandler,
|
||||
nsIArray *argv, nsIVariant **rv);
|
||||
virtual nsresult BindCompiledEventHandler(nsISupports *aTarget,
|
||||
void *aScope,
|
||||
JSObject *aScope,
|
||||
void *aHandler,
|
||||
nsScriptObjectHolder& aBoundHandler);
|
||||
virtual nsresult CompileFunction(void* aTarget,
|
||||
|
|
Загрузка…
Ссылка в новой задаче