Bug 560643 - Add a special jsval type to XPIDL. Part 1, rename JSVal -> jsval in existing IDL. r+sr=jst.

--HG--
extra : rebase_source : 3d50f7468277883a26790df13a639ce37757a257
This commit is contained in:
Jason Orendorff 2010-05-12 08:18:51 -05:00
Родитель 13a23444f7
Коммит 1e779602f9
17 изменённых файлов: 56 добавлений и 56 удалений

Просмотреть файл

@ -51,7 +51,7 @@ interface nsIScriptSecurityManager : nsIXPCSecurityManager
[noscript] void checkPropertyAccess(in JSContextPtr aJSContext, [noscript] void checkPropertyAccess(in JSContextPtr aJSContext,
in JSObjectPtr aJSObject, in JSObjectPtr aJSObject,
in string aClassName, in string aClassName,
in JSVal aProperty, in jsval aProperty,
in PRUint32 aAction); in PRUint32 aAction);
/** /**

Просмотреть файл

@ -46,7 +46,7 @@ interface nsIScriptGlobalObject;
#include "jspubtd.h" #include "jspubtd.h"
%} %}
native JSVal(jsval); native jsval(jsval);
[ptr] native JSValPtr(jsval); [ptr] native JSValPtr(jsval);
[ptr] native JSContext(JSContext); [ptr] native JSContext(JSContext);
@ -71,5 +71,5 @@ interface nsIJSON : nsISupports
[noscript] AString encodeFromJSVal(in JSValPtr value, in JSContext cx); [noscript] AString encodeFromJSVal(in JSValPtr value, in JSContext cx);
// Make sure you GCroot the result of this function before using it. // Make sure you GCroot the result of this function before using it.
[noscript] JSVal decodeToJSVal(in AString str, in JSContext cx); [noscript] jsval decodeToJSVal(in AString str, in JSContext cx);
}; };

Просмотреть файл

@ -745,7 +745,7 @@ nsJSSh::GetPrincipal()
#include "xpc_map_end.h" /* This will #undef the above */ #include "xpc_map_end.h" /* This will #undef the above */
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx,
in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsJSSh::NewResolve(nsIXPConnectWrappedNative *wrapper, nsJSSh::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,

Просмотреть файл

@ -53,7 +53,7 @@
[ptr] native JSDValue(JSDValue); [ptr] native JSDValue(JSDValue);
[ptr] native JSRuntime(JSRuntime); [ptr] native JSRuntime(JSRuntime);
[ptr] native JSContext(JSContext); [ptr] native JSContext(JSContext);
native JSVal(jsval); native jsval(jsval);
/* interfaces we declare in this file */ /* interfaces we declare in this file */
interface jsdIDebuggerService; interface jsdIDebuggerService;
@ -364,7 +364,7 @@ interface jsdIDebuggerService : nsISupports
/** /**
* The same as above but to be called from C++. * The same as above but to be called from C++.
*/ */
[noscript] jsdIValue wrapJSValue (in JSVal value); [noscript] jsdIValue wrapJSValue (in jsval value);
/* XXX these two routines are candidates for refactoring. The only problem /* XXX these two routines are candidates for refactoring. The only problem
* is that it is not clear where and how they should land. * is that it is not clear where and how they should land.

Просмотреть файл

@ -69,14 +69,14 @@ interface nsIDispatchSupport : nsISupports
* @param comvar The COM Variant to be converted. * @param comvar The COM Variant to be converted.
* @param val The jsval to receive the converted value. * @param val The jsval to receive the converted value.
*/ */
void COMVariant2JSVal(in COMVARIANTPtr comvar, out JSVal val); void COMVariant2JSVal(in COMVARIANTPtr comvar, out jsval val);
/** /**
* Converts a jsval to a COM Variant * Converts a jsval to a COM Variant
* @param var The jsval to be converted. * @param var The jsval to be converted.
* @param comvar The COM Variant to receive the converted value * @param comvar The COM Variant to receive the converted value
*/ */
void JSVal2COMVariant(in JSVal var, out COMVARIANT comvar); void JSVal2COMVariant(in jsval var, out COMVARIANT comvar);
/** /**
* Test if the class is safe to host. * Test if the class is safe to host.

Просмотреть файл

@ -122,23 +122,23 @@ interface nsIXPCScriptable : nsISupports
in JSContextPtr cx, in JSObjectPtr obj); in JSContextPtr cx, in JSObjectPtr obj);
PRBool addProperty(in nsIXPConnectWrappedNative wrapper, PRBool addProperty(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
in JSValPtr vp); in JSValPtr vp);
PRBool delProperty(in nsIXPConnectWrappedNative wrapper, PRBool delProperty(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
in JSValPtr vp); in JSValPtr vp);
// The returnCode should be set to NS_SUCCESS_I_DID_SOMETHING if // The returnCode should be set to NS_SUCCESS_I_DID_SOMETHING if
// this method does something. // this method does something.
PRBool getProperty(in nsIXPConnectWrappedNative wrapper, PRBool getProperty(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
in JSValPtr vp); in JSValPtr vp);
// The returnCode should be set to NS_SUCCESS_I_DID_SOMETHING if // The returnCode should be set to NS_SUCCESS_I_DID_SOMETHING if
// this method does something. // this method does something.
PRBool setProperty(in nsIXPConnectWrappedNative wrapper, PRBool setProperty(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
in JSValPtr vp); in JSValPtr vp);
PRBool enumerate(in nsIXPConnectWrappedNative wrapper, PRBool enumerate(in nsIXPConnectWrappedNative wrapper,
@ -149,7 +149,7 @@ interface nsIXPCScriptable : nsISupports
in PRUint32 enum_op, in JSValPtr statep, out JSID idp); in PRUint32 enum_op, in JSValPtr statep, out JSID idp);
PRBool newResolve(in nsIXPConnectWrappedNative wrapper, PRBool newResolve(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
in PRUint32 flags, out JSObjectPtr objp); in PRUint32 flags, out JSObjectPtr objp);
PRBool convert(in nsIXPConnectWrappedNative wrapper, PRBool convert(in nsIXPConnectWrappedNative wrapper,
@ -160,7 +160,7 @@ interface nsIXPCScriptable : nsISupports
in JSContextPtr cx, in JSObjectPtr obj); in JSContextPtr cx, in JSObjectPtr obj);
PRBool checkAccess(in nsIXPConnectWrappedNative wrapper, PRBool checkAccess(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSContextPtr cx, in JSObjectPtr obj, in jsval id,
in PRUint32 mode, in JSValPtr vp); in PRUint32 mode, in JSValPtr vp);
PRBool call(in nsIXPConnectWrappedNative wrapper, PRBool call(in nsIXPConnectWrappedNative wrapper,
@ -173,13 +173,13 @@ interface nsIXPCScriptable : nsISupports
PRBool hasInstance(in nsIXPConnectWrappedNative wrapper, PRBool hasInstance(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSContextPtr cx, in JSObjectPtr obj,
in JSVal val, out PRBool bp); in jsval val, out PRBool bp);
void trace(in nsIXPConnectWrappedNative wrapper, void trace(in nsIXPConnectWrappedNative wrapper,
in JSTracerPtr trc, in JSObjectPtr obj); in JSTracerPtr trc, in JSObjectPtr obj);
PRBool equality(in nsIXPConnectWrappedNative wrapper, PRBool equality(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj, in JSVal val); in JSContextPtr cx, in JSObjectPtr obj, in jsval val);
JSObjectPtr outerObject(in nsIXPConnectWrappedNative wrapper, JSObjectPtr outerObject(in nsIXPConnectWrappedNative wrapper,
in JSContextPtr cx, in JSObjectPtr obj); in JSContextPtr cx, in JSObjectPtr obj);

Просмотреть файл

@ -52,7 +52,7 @@ interface nsIClassInfo;
[ptr] native JSContextPtr(JSContext); [ptr] native JSContextPtr(JSContext);
[ptr] native JSObjectPtr(JSObject); [ptr] native JSObjectPtr(JSObject);
native JSVal(jsval); native jsval(jsval);
[ptr] native JSStackFramePtr(JSStackFrame); [ptr] native JSStackFramePtr(JSStackFrame);
[uuid(31431440-f1ce-11d2-985a-006008962422)] [uuid(31431440-f1ce-11d2-985a-006008962422)]
@ -109,6 +109,6 @@ interface nsIXPCSecurityManager : nsISupports
in JSObjectPtr aJSObject, in JSObjectPtr aJSObject,
in nsISupports aObj, in nsISupports aObj,
in nsIClassInfo aClassInfo, in nsIClassInfo aClassInfo,
in JSVal aName, in jsval aName,
inout voidPtr aPolicy); inout voidPtr aPolicy);
}; };

Просмотреть файл

@ -59,7 +59,7 @@
/***************************************************************************/ /***************************************************************************/
// NB: JSVal is declared in nsIVariant.idl // NB: jsval is declared in nsIVariant.idl
[ptr] native JSContextPtr(JSContext); [ptr] native JSContextPtr(JSContext);
[ptr] native JSClassPtr(JSClass); [ptr] native JSClassPtr(JSClass);
@ -180,8 +180,8 @@ interface nsIXPConnectWrappedNative : nsIXPConnectJSObjectHolder
*/ */
readonly attribute nsIXPConnect XPConnect; readonly attribute nsIXPConnect XPConnect;
nsIInterfaceInfo FindInterfaceWithMember(in JSVal nameID); nsIInterfaceInfo FindInterfaceWithMember(in jsval nameID);
nsIInterfaceInfo FindInterfaceWithName(in JSVal nameID); nsIInterfaceInfo FindInterfaceWithName(in jsval nameID);
void debugDump(in short depth); void debugDump(in short depth);
@ -500,7 +500,7 @@ interface nsIXPConnect : nsISupports
in nsISupports aCOMObj, in nsISupports aCOMObj,
in nsIIDPtr aIID, in nsIIDPtr aIID,
in boolean aAllowWrapper, in boolean aAllowWrapper,
out JSVal aVal, out jsval aVal,
out nsIXPConnectJSObjectHolder aHolder); out nsIXPConnectJSObjectHolder aHolder);
/** /**
@ -533,7 +533,7 @@ interface nsIXPConnect : nsISupports
[iid_is(aIID),retval] out nsQIResult result); [iid_is(aIID),retval] out nsQIResult result);
/** /**
* Wraps the given JSVal in a nsIVariant and returns the new variant. * Wraps the given jsval in a nsIVariant and returns the new variant.
*/ */
nsIVariant nsIVariant
jSValToVariant(in JSContextPtr cx, in JSValPtr aJSVal); jSValToVariant(in JSContextPtr cx, in JSValPtr aJSVal);
@ -665,8 +665,8 @@ interface nsIXPConnect : nsISupports
void releaseJSContext(in JSContextPtr aJSContext, in PRBool noGC); void releaseJSContext(in JSContextPtr aJSContext, in PRBool noGC);
JSVal variantToJS(in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); jsval variantToJS(in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value);
nsIVariant JSToVariant(in JSContextPtr ctx, in JSVal value); nsIVariant JSToVariant(in JSContextPtr ctx, in jsval value);
/** /**
* Preconfigure XPCNativeWrapper automation so that when a scripted * Preconfigure XPCNativeWrapper automation so that when a scripted
@ -723,7 +723,7 @@ interface nsIXPConnect : nsISupports
* is responsible for rooting the jsval before making a call * is responsible for rooting the jsval before making a call
* to this method. * to this method.
*/ */
[noscript] JSVal evalInSandboxObject(in AString source, in JSContextPtr cx, [noscript] jsval evalInSandboxObject(in AString source, in JSContextPtr cx,
in nsIXPConnectJSObjectHolder sandbox, in nsIXPConnectJSObjectHolder sandbox,
in PRBool returnStringOnly); in PRBool returnStringOnly);
@ -733,7 +733,7 @@ interface nsIXPConnect : nsISupports
* @param aParent The parent to create the wrapper with. * @param aParent The parent to create the wrapper with.
* @param aWrappedObj The object to wrap. * @param aWrappedObj The object to wrap.
*/ */
[noscript] JSVal getXOWForObject(in JSContextPtr aJSContext, [noscript] jsval getXOWForObject(in JSContextPtr aJSContext,
in JSObjectPtr aParent, in JSObjectPtr aParent,
in JSObjectPtr aWrappedObj); in JSObjectPtr aWrappedObj);
@ -743,7 +743,7 @@ interface nsIXPConnect : nsISupports
* @param aParent The parent to create the wrapper with. * @param aParent The parent to create the wrapper with.
* @param aWrappedObj The object to wrap. * @param aWrappedObj The object to wrap.
*/ */
[noscript] JSVal getCOWForObject(in JSContextPtr aJSContext, [noscript] jsval getCOWForObject(in JSContextPtr aJSContext,
in JSObjectPtr aParent, in JSObjectPtr aParent,
in JSObjectPtr aWrappedObj); in JSObjectPtr aWrappedObj);
@ -849,7 +849,7 @@ interface nsIXPConnect : nsISupports
* The filename flags from the script that will use this wrapper. See * The filename flags from the script that will use this wrapper. See
* above (aPrincipal) for details. * above (aPrincipal) for details.
*/ */
[noscript] JSVal getWrapperForObject( [noscript] jsval getWrapperForObject(
in JSContextPtr aJSContext, in JSContextPtr aJSContext,
in JSObjectPtr aObject, in JSObjectPtr aObject,
in JSObjectPtr aScope, in JSObjectPtr aScope,

Просмотреть файл

@ -1322,7 +1322,7 @@ FullTrustSecMan::CanGetService(JSContext * aJSContext, const nsCID & aCID)
} }
#ifndef XPCONNECT_STANDALONE #ifndef XPCONNECT_STANDALONE
/* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in JSVal aName, inout voidPtr aPolicy); */ /* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in jsval aName, inout voidPtr aPolicy); */
NS_IMETHODIMP NS_IMETHODIMP
FullTrustSecMan::CanAccess(PRUint32 aAction, FullTrustSecMan::CanAccess(PRUint32 aAction,
nsAXPCNativeCallContext *aCallContext, nsAXPCNativeCallContext *aCallContext,
@ -1333,7 +1333,7 @@ FullTrustSecMan::CanAccess(PRUint32 aAction,
return NS_OK; return NS_OK;
} }
/* [noscript] void checkPropertyAccess (in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in string aClassName, in JSVal aProperty, in PRUint32 aAction); */ /* [noscript] void checkPropertyAccess (in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in string aClassName, in jsval aProperty, in PRUint32 aAction); */
NS_IMETHODIMP NS_IMETHODIMP
FullTrustSecMan::CheckPropertyAccess(JSContext * aJSContext, FullTrustSecMan::CheckPropertyAccess(JSContext * aJSContext,
JSObject * aJSObject, JSObject * aJSObject,

Просмотреть файл

@ -1334,7 +1334,7 @@ nsXPConnect::WrapNative(JSContext * aJSContext,
aHolder); aHolder);
} }
/* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDPtr aIID, out JSVal aVal, out nsIXPConnectJSObjectHolder aHolder); */ /* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDPtr aIID, out jsval aVal, out nsIXPConnectJSObjectHolder aHolder); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPConnect::WrapNativeToJSVal(JSContext * aJSContext, nsXPConnect::WrapNativeToJSVal(JSContext * aJSContext,
JSObject * aScope, JSObject * aScope,
@ -2132,7 +2132,7 @@ nsXPConnect::GetWrappedNativePrototype(JSContext * aJSContext,
return NS_OK; return NS_OK;
} }
/* [noscript] JSVal GetCrossOriginWrapperForValue(in JSContextPtr aJSContext, in JSVal aCurrentVal); */ /* [noscript] jsval GetCrossOriginWrapperForValue(in JSContextPtr aJSContext, in jsval aCurrentVal); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPConnect::GetXOWForObject(JSContext * aJSContext, nsXPConnect::GetXOWForObject(JSContext * aJSContext,
JSObject * aParent, JSObject * aParent,
@ -2361,7 +2361,7 @@ nsXPConnect::DebugDumpEvalInJSStackFrame(PRUint32 aFrameNumber, const char *aSou
return NS_OK; return NS_OK;
} }
/* JSVal variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */ /* jsval variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPConnect::VariantToJS(JSContext* ctx, JSObject* scope, nsIVariant* value, jsval* _retval) nsXPConnect::VariantToJS(JSContext* ctx, JSObject* scope, nsIVariant* value, jsval* _retval)
{ {
@ -2387,7 +2387,7 @@ nsXPConnect::VariantToJS(JSContext* ctx, JSObject* scope, nsIVariant* value, jsv
return NS_OK; return NS_OK;
} }
/* nsIVariant JSToVariant (in JSContextPtr ctx, in JSVal value); */ /* nsIVariant JSToVariant (in JSContextPtr ctx, in jsval value); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPConnect::JSToVariant(JSContext* ctx, jsval value, nsIVariant** _retval) nsXPConnect::JSToVariant(JSContext* ctx, jsval value, nsIVariant** _retval)
{ {

Просмотреть файл

@ -326,7 +326,7 @@ nsXPCComponents_Interfaces::NewEnumerate(nsIXPConnectWrappedNative *wrapper,
} }
} }
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_Interfaces::NewResolve(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_Interfaces::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -660,7 +660,7 @@ nsXPCComponents_InterfacesByID::NewEnumerate(nsIXPConnectWrappedNative *wrapper,
} }
} }
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_InterfacesByID::NewResolve(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_InterfacesByID::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -965,7 +965,7 @@ nsXPCComponents_Classes::NewEnumerate(nsIXPConnectWrappedNative *wrapper,
} }
} }
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_Classes::NewResolve(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_Classes::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -1236,7 +1236,7 @@ IsRegisteredCLSID(const char* str)
return registered; return registered;
} }
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_ClassesByID::NewResolve(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_ClassesByID::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -1473,7 +1473,7 @@ nsXPCComponents_Results::NewEnumerate(nsIXPConnectWrappedNative *wrapper,
} }
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_Results::NewResolve(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_Results::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -1729,7 +1729,7 @@ nsXPCComponents_ID::CallOrConstruct(nsIXPConnectWrappedNative *wrapper,
return NS_OK; return NS_OK;
} }
/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */ /* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_ID::HasInstance(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_ID::HasInstance(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -2005,7 +2005,7 @@ nsXPCComponents_Exception::CallOrConstruct(nsIXPConnectWrappedNative *wrapper,
return NS_OK; return NS_OK;
} }
/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */ /* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_Exception::HasInstance(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_Exception::HasInstance(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -2635,7 +2635,7 @@ nsXPCComponents_Constructor::CallOrConstruct(nsIXPConnectWrappedNative *wrapper,
return NS_OK; return NS_OK;
} }
/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */ /* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents_Constructor::HasInstance(nsIXPConnectWrappedNative *wrapper, nsXPCComponents_Constructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -4073,7 +4073,7 @@ nsXPCComponents::GetManager(nsIComponentManager * *aManager)
#define XPC_MAP_FLAGS nsIXPCScriptable::ALLOW_PROP_MODS_DURING_RESOLVE #define XPC_MAP_FLAGS nsIXPCScriptable::ALLOW_PROP_MODS_DURING_RESOLVE
#include "xpc_map_end.h" /* This will #undef the above */ #include "xpc_map_end.h" /* This will #undef the above */
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents::NewResolve(nsIXPConnectWrappedNative *wrapper, nsXPCComponents::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -4104,7 +4104,7 @@ nsXPCComponents::NewResolve(nsIXPConnectWrappedNative *wrapper,
return NS_OK; return NS_OK;
} }
/* PRBool getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp); */ /* PRBool getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in JSValPtr vp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents::GetProperty(nsIXPConnectWrappedNative *wrapper, nsXPCComponents::GetProperty(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -4139,7 +4139,7 @@ nsXPCComponents::GetProperty(nsIXPConnectWrappedNative *wrapper,
return rv; return rv;
} }
/* PRBool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp); */ /* PRBool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in JSValPtr vp); */
NS_IMETHODIMP NS_IMETHODIMP
nsXPCComponents::SetProperty(nsIXPConnectWrappedNative *wrapper, nsXPCComponents::SetProperty(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, jsval id, JSContext * cx, JSObject * obj, jsval id,

Просмотреть файл

@ -470,7 +470,7 @@ nsJSIID::NewID(nsIInterfaceInfo* aInfo)
} }
/* PRBool resolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id); */ /* PRBool resolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id); */
NS_IMETHODIMP NS_IMETHODIMP
nsJSIID::NewResolve(nsIXPConnectWrappedNative *wrapper, nsJSIID::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -541,7 +541,7 @@ nsJSIID::Enumerate(nsIXPConnectWrappedNative *wrapper,
return NS_OK; return NS_OK;
} }
/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */ /* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
NS_IMETHODIMP NS_IMETHODIMP
nsJSIID::HasInstance(nsIXPConnectWrappedNative *wrapper, nsJSIID::HasInstance(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,
@ -927,7 +927,7 @@ nsJSCID::Construct(nsIXPConnectWrappedNative *wrapper,
return NS_OK; return NS_OK;
} }
/* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */ /* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out PRBool bp); */
NS_IMETHODIMP NS_IMETHODIMP
nsJSCID::HasInstance(nsIXPConnectWrappedNative *wrapper, nsJSCID::HasInstance(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,

Просмотреть файл

@ -65,7 +65,7 @@ NS_IMPL_THREADSAFE_RELEASE(BackstagePass)
nsIXPCScriptable::DONT_REFLECT_INTERFACE_NAMES nsIXPCScriptable::DONT_REFLECT_INTERFACE_NAMES
#include "xpc_map_end.h" /* This will #undef the above */ #include "xpc_map_end.h" /* This will #undef the above */
/* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp); */ /* PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval id, in PRUint32 flags, out JSObjectPtr objp); */
NS_IMETHODIMP NS_IMETHODIMP
BackstagePass::NewResolve(nsIXPConnectWrappedNative *wrapper, BackstagePass::NewResolve(nsIXPConnectWrappedNative *wrapper,
JSContext * cx, JSObject * obj, JSContext * cx, JSObject * obj,

Просмотреть файл

@ -3052,7 +3052,7 @@ NS_IMETHODIMP XPCWrappedNative::GetXPConnect(nsIXPConnect * *aXPConnect)
return NS_OK; return NS_OK;
} }
/* XPCNativeInterface FindInterfaceWithMember (in JSVal name); */ /* XPCNativeInterface FindInterfaceWithMember (in jsval name); */
NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(jsval name, nsIInterfaceInfo * *_retval) NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(jsval name, nsIInterfaceInfo * *_retval)
{ {
XPCNativeInterface* iface; XPCNativeInterface* iface;
@ -3069,7 +3069,7 @@ NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(jsval name, nsIInterface
return NS_OK; return NS_OK;
} }
/* XPCNativeInterface FindInterfaceWithName (in JSVal name); */ /* XPCNativeInterface FindInterfaceWithName (in jsval name); */
NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithName(jsval name, nsIInterfaceInfo * *_retval) NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithName(jsval name, nsIInterfaceInfo * *_retval)
{ {
XPCNativeInterface* iface = GetSet()->FindNamedInterface(name); XPCNativeInterface* iface = GetSet()->FindNamedInterface(name);

Просмотреть файл

@ -283,7 +283,7 @@ MySecMan::CanGetService(JSContext * aJSContext, const nsCID & aCID)
} }
} }
/* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in JSVal aName, inout voidPtr aPolicy); */ /* void CanAccess (in PRUint32 aAction, in nsIXPCNativeCallContext aCallContext, in JSContextPtr aJSContext, in JSObjectPtr aJSObject, in nsISupports aObj, in nsIClassInfo aClassInfo, in jsval aName, inout voidPtr aPolicy); */
NS_IMETHODIMP NS_IMETHODIMP
MySecMan::CanAccess(PRUint32 aAction, nsAXPCNativeCallContext *aCallContext, JSContext * aJSContext, JSObject * aJSObject, nsISupports *aObj, nsIClassInfo *aClassInfo, jsval aName, void * *aPolicy) MySecMan::CanAccess(PRUint32 aAction, nsAXPCNativeCallContext *aCallContext, JSContext * aJSContext, JSObject * aJSObject, nsISupports *aObj, nsIClassInfo *aClassInfo, jsval aName, void * *aPolicy)
{ {

Просмотреть файл

@ -81,7 +81,7 @@ interface nsIDataType : nsISupports
#include "jspubtd.h" #include "jspubtd.h"
%} %}
native JSVal(jsval); native jsval(jsval);
/** /**
* XPConnect has magic to transparently convert between nsIVariant and JS types. * XPConnect has magic to transparently convert between nsIVariant and JS types.
@ -117,7 +117,7 @@ interface nsIVariant : nsISupports
[noscript] string getAsString(); [noscript] string getAsString();
[noscript] wstring getAsWString(); [noscript] wstring getAsWString();
[noscript] nsISupports getAsISupports(); [noscript] nsISupports getAsISupports();
[noscript] JSVal getAsJSVal(); [noscript] jsval getAsJSVal();
[noscript] void getAsInterface(out nsIIDPtr iid, [noscript] void getAsInterface(out nsIIDPtr iid,
[iid_is(iid), retval] out nsQIResult iface); [iid_is(iid), retval] out nsQIResult iface);

Просмотреть файл

@ -1889,7 +1889,7 @@ NS_IMETHODIMP nsVariant::GetAsISupports(nsISupports **_retval)
/* jsval getAsJSVal() */ /* jsval getAsJSVal() */
NS_IMETHODIMP nsVariant::GetAsJSVal(jsval *_retval) NS_IMETHODIMP nsVariant::GetAsJSVal(jsval *_retval)
{ {
// Can only get the JSVal from an XPCVariant. // Can only get the jsval from an XPCVariant.
return NS_ERROR_CANNOT_CONVERT_DATA; return NS_ERROR_CANNOT_CONVERT_DATA;
} }