Bug 698388 - Pass JSObject to nsIScriptContext::CompileFunction; r=sicking

This commit is contained in:
Ms2ger 2011-11-26 11:07:55 +01:00
parent 0c30f5bf0f
commit b5a37a8757
3 changed files with 7 additions and 7 deletions

View File

@ -74,8 +74,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContextPrincipal,
NS_ISCRIPTCONTEXTPRINCIPAL_IID)
#define NS_ISCRIPTCONTEXT_IID \
{ 0x164ea909, 0x5cee, 0x4e20, \
{ 0x9f, 0xed, 0x43, 0x13, 0xab, 0xac, 0x1c, 0xd3 } }
{ 0x4289df58, 0x4f12, 0x4e16, \
{ 0x8c, 0x9a, 0x38, 0xd6, 0x30, 0xc4, 0x4d, 0xe6 } }
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
know what language we have is a little silly... */
@ -257,7 +257,7 @@ public:
* Caller must make sure aFunctionObject is a JS GC root.
*
**/
virtual nsresult CompileFunction(void* aTarget,
virtual nsresult CompileFunction(JSObject* aTarget,
const nsACString& aName,
PRUint32 aArgCount,
const char** aArgArray,

View File

@ -1784,7 +1784,7 @@ nsJSContext::CompileEventHandler(nsIAtom *aName,
// XXX - note that CompileFunction doesn't yet play the nsScriptObjectHolder
// game - caller must still ensure JS GC root.
nsresult
nsJSContext::CompileFunction(void* aTarget,
nsJSContext::CompileFunction(JSObject* aTarget,
const nsACString& aName,
PRUint32 aArgCount,
const char** aArgArray,
@ -1820,7 +1820,7 @@ nsJSContext::CompileFunction(void* aTarget,
}
}
JSObject *target = (JSObject*)aTarget;
JSObject *target = aTarget;
JSAutoRequest ar(mContext);
@ -1829,7 +1829,7 @@ nsJSContext::CompileFunction(void* aTarget,
aShared ? nsnull : target, jsprin,
PromiseFlatCString(aName).get(),
aArgCount, aArgArray,
(jschar*)PromiseFlatString(aBody).get(),
static_cast<const jschar*>(PromiseFlatString(aBody).get()),
aBody.Length(),
aURL, aLineNo,
JSVersion(aVersion));

View File

@ -115,7 +115,7 @@ public:
JSObject *aScope,
void *aHandler,
nsScriptObjectHolder& aBoundHandler);
virtual nsresult CompileFunction(void* aTarget,
virtual nsresult CompileFunction(JSObject* aTarget,
const nsACString& aName,
PRUint32 aArgCount,
const char** aArgArray,