зеркало из https://github.com/mozilla/pjs.git
bug 121171, CallEventHandler ignores mScriptsEnabled, r=brendan, sr=jst
do nothing, but return a positive result from nsJSContext::CallEventHandler if scripts are disabled on this context.
This commit is contained in:
Родитель
24ebcbe7fd
Коммит
b876d6cabd
|
@ -979,6 +979,11 @@ NS_IMETHODIMP
|
||||||
nsJSContext::CallEventHandler(void *aTarget, void *aHandler, PRUint32 argc,
|
nsJSContext::CallEventHandler(void *aTarget, void *aHandler, PRUint32 argc,
|
||||||
void *argv, PRBool *aBoolResult, PRBool aReverseReturnResult)
|
void *argv, PRBool *aBoolResult, PRBool aReverseReturnResult)
|
||||||
{
|
{
|
||||||
|
if (!mScriptsEnabled) {
|
||||||
|
*aBoolResult = !aReverseReturnResult;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
// This one's a lot easier than EvaluateString because we don't have to
|
// This one's a lot easier than EvaluateString because we don't have to
|
||||||
// hassle with principals: they're already compiled into the JS function.
|
// hassle with principals: they're already compiled into the JS function.
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче