mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-12 11:04:32 +00:00
Bug 469361. Remove unused API (revert to previous interface version). r+sr=jst
This commit is contained in:
parent
b56eea10eb
commit
25789e6536
@ -57,9 +57,9 @@ class nsScriptObjectHolder;
|
|||||||
typedef void (*nsScriptTerminationFunc)(nsISupports* aRef);
|
typedef void (*nsScriptTerminationFunc)(nsISupports* aRef);
|
||||||
|
|
||||||
#define NS_ISCRIPTCONTEXT_IID \
|
#define NS_ISCRIPTCONTEXT_IID \
|
||||||
{ /* {e7b9871d-3adc-4bf7-850d-7fb9554886bf} */ \
|
{ /* {09316a0e-8d05-4d26-9efd-8f907a7c79d2} */ \
|
||||||
0xe7b9871d, 0x3adc, 0x4bf7, \
|
0x09316a0e, 0x8d05, 0x4d26, \
|
||||||
{ 0x85, 0x0d, 0x7f, 0xb9, 0x55, 0x48, 0x86, 0xbf } }
|
{ 0x9e, 0xfd, 0x8f, 0x90, 0x7a, 0x7c, 0x79, 0xd2 } }
|
||||||
|
|
||||||
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
|
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
|
||||||
know what language we have is a little silly... */
|
know what language we have is a little silly... */
|
||||||
@ -456,9 +456,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual nsresult DropScriptObject(void *object) = 0;
|
virtual nsresult DropScriptObject(void *object) = 0;
|
||||||
virtual nsresult HoldScriptObject(void *object) = 0;
|
virtual nsresult HoldScriptObject(void *object) = 0;
|
||||||
|
|
||||||
/* Report a pending exception if there is one on the native context */
|
|
||||||
virtual void ReportPendingException() = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContext, NS_ISCRIPTCONTEXT_IID)
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContext, NS_ISCRIPTCONTEXT_IID)
|
||||||
|
@ -1592,7 +1592,7 @@ nsJSContext::EvaluateString(const nsAString& aScript,
|
|||||||
// to avoid dropping JS exceptions in case we got here through
|
// to avoid dropping JS exceptions in case we got here through
|
||||||
// nested calls through XPConnect.
|
// nested calls through XPConnect.
|
||||||
|
|
||||||
JS_ReportPendingException(mContext);
|
ReportPendingException(PR_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1856,9 +1856,7 @@ nsJSContext::CompileEventHandler(nsIAtom *aName,
|
|||||||
if (!fun) {
|
if (!fun) {
|
||||||
// Set aside the frame chain on cx while reporting, since it has
|
// Set aside the frame chain on cx while reporting, since it has
|
||||||
// nothing to do with the error we just hit.
|
// nothing to do with the error we just hit.
|
||||||
JSStackFrame* frame = JS_SaveFrameChain(mContext);
|
ReportPendingException(PR_TRUE);
|
||||||
ReportPendingException();
|
|
||||||
JS_RestoreFrameChain(mContext, frame);
|
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
return NS_ERROR_ILLEGAL_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1993,9 +1991,7 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, void *aScope, void *aHandler
|
|||||||
// to avoid dropping JS exceptions in case we got here through
|
// to avoid dropping JS exceptions in case we got here through
|
||||||
// nested calls through XPConnect.
|
// nested calls through XPConnect.
|
||||||
|
|
||||||
if (JS_IsExceptionPending(mContext)) {
|
ReportPendingException(PR_FALSE);
|
||||||
JS_ReportPendingException(mContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't pass back results from failed calls.
|
// Don't pass back results from failed calls.
|
||||||
rval = JSVAL_VOID;
|
rval = JSVAL_VOID;
|
||||||
@ -2069,9 +2065,7 @@ nsJSContext::BindCompiledEventHandler(nsISupports* aTarget, void *aScope,
|
|||||||
!::JS_DefineProperty(mContext, target, charName,
|
!::JS_DefineProperty(mContext, target, charName,
|
||||||
OBJECT_TO_JSVAL(funobj), nsnull, nsnull,
|
OBJECT_TO_JSVAL(funobj), nsnull, nsnull,
|
||||||
JSPROP_ENUMERATE | JSPROP_PERMANENT)) {
|
JSPROP_ENUMERATE | JSPROP_PERMANENT)) {
|
||||||
JSStackFrame* frame = JS_SaveFrameChain(mContext);
|
ReportPendingException(PR_TRUE);
|
||||||
ReportPendingException();
|
|
||||||
JS_RestoreFrameChain(mContext, frame);
|
|
||||||
rv = NS_ERROR_FAILURE;
|
rv = NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3618,11 +3612,16 @@ nsJSContext::DropScriptObject(void* aScriptObject)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsJSContext::ReportPendingException()
|
nsJSContext::ReportPendingException(PRBool aSetAsideFrameChain)
|
||||||
{
|
{
|
||||||
|
JSStackFrame* frame =
|
||||||
|
aSetAsideFrameChain ? JS_SaveFrameChain(mContext) : nsnull;
|
||||||
if (mIsInitialized && ::JS_IsExceptionPending(mContext)) {
|
if (mIsInitialized && ::JS_IsExceptionPending(mContext)) {
|
||||||
::JS_ReportPendingException(mContext);
|
::JS_ReportPendingException(mContext);
|
||||||
}
|
}
|
||||||
|
if (aSetAsideFrameChain) {
|
||||||
|
JS_RestoreFrameChain(mContext, frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -166,8 +166,6 @@ public:
|
|||||||
virtual nsresult DropScriptObject(void *object);
|
virtual nsresult DropScriptObject(void *object);
|
||||||
virtual nsresult HoldScriptObject(void *object);
|
virtual nsresult HoldScriptObject(void *object);
|
||||||
|
|
||||||
virtual void ReportPendingException();
|
|
||||||
|
|
||||||
NS_DECL_NSIXPCSCRIPTNOTIFY
|
NS_DECL_NSIXPCSCRIPTNOTIFY
|
||||||
|
|
||||||
NS_DECL_NSITIMERCALLBACK
|
NS_DECL_NSITIMERCALLBACK
|
||||||
@ -216,6 +214,11 @@ protected:
|
|||||||
nsresult JSObjectFromInterface(nsISupports *aSup, void *aScript,
|
nsresult JSObjectFromInterface(nsISupports *aSup, void *aScript,
|
||||||
JSObject **aRet);
|
JSObject **aRet);
|
||||||
|
|
||||||
|
// Report the pending exception on our mContext, if any
|
||||||
|
// If aSetAsideFrameChain is true, set aside the frame chain on mContext
|
||||||
|
// before reporting. True should be passed if the frame chain isn't really
|
||||||
|
// related to our exception.
|
||||||
|
void ReportPendingException(PRBool aSetAsideFrameChain);
|
||||||
private:
|
private:
|
||||||
void Unlink();
|
void Unlink();
|
||||||
|
|
||||||
|
@ -933,9 +933,3 @@ nsPythonContext::HoldScriptObject(void *object)
|
|||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nsPythonContext::ReportPendingException()
|
|
||||||
{
|
|
||||||
// Not sure there's anything to do here
|
|
||||||
}
|
|
||||||
|
@ -213,8 +213,6 @@ public:
|
|||||||
virtual nsresult HoldScriptObject(void *object);
|
virtual nsresult HoldScriptObject(void *object);
|
||||||
virtual nsresult DropScriptObject(void *object);
|
virtual nsresult DropScriptObject(void *object);
|
||||||
|
|
||||||
virtual void ReportPendingException();
|
|
||||||
|
|
||||||
NS_DECL_NSITIMERCALLBACK
|
NS_DECL_NSITIMERCALLBACK
|
||||||
|
|
||||||
PyObject *PyObject_FromInterface(nsISupports *target,
|
PyObject *PyObject_FromInterface(nsISupports *target,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user