mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 698390 - Make nsIScriptContext::CallEventHandler take a JSObject handler parameter; r=sicking
This commit is contained in:
parent
b6ae58dbc7
commit
1404baaf43
@ -74,8 +74,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContextPrincipal,
|
||||
NS_ISCRIPTCONTEXTPRINCIPAL_IID)
|
||||
|
||||
#define NS_ISCRIPTCONTEXT_IID \
|
||||
{ 0x67493f96, 0x304c, 0x4bd6, \
|
||||
{ 0xac, 0xe7, 0xca, 0xeb, 0x85, 0xd1, 0x0b, 0x9d } }
|
||||
{ 0x1843adb8, 0xd646, 0x4103, \
|
||||
{ 0x8d, 0xa3, 0xc5, 0x12, 0xb9, 0xca, 0xfb, 0xcd } }
|
||||
|
||||
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
|
||||
know what language we have is a little silly... */
|
||||
@ -221,7 +221,7 @@ public:
|
||||
* @param rval out parameter returning result
|
||||
**/
|
||||
virtual nsresult CallEventHandler(nsISupports* aTarget,
|
||||
JSObject* aScope, void* aHandler,
|
||||
JSObject* aScope, JSObject* aHandler,
|
||||
nsIArray *argv, nsIVariant **rval) = 0;
|
||||
|
||||
/**
|
||||
|
@ -1848,7 +1848,8 @@ nsJSContext::CompileFunction(JSObject* aTarget,
|
||||
|
||||
nsresult
|
||||
nsJSContext::CallEventHandler(nsISupports* aTarget, JSObject* aScope,
|
||||
void *aHandler, nsIArray *aargv, nsIVariant **arv)
|
||||
JSObject* aHandler, nsIArray* aargv,
|
||||
nsIVariant** arv)
|
||||
{
|
||||
NS_ENSURE_TRUE(mIsInitialized, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
@ -1858,7 +1859,7 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, JSObject* aScope,
|
||||
|
||||
#ifdef NS_FUNCTION_TIMER
|
||||
{
|
||||
JSObject *obj = static_cast<JSObject *>(aHandler);
|
||||
JSObject *obj = aHandler;
|
||||
if (js::IsFunctionProxy(obj))
|
||||
obj = js::UnwrapObject(obj);
|
||||
JSString *id = JS_GetFunctionId(static_cast<JSFunction *>(JS_GetPrivate(mContext, obj)));
|
||||
@ -1895,7 +1896,7 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, JSObject* aScope,
|
||||
PRUint32 argc = 0;
|
||||
jsval *argv = nsnull;
|
||||
|
||||
JSObject *funobj = static_cast<JSObject *>(aHandler);
|
||||
JSObject *funobj = aHandler;
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
rv = sSecurityManager->GetObjectPrincipal(mContext, funobj,
|
||||
getter_AddRefs(principal));
|
||||
|
@ -109,7 +109,7 @@ public:
|
||||
PRUint32 aVersion,
|
||||
nsScriptObjectHolder &aHandler);
|
||||
virtual nsresult CallEventHandler(nsISupports* aTarget, JSObject* aScope,
|
||||
void* aHandler,
|
||||
JSObject* aHandler,
|
||||
nsIArray *argv, nsIVariant **rv);
|
||||
virtual nsresult BindCompiledEventHandler(nsISupports *aTarget,
|
||||
JSObject *aScope,
|
||||
|
Loading…
Reference in New Issue
Block a user