Add support for caching content viewers in session history to speed up back/forward (bug 274784). This initial landing has the feature disabled by default; set browser.sessionhistory.max_viewers to the maximum number of pages to cache to enable the feature. r=bzbarsky, sr/a=brendan.
This commit is contained in:
@@ -4435,10 +4435,11 @@ nsPrintEngine::TurnScriptingOn(PRBool aDoTurnOn)
|
||||
|
||||
// get the script global object
|
||||
nsIScriptGlobalObject *scriptGlobalObj = mDocument->GetScriptGlobalObject();
|
||||
NS_ASSERTION(scriptGlobalObj, "Can't get nsIScriptGlobalObject");
|
||||
nsIScriptContext *scx = scriptGlobalObj->GetContext();
|
||||
NS_ASSERTION(scx, "Can't get nsIScriptContext");
|
||||
scx->SetScriptsEnabled(aDoTurnOn, PR_TRUE);
|
||||
if (scriptGlobalObj) {
|
||||
nsIScriptContext *scx = scriptGlobalObj->GetContext();
|
||||
NS_ASSERTION(scx, "Can't get nsIScriptContext");
|
||||
scx->SetScriptsEnabled(aDoTurnOn, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user