Bug 1125351 - Make nsIDocShell.isPrerendered infallible; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 23 Jan 2015 16:22:55 -0500
changeset 225797 feda8ca8f832177e80f77a8c447195a9e1936811
parent 225796 7345338634ab288fa17b128f6a0c3504b39d1a6d
child 225798 3cfdd4c2d83bf287476b6c4e2f7cd21ab472e755
push id28175
push userryanvm@gmail.com
push dateMon, 26 Jan 2015 21:33:41 +0000
treeherdermozilla-central@a6f037b538ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1125351
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1125351 - Make nsIDocShell.isPrerendered infallible; r=bzbarsky
docshell/base/nsDocShell.cpp
docshell/base/nsIDocShell.idl
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -3378,20 +3378,18 @@ nsDocShell::SetDocLoaderParent(nsDocLoad
             SetAllowWindowControl(value);
         }
         SetAllowContentRetargeting(
             parentAsDocShell->GetAllowContentRetargeting());
         if (NS_SUCCEEDED(parentAsDocShell->GetIsActive(&value)))
         {
             SetIsActive(value);
         }
-        if (NS_SUCCEEDED(parentAsDocShell->GetIsPrerendered(&value))) {
-            if (value) {
-                SetIsPrerendered(true);
-            }
+        if (parentAsDocShell->GetIsPrerendered()) {
+          SetIsPrerendered(true);
         }
         if (NS_FAILED(parentAsDocShell->GetAllowDNSPrefetch(&value))) {
             value = false;
         }
         SetAllowDNSPrefetch(value);
         value = parentAsDocShell->GetAffectPrivateSessionLifetime();
         SetAffectPrivateSessionLifetime(value);
         uint32_t flags;
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -619,17 +619,17 @@ interface nsIDocShell : nsIDocShellTreeI
    */
   attribute boolean isActive;
 
   /**
    * Puts the docshell in prerendering mode. noscript because we want only
    * native code to be able to put a docshell in prerendering.
    */
   [noscript] void SetIsPrerendered(in boolean prerendered);
-  readonly attribute boolean isPrerendered;
+  [infallible] readonly attribute boolean isPrerendered;
 
   /**
    * The ID of the docshell in the session history.
    */
   readonly attribute unsigned long long historyID;
 
   /**
    * Sets whether a docshell is an app tab. An app tab docshell may behave