зеркало из https://github.com/mozilla/pjs.git
Bug 705324 - Remove nsAXPCNativeCallContext::{GetRetValPtr,GetReturnValueWasSet,SetReturnValueWasSet}; r=bholley sr=bz
This commit is contained in:
Родитель
3bc0ce7250
Коммит
4c9760228d
|
@ -59,19 +59,6 @@ public:
|
|||
NS_IMETHOD GetArgc(PRUint32 *aResult) = 0;
|
||||
NS_IMETHOD GetArgvPtr(jsval **aResult) = 0;
|
||||
|
||||
/**
|
||||
* This may be NULL if the JS caller is ignoring the result of the call.
|
||||
*/
|
||||
NS_IMETHOD GetRetValPtr(jsval **aResult) = 0;
|
||||
|
||||
/**
|
||||
* Set this to indicate that the callee has directly set the return value
|
||||
* (using RetValPtr and the JSAPI). If set then xpconnect will not attempt
|
||||
* to overwrite it with the converted retval from the C++ callee.
|
||||
*/
|
||||
NS_IMETHOD GetReturnValueWasSet(bool *aResult) = 0;
|
||||
NS_IMETHOD SetReturnValueWasSet(bool aValue) = 0;
|
||||
|
||||
// Methods added since mozilla 0.6....
|
||||
|
||||
NS_IMETHOD GetCalleeInterface(nsIInterfaceInfo **aResult) = 0;
|
||||
|
|
|
@ -277,7 +277,6 @@ XPCCallContext::SetArgsAndResultPtr(uintN argc,
|
|||
mArgv = argv;
|
||||
mRetVal = rval;
|
||||
|
||||
mReturnValueWasSet = false;
|
||||
mState = HAVE_ARGS;
|
||||
}
|
||||
|
||||
|
@ -496,28 +495,6 @@ XPCCallContext::GetArgvPtr(jsval * *aArgvPtr)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute JSValPtr RetValPtr; */
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetRetValPtr(jsval * *aRetValPtr)
|
||||
{
|
||||
*aRetValPtr = mRetVal;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* attribute bool ReturnValueWasSet; */
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetReturnValueWasSet(bool *aReturnValueWasSet)
|
||||
{
|
||||
*aReturnValueWasSet = mReturnValueWasSet;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::SetReturnValueWasSet(bool aReturnValueWasSet)
|
||||
{
|
||||
mReturnValueWasSet = aReturnValueWasSet;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetPreviousCallContext(nsAXPCNativeCallContext **aResult)
|
||||
{
|
||||
|
|
|
@ -300,13 +300,6 @@ XPCCallContext::GetRetVal() const
|
|||
return mRetVal;
|
||||
}
|
||||
|
||||
inline JSBool
|
||||
XPCCallContext::GetReturnValueWasSet() const
|
||||
{
|
||||
CHECK_STATE(READY_TO_CALL);
|
||||
return mReturnValueWasSet;
|
||||
}
|
||||
|
||||
inline void
|
||||
XPCCallContext::SetRetVal(jsval val)
|
||||
{
|
||||
|
|
|
@ -2457,13 +2457,7 @@ CallMethodHelper::GatherAndConvertResults()
|
|||
}
|
||||
|
||||
if (paramInfo.IsRetval()) {
|
||||
if (!mCallContext.GetReturnValueWasSet()) {
|
||||
mCallContext.SetRetVal(v);
|
||||
} else {
|
||||
// really, this should assert TagPart() == nsXPTType::T_VOID
|
||||
NS_ASSERTION(type.TagPart() != nsXPTType::T_JSVAL,
|
||||
"dropping declared return value");
|
||||
}
|
||||
mCallContext.SetRetVal(v);
|
||||
} else if (i < mArgc) {
|
||||
// we actually assured this before doing the invoke
|
||||
NS_ASSERTION(JSVAL_IS_OBJECT(mArgv[i]), "out var is not object");
|
||||
|
|
|
@ -1036,9 +1036,6 @@ public:
|
|||
NS_IMETHOD GetJSContext(JSContext **aResult);
|
||||
NS_IMETHOD GetArgc(PRUint32 *aResult);
|
||||
NS_IMETHOD GetArgvPtr(jsval **aResult);
|
||||
NS_IMETHOD GetRetValPtr(jsval **aResult);
|
||||
NS_IMETHOD GetReturnValueWasSet(bool *aResult);
|
||||
NS_IMETHOD SetReturnValueWasSet(bool aValue);
|
||||
NS_IMETHOD GetCalleeInterface(nsIInterfaceInfo **aResult);
|
||||
NS_IMETHOD GetCalleeClassInfo(nsIClassInfo **aResult);
|
||||
NS_IMETHOD GetPreviousCallContext(nsAXPCNativeCallContext **aResult);
|
||||
|
@ -1100,7 +1097,6 @@ public:
|
|||
inline uintN GetArgc() const ;
|
||||
inline jsval* GetArgv() const ;
|
||||
inline jsval* GetRetVal() const ;
|
||||
inline JSBool GetReturnValueWasSet() const ;
|
||||
|
||||
inline PRUint16 GetMethodIndex() const ;
|
||||
inline void SetMethodIndex(PRUint16 index) ;
|
||||
|
@ -1217,7 +1213,6 @@ private:
|
|||
jsval* mArgv;
|
||||
jsval* mRetVal;
|
||||
|
||||
JSBool mReturnValueWasSet;
|
||||
PRUint16 mMethodIndex;
|
||||
|
||||
#define XPCCCX_STRING_CACHE_SIZE 2
|
||||
|
|
Загрузка…
Ссылка в новой задаче