Bug 1275415 - Use Ci.nsICookieService.ACCEPT_SESSION instead of Services.cookies.ACCEPT_SESSION in SessionSaver.jsm r=mikedeboer a=sylvestre
authorTim Taubert <ttaubert@mozilla.com>
Mon, 30 May 2016 07:49:29 +0200
changeset 333285 7f8d31a531ca31d5206f0a37528c36d1695ad767
parent 333284 8f2c9241267a2b73f55eb366ad20e25c305623e8
child 333286 8f354a50cdf2498b4ed2ff57889beca415e4023d
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, sylvestre
bugs1275415
milestone48.0a2
Bug 1275415 - Use Ci.nsICookieService.ACCEPT_SESSION instead of Services.cookies.ACCEPT_SESSION in SessionSaver.jsm r=mikedeboer a=sylvestre
browser/components/sessionstore/SessionSaver.jsm
--- a/browser/components/sessionstore/SessionSaver.jsm
+++ b/browser/components/sessionstore/SessionSaver.jsm
@@ -209,17 +209,17 @@ var SessionSaverInternal = {
         delete state._closedWindows[i]._shouldRestore;
         state.windows.unshift(state._closedWindows.pop());
       }
     }
 
     // Clear all cookies on clean shutdown according to user preferences
     if (RunState.isClosing) {
       let expireCookies = Services.prefs.getIntPref("network.cookie.lifetimePolicy") ==
-                            Services.cookies.ACCEPT_SESSION;
+                          Services.cookies.QueryInterface(Ci.nsICookieService).ACCEPT_SESSION;
       let sanitizeCookies = Services.prefs.getBoolPref("privacy.sanitize.sanitizeOnShutdown") &&
                             Services.prefs.getBoolPref("privacy.clearOnShutdown.cookies");
       let restart = Services.prefs.getBoolPref("browser.sessionstore.resume_session_once");
       // Don't clear cookies when restarting
       if ((expireCookies || sanitizeCookies) && !restart) {
         for (let window of state.windows) {
           delete window.cookies;
         }