зеркало из https://github.com/mozilla/gecko-dev.git
Removing a nasty shortcut that I left in when fixing bug 116834. r=rginda@netscape.com, sr=blaker@netscape.com
This commit is contained in:
Родитель
dc352d4acc
Коммит
610f2ffdc4
|
@ -41,7 +41,7 @@ public:
|
|||
nsEventStatus* aEventStatus);
|
||||
NS_IMETHOD_(JSObject *) GetGlobalJSObject();
|
||||
NS_IMETHOD OnFinalize(JSObject *aObject);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts);
|
||||
|
||||
// nsIScriptObjectPrincipal methods
|
||||
NS_IMETHOD GetPrincipal(nsIPrincipal** aPrincipal);
|
||||
|
@ -270,7 +270,7 @@ nsXBLDocGlobalObject::OnFinalize(JSObject *aObject)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXBLDocGlobalObject::SetScriptsEnabled(PRBool aEnabled)
|
||||
nsXBLDocGlobalObject::SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts)
|
||||
{
|
||||
// We don't care...
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
nsEventStatus* aEventStatus);
|
||||
NS_IMETHOD_(JSObject *) GetGlobalJSObject();
|
||||
NS_IMETHOD OnFinalize(JSObject *aObject);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts);
|
||||
|
||||
// nsIScriptObjectPrincipal methods
|
||||
NS_IMETHOD GetPrincipal(nsIPrincipal** aPrincipal);
|
||||
|
@ -727,7 +727,7 @@ nsXULPDGlobalObject::OnFinalize(JSObject *aObject)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULPDGlobalObject::SetScriptsEnabled(PRBool aEnabled)
|
||||
nsXULPDGlobalObject::SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts)
|
||||
{
|
||||
// We don't care...
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
/**
|
||||
* Called when scripts are enabled/disabled.
|
||||
*/
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled) = 0;
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -704,9 +704,9 @@ GlobalWindowImpl::OnFinalize(JSObject *aJSObject)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GlobalWindowImpl::SetScriptsEnabled(PRBool aEnabled)
|
||||
GlobalWindowImpl::SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts)
|
||||
{
|
||||
if (aEnabled) {
|
||||
if (aEnabled && aFireTimeouts) {
|
||||
// Scripts are enabled (again?) on this context, run timeouts that
|
||||
// fired on this context while scripts were disabled.
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
nsEventStatus* aEventStatus);
|
||||
NS_IMETHOD_(JSObject *) GetGlobalJSObject();
|
||||
NS_IMETHOD OnFinalize(JSObject *aJSObject);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled);
|
||||
NS_IMETHOD SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts);
|
||||
|
||||
// nsIScriptObjectPrincipal
|
||||
NS_IMETHOD GetPrincipal(nsIPrincipal **prin);
|
||||
|
|
|
@ -1522,13 +1522,11 @@ nsJSContext::SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts)
|
|||
{
|
||||
mScriptsEnabled = aEnabled;
|
||||
|
||||
if (aFireTimeouts) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||
GetGlobalObject(getter_AddRefs(global));
|
||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||
GetGlobalObject(getter_AddRefs(global));
|
||||
|
||||
if (global) {
|
||||
global->SetScriptsEnabled(aEnabled);
|
||||
}
|
||||
if (global) {
|
||||
global->SetScriptsEnabled(aEnabled, aFireTimeouts);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче