mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 738761 - Remove nsIScriptTimeoutHandler::GetScriptVersion and pass JSVersion to nsIScriptContext::EvaluateString; r=jst
This commit is contained in:
parent
a1a7ce8473
commit
09e5acca2c
@ -918,7 +918,8 @@ nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
|
||||
mDocument->NodePrincipal(),
|
||||
aRequest->mOriginPrincipal,
|
||||
url.get(), aRequest->mLineNo,
|
||||
aRequest->mJSVersion, nsnull, &isUndefined);
|
||||
JSVersion(aRequest->mJSVersion), nsnull,
|
||||
&isUndefined);
|
||||
|
||||
// Put the old script back in case it wants to do anything else.
|
||||
mCurrentScript = oldCurrent;
|
||||
|
@ -9319,8 +9319,7 @@ nsGlobalWindow::RunTimeout(nsTimeout *aTimeout)
|
||||
bool is_undefined;
|
||||
scx->EvaluateString(nsDependentString(script), FastGetGlobalJSObject(),
|
||||
timeout->mPrincipal, timeout->mPrincipal,
|
||||
filename, lineNo,
|
||||
handler->GetScriptVersion(), nsnull,
|
||||
filename, lineNo, JSVERSION_DEFAULT, nsnull,
|
||||
&is_undefined);
|
||||
} else {
|
||||
nsCOMPtr<nsIVariant> dummy;
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
nsIPrincipal *aOriginPrincipal,
|
||||
const char *aURL,
|
||||
PRUint32 aLineNo,
|
||||
PRUint32 aVersion,
|
||||
JSVersion aVersion,
|
||||
nsAString *aRetValue,
|
||||
bool* aIsUndefined) = 0;
|
||||
|
||||
|
@ -42,9 +42,8 @@
|
||||
class nsIArray;
|
||||
|
||||
#define NS_ISCRIPTTIMEOUTHANDLER_IID \
|
||||
{ /* {17a9ce1a-d73b-45d1-8145-a0ae57bcc76e} */ \
|
||||
0x17a9ce1a, 0xd73b, 0x45d1, \
|
||||
{ 0x81, 0x45, 0xa0, 0xae, 0x57, 0xbc, 0xc7, 0x6e } }
|
||||
{ 0xd60ec934, 0x0c75, 0x4777, \
|
||||
{ 0xba, 0x41, 0xb8, 0x2f, 0x37, 0xc9, 0x13, 0x56 } }
|
||||
|
||||
/**
|
||||
* Abstraction of the script objects etc required to do timeouts in a
|
||||
@ -75,9 +74,6 @@ public:
|
||||
// If a script object, get the argv suitable for passing back to the
|
||||
// script context.
|
||||
virtual nsIArray *GetArgv() = 0;
|
||||
|
||||
// Get the language version for this timeout.
|
||||
virtual PRUint32 GetScriptVersion() = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptTimeoutHandler,
|
||||
|
@ -1358,7 +1358,7 @@ nsJSContext::EvaluateString(const nsAString& aScript,
|
||||
nsIPrincipal *aOriginPrincipal,
|
||||
const char *aURL,
|
||||
PRUint32 aLineNo,
|
||||
PRUint32 aVersion,
|
||||
JSVersion aVersion,
|
||||
nsAString *aRetValue,
|
||||
bool* aIsUndefined)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
nsIPrincipal *originPrincipal,
|
||||
const char *aURL,
|
||||
PRUint32 aLineNo,
|
||||
PRUint32 aVersion,
|
||||
JSVersion aVersion,
|
||||
nsAString *aRetValue,
|
||||
bool* aIsUndefined);
|
||||
virtual nsresult EvaluateStringWithValue(const nsAString& aScript,
|
||||
|
@ -79,9 +79,6 @@ public:
|
||||
virtual PRUint32 GetScriptTypeID() {
|
||||
return nsIProgrammingLanguage::JAVASCRIPT;
|
||||
}
|
||||
virtual PRUint32 GetScriptVersion() {
|
||||
return mVersion;
|
||||
}
|
||||
|
||||
virtual nsIArray *GetArgv() {
|
||||
return mArgv;
|
||||
|
@ -363,7 +363,7 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
|
||||
principal,
|
||||
mURL.get(), // url
|
||||
1, // line no
|
||||
nsnull,
|
||||
JSVERSION_DEFAULT,
|
||||
&result,
|
||||
&isUndefined);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user