Bug 1238160 - Rename OriginAttributes.mInBrowser and associated methods. r=bz,mayhemer
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 04 Feb 2016 19:42:44 -0600
changeset 324710 b2a21a014436551942179dd3e70c2642bb6e4e7a
parent 324709 9b296adf9b33947907df19cb99094d906bab5419
child 324711 267ab6361fa18937288c482612d996c7bf074d3f
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, mayhemer
bugs1238160
milestone47.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 1238160 - Rename OriginAttributes.mInBrowser and associated methods. r=bz,mayhemer This change renames OriginAttributes.mInBrowser to mInIsolatedMozBrowser and nsIPrincipal::GetIsInBrowserElement to GetIsInIsolatedMozBrowserElement. Other methods that pass these values around also have name changes. Tokens such as "inBrowser" have previously been serialized into cache keys, used as DB column names, stored in app registries, etc. No changes are made to any serialization formats. Only runtime method and variable names are updated. No behavior changes are made in this patch, so some renamed methods may have nonsensical implementations. These are corrected in subsequent patches focused on behavior. MozReview-Commit-ID: 66HfMlsXFLs
b2g/components/AboutServiceWorkers.jsm
caps/BasePrincipal.cpp
caps/BasePrincipal.h
caps/nsIPrincipal.idl
caps/nsScriptSecurityManager.cpp
caps/nsScriptSecurityManager.h
caps/tests/gtest/TestOriginAttributes.cpp
caps/tests/mochitest/test_principal_jarprefix_origin_appid_appstatus.html
caps/tests/unit/test_origin.js
docshell/base/LoadContext.cpp
docshell/base/LoadContext.h
docshell/base/nsDocShell.cpp
dom/apps/AppsUtils.jsm
dom/apps/Webapps.js
dom/apps/Webapps.jsm
dom/apps/tests/unit/test_moziapplication.js
dom/base/ChromeUtils.cpp
dom/base/nsFrameLoader.cpp
dom/base/test/test_messagemanager_principal.html
dom/base/test/test_messagemanager_send_principal.html
dom/base/test/test_messagemanager_targetchain.html
dom/browser-element/mochitest/browserElement_AllowEmbedAppsInNestedOOIframe.js
dom/browser-element/mochitest/browserElement_Auth.js
dom/browser-element/mochitest/browserElement_CopyPaste.js
dom/browser-element/mochitest/browserElement_DisallowEmbedAppsInOOP.js
dom/browser-element/mochitest/browserElement_Proxy.js
dom/browser-element/mochitest/browserElement_SetInputMethodActive.js
dom/browser-element/mochitest/browserElement_SetVisibleFrames.js
dom/browser-element/mochitest/browserElement_SetVisibleFrames2.js
dom/browser-element/mochitest/priority/test_ExpectingSystemMessage2.html
dom/browser-element/mochitest/priority/test_NestedFrames.html
dom/indexedDB/test/unit/test_defaultStorageUpgrade.js
dom/inputmethod/mochitest/test_bug1043828.html
dom/inputmethod/mochitest/test_bug944397.html
dom/inputmethod/mochitest/test_focus_blur_manage_events.html
dom/inputmethod/mochitest/test_input_registry_events.html
dom/inputmethod/mochitest/test_simple_manage_events.html
dom/ipc/TabContext.cpp
dom/messages/SystemMessageManager.js
dom/payment/Payment.jsm
dom/permission/PermissionSettings.js
dom/permission/PermissionSettings.jsm
dom/push/test/xpcshell/head.js
dom/push/test/xpcshell/test_clear_origin_data.js
dom/push/test/xpcshell/test_notification_http2.js
dom/push/test/xpcshell/test_reconnect_retry.js
dom/push/test/xpcshell/test_register_5xxCode_http2.js
dom/push/test/xpcshell/test_register_case.js
dom/push/test/xpcshell/test_register_error_http2.js
dom/push/test/xpcshell/test_register_invalid_channel.js
dom/push/test/xpcshell/test_register_invalid_endpoint.js
dom/push/test/xpcshell/test_register_invalid_json.js
dom/push/test/xpcshell/test_register_no_id.js
dom/push/test/xpcshell/test_register_request_queue.js
dom/push/test/xpcshell/test_register_rollback.js
dom/push/test/xpcshell/test_register_success.js
dom/push/test/xpcshell/test_register_success_http2.js
dom/push/test/xpcshell/test_register_timeout.js
dom/push/test/xpcshell/test_register_wrong_id.js
dom/push/test/xpcshell/test_register_wrong_type.js
dom/push/test/xpcshell/test_registration_error.js
dom/push/test/xpcshell/test_registration_error_http2.js
dom/push/test/xpcshell/test_registration_none.js
dom/push/test/xpcshell/test_registration_success.js
dom/push/test/xpcshell/test_registration_success_http2.js
dom/push/test/xpcshell/test_unregister_empty_scope.js
dom/push/test/xpcshell/test_unregister_invalid_json.js
dom/push/test/xpcshell/test_unregister_not_found.js
dom/push/test/xpcshell/test_unregister_success_http2.js
dom/push/test/xpcshell/test_updateRecordNoEncryptionKeys_ws.js
dom/quota/ActorsParent.cpp
dom/requestsync/RequestSyncService.jsm
dom/storage/DOMStorageDBThread.cpp
dom/storage/DOMStorageDBUpdater.cpp
dom/webidl/ChromeUtils.webidl
dom/workers/ServiceWorkerManagerService.cpp
extensions/cookie/nsPermissionManager.cpp
extensions/cookie/test/channel_utils.js
extensions/cookie/test/test_app_uninstall_permissions.html
extensions/cookie/test/unit/test_permmanager_cleardata.js
extensions/cookie/test/unit/test_permmanager_defaults.js
extensions/cookie/test/unit/test_permmanager_matches.js
extensions/cookie/test/unit/test_permmanager_removeforapp.js
netwerk/base/nsNetUtil.cpp
netwerk/base/nsUDPSocket.cpp
netwerk/base/nsUDPSocket.h
netwerk/cache/nsDiskCacheDeviceSQL.cpp
netwerk/cache2/CacheFile.cpp
netwerk/cache2/CacheFileIOManager.cpp
netwerk/cache2/CacheFileIOManager.h
netwerk/cache2/CacheFileUtils.cpp
netwerk/cache2/CacheIndex.cpp
netwerk/cache2/CacheIndex.h
netwerk/cache2/CacheStorageService.cpp
netwerk/cookie/nsCookieService.cpp
netwerk/cookie/nsICookieManager2.idl
netwerk/ipc/NeckoParent.cpp
netwerk/test/TestCookie.cpp
netwerk/test/mochitests/test_origin_attributes_conversion.html
netwerk/test/unit/head_channels.js
netwerk/test/unit/test_auth_jar.js
netwerk/test/unit/test_cache_jar.js
netwerk/test/unit/test_packaged_app_bug1214079.js
netwerk/test/unit/test_packaged_app_service.js
netwerk/test/unit/test_packaged_app_service_paths.js
netwerk/test/unit_ipc/child_app_offline.js
services/fxaccounts/FxAccountsManager.jsm
testing/marionette/client/marionette_driver/marionette.py
testing/mochitest/tests/Harness_sanity/test_bug816847.html
testing/specialpowers/content/specialpowersAPI.js
toolkit/components/url-classifier/content/xml-fetcher.js
toolkit/content/aboutServiceWorkers.js
uriloader/prefetch/OfflineCacheUpdateParent.cpp
uriloader/prefetch/nsIOfflineCacheUpdate.idl
--- a/b2g/components/AboutServiceWorkers.jsm
+++ b/b2g/components/AboutServiceWorkers.jsm
@@ -139,17 +139,17 @@ this.AboutServiceWorkers = {
         self.sendResult(message.id, true);
         break;
 
       case "unregister":
         if (!message.principal ||
             !message.principal.origin ||
             !message.principal.originAttributes ||
             !message.principal.originAttributes.appId ||
-            (message.principal.originAttributes.inBrowser == null)) {
+            (message.principal.originAttributes.inIsolatedMozBrowser == null)) {
           self.sendError(message.id, "MissingPrincipal");
           return;
         }
 
         let principal = Services.scriptSecurityManager.createCodebasePrincipal(
           // TODO: Bug 1196652. use originNoSuffix
           Services.io.newURI(message.principal.origin, null, null),
           message.principal.originAttributes);
--- a/caps/BasePrincipal.cpp
+++ b/caps/BasePrincipal.cpp
@@ -31,72 +31,72 @@ namespace mozilla {
 
 using dom::URLParams;
 
 void
 PrincipalOriginAttributes::InheritFromDocShellToDoc(const DocShellOriginAttributes& aAttrs,
                                                     const nsIURI* aURI)
 {
   mAppId = aAttrs.mAppId;
-  mInBrowser = aAttrs.mInBrowser;
+  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
 
   // addonId is computed from the principal URI and never propagated
   mUserContextId = aAttrs.mUserContextId;
 
   // TODO:
   // Bug 1225349 - PrincipalOriginAttributes should inherit mSignedPkg
   // accordingly by URI
   mSignedPkg = aAttrs.mSignedPkg;
 }
 
 void
 PrincipalOriginAttributes::InheritFromNecko(const NeckoOriginAttributes& aAttrs)
 {
   mAppId = aAttrs.mAppId;
-  mInBrowser = aAttrs.mInBrowser;
+  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
 
   // addonId is computed from the principal URI and never propagated
   mUserContextId = aAttrs.mUserContextId;
   mSignedPkg = aAttrs.mSignedPkg;
 }
 
 void
 DocShellOriginAttributes::InheritFromDocToChildDocShell(const PrincipalOriginAttributes& aAttrs)
 {
   mAppId = aAttrs.mAppId;
-  mInBrowser = aAttrs.mInBrowser;
+  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
 
   // addonId is computed from the principal URI and never propagated
   mUserContextId = aAttrs.mUserContextId;
 
   // TODO:
   // Bug 1225353 - DocShell/NeckoOriginAttributes should inherit
   // mSignedPkg accordingly by mSignedPkgInBrowser
   mSignedPkg = aAttrs.mSignedPkg;
 }
 
 void
 NeckoOriginAttributes::InheritFromDocToNecko(const PrincipalOriginAttributes& aAttrs)
 {
   mAppId = aAttrs.mAppId;
-  mInBrowser = aAttrs.mInBrowser;
+  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
 
   // addonId is computed from the principal URI and never propagated
   mUserContextId = aAttrs.mUserContextId;
 
   // TODO:
   // Bug 1225353 - DocShell/NeckoOriginAttributes should inherit
   // mSignedPkg accordingly by mSignedPkgInBrowser
 }
 
 void
 NeckoOriginAttributes::InheritFromDocShellToNecko(const DocShellOriginAttributes& aAttrs)
 {
   mAppId = aAttrs.mAppId;
-  mInBrowser = aAttrs.mInBrowser;
+  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
 
   // addonId is computed from the principal URI and never propagated
   mUserContextId = aAttrs.mUserContextId;
 
   // TODO:
   // Bug 1225353 - DocShell/NeckoOriginAttributes should inherit
   // mSignedPkg accordingly by mSignedPkgInBrowser
 }
@@ -114,17 +114,17 @@ OriginAttributes::CreateSuffix(nsACStrin
   // naming (see addonId below).
   //
 
   if (mAppId != nsIScriptSecurityManager::NO_APP_ID) {
     value.AppendInt(mAppId);
     params->Set(NS_LITERAL_STRING("appId"), value);
   }
 
-  if (mInBrowser) {
+  if (mInIsolatedMozBrowser) {
     params->Set(NS_LITERAL_STRING("inBrowser"), NS_LITERAL_STRING("1"));
   }
 
   if (!mAddonId.IsEmpty()) {
     if (mAddonId.FindCharInSet(dom::quota::QuotaManager::kReplaceChars) != kNotFound) {
 #ifdef MOZ_CRASHREPORTER
       CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("Crash_AddonId"),
                                          NS_ConvertUTF16toUTF8(mAddonId));
@@ -186,17 +186,17 @@ public:
       return true;
     }
 
     if (aName.EqualsLiteral("inBrowser")) {
       if (!aValue.EqualsLiteral("1")) {
         return false;
       }
 
-      mOriginAttributes->mInBrowser = true;
+      mOriginAttributes->mInIsolatedMozBrowser = true;
       return true;
     }
 
     if (aName.EqualsLiteral("addonId")) {
       MOZ_RELEASE_ASSERT(mOriginAttributes->mAddonId.IsEmpty());
       mOriginAttributes->mAddonId.Assign(aValue);
       return true;
     }
@@ -464,17 +464,17 @@ BasePrincipal::GetIsSystemPrincipal(bool
 {
   *aResult = Kind() == eSystemPrincipal;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BasePrincipal::GetJarPrefix(nsACString& aJarPrefix)
 {
-  mozilla::GetJarPrefix(mOriginAttributes.mAppId, mOriginAttributes.mInBrowser, aJarPrefix);
+  mozilla::GetJarPrefix(mOriginAttributes.mAppId, mOriginAttributes.mInIsolatedMozBrowser, aJarPrefix);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BasePrincipal::GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal)
 {
   if (NS_WARN_IF(!ToJSValue(aCx, mOriginAttributes, aVal))) {
     return NS_ERROR_FAILURE;
@@ -518,19 +518,19 @@ BasePrincipal::GetAppId(uint32_t* aAppId
 NS_IMETHODIMP
 BasePrincipal::GetUserContextId(uint32_t* aUserContextId)
 {
   *aUserContextId = UserContextId();
   return NS_OK;
 }
 
 NS_IMETHODIMP
-BasePrincipal::GetIsInBrowserElement(bool* aIsInBrowserElement)
+BasePrincipal::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement)
 {
-  *aIsInBrowserElement = IsInBrowserElement();
+  *aIsInIsolatedMozBrowserElement = IsInIsolatedMozBrowserElement();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BasePrincipal::GetUnknownAppId(bool* aUnknownAppId)
 {
   *aUnknownAppId = AppId() == nsIScriptSecurityManager::UNKNOWN_APP_ID;
   return NS_OK;
--- a/caps/BasePrincipal.h
+++ b/caps/BasePrincipal.h
@@ -25,17 +25,17 @@ namespace mozilla {
 // Base OriginAttributes class. This has several subclass flavors, and is not
 // directly constructable itself.
 class OriginAttributes : public dom::OriginAttributesDictionary
 {
 public:
   bool operator==(const OriginAttributes& aOther) const
   {
     return mAppId == aOther.mAppId &&
-           mInBrowser == aOther.mInBrowser &&
+           mInIsolatedMozBrowser == aOther.mInIsolatedMozBrowser &&
            mAddonId == aOther.mAddonId &&
            mUserContextId == aOther.mUserContextId &&
            mSignedPkg == aOther.mSignedPkg;
   }
   bool operator!=(const OriginAttributes& aOther) const
   {
     return !(*this == aOther);
   }
@@ -70,20 +70,20 @@ class NeckoOriginAttributes;
 // flavors, and a variety of InheritFrom* methods to implement the transfer
 // behavior.
 
 // For OriginAttributes stored on principals.
 class PrincipalOriginAttributes : public OriginAttributes
 {
 public:
   PrincipalOriginAttributes() {}
-  PrincipalOriginAttributes(uint32_t aAppId, bool aInBrowser)
+  PrincipalOriginAttributes(uint32_t aAppId, bool aInIsolatedMozBrowser)
   {
     mAppId = aAppId;
-    mInBrowser = aInBrowser;
+    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
   }
 
   // Inheriting OriginAttributes from docshell to document when user navigates.
   //
   // @param aAttrs  Origin Attributes of the docshell.
   // @param aURI    The URI of the document.
   void InheritFromDocShellToDoc(const DocShellOriginAttributes& aAttrs,
                                 const nsIURI* aURI);
@@ -92,39 +92,39 @@ public:
   void InheritFromNecko(const NeckoOriginAttributes& aAttrs);
 };
 
 // For OriginAttributes stored on docshells / loadcontexts / browsing contexts.
 class DocShellOriginAttributes : public OriginAttributes
 {
 public:
   DocShellOriginAttributes() {}
-  DocShellOriginAttributes(uint32_t aAppId, bool aInBrowser)
+  DocShellOriginAttributes(uint32_t aAppId, bool aInIsolatedMozBrowser)
   {
     mAppId = aAppId;
-    mInBrowser = aInBrowser;
+    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
   }
 
   // Inheriting OriginAttributes from document to child docshell when an
   // <iframe> is created.
   //
   // @param aAttrs  Origin Attributes of the document.
   void
   InheritFromDocToChildDocShell(const PrincipalOriginAttributes& aAttrs);
 };
 
 // For OriginAttributes stored on Necko.
 class NeckoOriginAttributes : public OriginAttributes
 {
 public:
   NeckoOriginAttributes() {}
-  NeckoOriginAttributes(uint32_t aAppId, bool aInBrowser)
+  NeckoOriginAttributes(uint32_t aAppId, bool aInIsolatedMozBrowser)
   {
     mAppId = aAppId;
-    mInBrowser = aInBrowser;
+    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
   }
 
   // Inheriting OriginAttributes from document to necko when a network request
   // is made.
   void InheritFromDocToNecko(const PrincipalOriginAttributes& aAttrs);
 
   void InheritFromDocShellToNecko(const DocShellOriginAttributes& aAttrs);
 };
@@ -154,17 +154,17 @@ public:
 
   // Performs a match of |aAttrs| against this pattern.
   bool Matches(const OriginAttributes& aAttrs) const
   {
     if (mAppId.WasPassed() && mAppId.Value() != aAttrs.mAppId) {
       return false;
     }
 
-    if (mInBrowser.WasPassed() && mInBrowser.Value() != aAttrs.mInBrowser) {
+    if (mInIsolatedMozBrowser.WasPassed() && mInIsolatedMozBrowser.Value() != aAttrs.mInIsolatedMozBrowser) {
       return false;
     }
 
     if (mAddonId.WasPassed() && mAddonId.Value() != aAttrs.mAddonId) {
       return false;
     }
 
     if (mUserContextId.WasPassed() && mUserContextId.Value() != aAttrs.mUserContextId) {
@@ -210,33 +210,33 @@ public:
   NS_IMETHOD GetIsCodebasePrincipal(bool* aResult) override;
   NS_IMETHOD GetIsExpandedPrincipal(bool* aResult) override;
   NS_IMETHOD GetIsSystemPrincipal(bool* aResult) override;
   NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) final;
   NS_IMETHOD GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) final;
   NS_IMETHOD GetOriginSuffix(nsACString& aOriginSuffix) final;
   NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) final;
   NS_IMETHOD GetAppId(uint32_t* aAppStatus) final;
-  NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) final;
+  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) final;
   NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) final;
   NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final;
 
   virtual bool IsOnCSSUnprefixingWhitelist() override { return false; }
 
   virtual bool IsCodebasePrincipal() const { return false; };
 
   static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
   static already_AddRefed<BasePrincipal>
   CreateCodebasePrincipal(nsIURI* aURI, const PrincipalOriginAttributes& aAttrs);
   static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(const nsACString& aOrigin);
 
   const PrincipalOriginAttributes& OriginAttributesRef() { return mOriginAttributes; }
   uint32_t AppId() const { return mOriginAttributes.mAppId; }
   uint32_t UserContextId() const { return mOriginAttributes.mUserContextId; }
-  bool IsInBrowserElement() const { return mOriginAttributes.mInBrowser; }
+  bool IsInIsolatedMozBrowserElement() const { return mOriginAttributes.mInIsolatedMozBrowser; }
 
   enum PrincipalKind {
     eNullPrincipal,
     eCodebasePrincipal,
     eExpandedPrincipal,
     eSystemPrincipal
   };
 
--- a/caps/nsIPrincipal.idl
+++ b/caps/nsIPrincipal.idl
@@ -298,20 +298,23 @@ interface nsIPrincipal : nsISerializable
     /**
      * Gets the id of the user context this principal is inside.  If this
      * principal is inside the default userContext, this returns
      * nsIScriptSecurityManager::DEFAULT_USER_CONTEXT_ID.
      */
     [infallible] readonly attribute unsigned long userContextId;
 
     /**
-     * Returns true iff the principal is inside a browser element.  (<iframe
-     * mozbrowser mozapp> does not count as a browser element.)
+     * Returns true iff the principal is inside an isolated mozbrowser element.
+     * <iframe mozbrowser mozapp> and <xul:browser> are not considered to be
+     * mozbrowser elements.  <iframe mozbrowser noisolation> does not count as
+     * isolated since isolation is disabled.  Isolation can only be disabled if
+     * the containing document is chrome.
      */
-    [infallible] readonly attribute boolean isInBrowserElement;
+    [infallible] readonly attribute boolean isInIsolatedMozBrowserElement;
 
     /**
      * Returns true if this principal has an unknown appId. This shouldn't
      * generally be used. We only expose it due to not providing the correct
      * appId everywhere where we construct principals.
      */
     [infallible] readonly attribute boolean unknownAppId;
 
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -255,17 +255,17 @@ nsScriptSecurityManager::SecurityHashURI
 {
     return NS_SecurityHashURI(aURI);
 }
 
 uint16_t
 nsScriptSecurityManager::AppStatusForPrincipal(nsIPrincipal *aPrin)
 {
     uint32_t appId = aPrin->GetAppId();
-    bool inMozBrowser = aPrin->GetIsInBrowserElement();
+    bool inMozBrowser = aPrin->GetIsInIsolatedMozBrowserElement();
     NS_WARN_IF_FALSE(appId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
                      "Asking for app status on a principal with an unknown app id");
     // Installed apps have a valid app id (not NO_APP_ID or UNKNOWN_APP_ID)
     // and they are not inside a mozbrowser.
     if (appId == nsIScriptSecurityManager::NO_APP_ID ||
         appId == nsIScriptSecurityManager::UNKNOWN_APP_ID || inMozBrowser)
     {
         return nsIPrincipal::APP_STATUS_NOT_INSTALLED;
@@ -585,17 +585,17 @@ nsScriptSecurityManager::CheckLoadURIFro
  * CheckLoadURIWithPrincipal means denying loading if the given URI has certain
  * nsIProtocolHandler flags set.
  * @return if success, access is allowed. Otherwise, deny access
  */
 static nsresult
 DenyAccessIfURIHasFlags(nsIURI* aURI, uint32_t aURIFlags)
 {
     NS_PRECONDITION(aURI, "Must have URI!");
-    
+
     bool uriHasFlags;
     nsresult rv =
         NS_URIChainHasFlags(aURI, aURIFlags, &uriHasFlags);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (uriHasFlags) {
         return NS_ERROR_DOM_BAD_URI;
     }
@@ -719,17 +719,17 @@ nsScriptSecurityManager::CheckLoadURIWit
             }
             // None of our whitelisted principals worked.
             return NS_ERROR_DOM_BAD_URI;
         }
         NS_ERROR("Non-system principals or expanded principal passed to CheckLoadURIWithPrincipal "
                  "must have a URI!");
         return NS_ERROR_UNEXPECTED;
     }
-    
+
     // Automatic loads are not allowed from certain protocols.
     if (aFlags & nsIScriptSecurityManager::LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT) {
         nsresult rv =
             DenyAccessIfURIHasFlags(sourceURI,
                                     nsIProtocolHandler::URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT);
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
@@ -953,17 +953,17 @@ nsScriptSecurityManager::CheckLoadURIWit
         if (NS_SUCCEEDED(rv)) {
             nsCOMPtr<nsIConsoleService> console(
               do_GetService("@mozilla.org/consoleservice;1"));
             NS_ENSURE_TRUE(console, NS_ERROR_FAILURE);
 
             console->LogStringMessage(message.get());
         }
     }
-    
+
     return NS_OK;
 }
 
 nsresult
 nsScriptSecurityManager::ReportError(JSContext* cx, const nsAString& messageTag,
                                      nsIURI* aSource, nsIURI* aTarget)
 {
     nsresult rv;
@@ -1165,23 +1165,23 @@ nsScriptSecurityManager::CreateExpandedP
   nsCOMPtr<nsIPrincipal> p = new nsExpandedPrincipal(principals);
   p.forget(aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::GetAppCodebasePrincipal(nsIURI* aURI,
                                                  uint32_t aAppId,
-                                                 bool aInMozBrowser,
+                                                 bool aInIsolatedMozBrowser,
                                                  nsIPrincipal** aPrincipal)
 {
   NS_ENSURE_TRUE(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
                  NS_ERROR_INVALID_ARG);
 
-  PrincipalOriginAttributes attrs(aAppId, aInMozBrowser);
+  PrincipalOriginAttributes attrs(aAppId, aInIsolatedMozBrowser);
   nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::
   GetLoadContextCodebasePrincipal(nsIURI* aURI,
@@ -1561,50 +1561,50 @@ nsScriptSecurityManager::InitPrefs()
     Preferences::AddStrongObservers(this, kObservedPrefs);
 
     return NS_OK;
 }
 
 namespace mozilla {
 
 void
-GetJarPrefix(uint32_t aAppId, bool aInMozBrowser, nsACString& aJarPrefix)
+GetJarPrefix(uint32_t aAppId, bool aInIsolatedMozBrowser, nsACString& aJarPrefix)
 {
   MOZ_ASSERT(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID);
 
   if (aAppId == nsIScriptSecurityManager::UNKNOWN_APP_ID) {
     aAppId = nsIScriptSecurityManager::NO_APP_ID;
   }
 
   aJarPrefix.Truncate();
 
   // Fallback.
-  if (aAppId == nsIScriptSecurityManager::NO_APP_ID && !aInMozBrowser) {
+  if (aAppId == nsIScriptSecurityManager::NO_APP_ID && !aInIsolatedMozBrowser) {
     return;
   }
 
   // aJarPrefix = appId + "+" + { 't', 'f' } + "+";
   aJarPrefix.AppendInt(aAppId);
   aJarPrefix.Append('+');
-  aJarPrefix.Append(aInMozBrowser ? 't' : 'f');
+  aJarPrefix.Append(aInIsolatedMozBrowser ? 't' : 'f');
   aJarPrefix.Append('+');
 
   return;
 }
 
 } // namespace mozilla
 
 NS_IMETHODIMP
 nsScriptSecurityManager::GetJarPrefix(uint32_t aAppId,
-                                      bool aInMozBrowser,
+                                      bool aInIsolatedMozBrowser,
                                       nsACString& aJarPrefix)
 {
   MOZ_ASSERT(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID);
 
-  mozilla::GetJarPrefix(aAppId, aInMozBrowser, aJarPrefix);
+  mozilla::GetJarPrefix(aAppId, aInIsolatedMozBrowser, aJarPrefix);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::GetDomainPolicyActive(bool *aRv)
 {
     *aRv = !!mDomainPolicy;
     return NS_OK;
@@ -1689,9 +1689,8 @@ nsScriptSecurityManager::PolicyAllowsScr
     rv = superExceptions->ContainsSuperDomain(aURI, &contains);
     NS_ENSURE_SUCCESS(rv, rv);
     if (contains) {
         *aRv = !*aRv;
     }
 
     return NS_OK;
 }
-
--- a/caps/nsScriptSecurityManager.h
+++ b/caps/nsScriptSecurityManager.h
@@ -146,14 +146,14 @@ private:
     static nsIStringBundle *sStrBundle;
     static JSRuntime       *sRuntime;
 };
 
 namespace mozilla {
 
 void
 GetJarPrefix(uint32_t aAppid,
-             bool aInMozBrowser,
+             bool aInIsolatedMozBrowser,
              nsACString& aJarPrefix);
 
 } // namespace mozilla
 
 #endif // nsScriptSecurityManager_h__
--- a/caps/tests/gtest/TestOriginAttributes.cpp
+++ b/caps/tests/gtest/TestOriginAttributes.cpp
@@ -19,19 +19,19 @@ TestSuffix(const PrincipalOriginAttribut
 }
 
 TEST(PrincipalOriginAttributes, Suffix_default)
 {
   PrincipalOriginAttributes attrs;
   TestSuffix(attrs);
 }
 
-TEST(PrincipalOriginAttributes, Suffix_appId_inBrowser)
+TEST(PrincipalOriginAttributes, Suffix_appId_inIsolatedMozBrowser)
 {
   PrincipalOriginAttributes attrs(1, true);
   TestSuffix(attrs);
 }
 
-TEST(PrincipalOriginAttributes, Suffix_maxAppId_inBrowser)
+TEST(PrincipalOriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser)
 {
   PrincipalOriginAttributes attrs(4294967295, true);
   TestSuffix(attrs);
 }
--- a/caps/tests/mochitest/test_principal_jarprefix_origin_appid_appstatus.html
+++ b/caps/tests/mochitest/test_principal_jarprefix_origin_appid_appstatus.html
@@ -233,17 +233,17 @@ var gData = [
   // browser containing an iframe is part of the browser
   {
     src: "http://example.org/",
     isapp: false,
     browser: true,
     child: {
       src: "http://example.org/chrome/",
       isapp: false,
-      inBrowser: true,
+      inIsolatedMozBrowser: true,
     },
     test: [ "child-has-same-eo" ],
   },
 ];
 
 // The list of all data ids generated by this test.
 var eoList = [];
 
@@ -292,29 +292,29 @@ function checkIFrame(aFrame, data) {
     is(eoList.indexOf(principal.jarPrefix + principal.origin), -1,
        "extended origin should be unique");
   }
   if (data.test.indexOf("eo-as-last") != -1) {
     is(principal.jarPrefix + principal.origin, eoList[eoList.length-1],
        "extended origin should be the same as the last inserted one");
   }
 
-  is(principal.isInBrowserElement, !!data.browser,
-     "check principal.isInBrowserElement");
+  is(principal.isInIsolatedMozBrowserElement, !!data.browser,
+     "check principal.isInIsolatedMozBrowserElement");
 
   if (data.child) {
     let childPrincipal = aFrame.contentWindow.frames[0].document.nodePrincipal;
 
     if (data.child.isapp) {
       is(childPrincipal.appStatus, Ci.nsIPrincipal.APP_STATUS_INSTALLED,
          "child should be an installed app");
     }
 
-    is(childPrincipal.isInBrowserElement, !!data.child.browser || !!data.child.inBrowser,
-       "check childPrincipal.isInBrowserElement");
+    is(childPrincipal.isInIsolatedMozBrowserElement, !!data.child.browser || !!data.child.inIsolatedMozBrowser,
+       "check childPrincipal.isInIsolatedMozBrowserElement");
 
     if (data.test.indexOf("child-has-same-eo") != -1) {
       is(childPrincipal.jarPrefix + childPrincipal.origin,
          principal.jarPrefix + principal.origin,
          "child should have the same extended origin as parent");
       is(childPrincipal.appStatus, principal.appStatus,
          "child should have the same appStatus if it has the same extended origin");
       is(childPrincipal.appId, principal.appId,
--- a/caps/tests/unit/test_origin.js
+++ b/caps/tests/unit/test_origin.js
@@ -19,45 +19,45 @@ function checkCrossOrigin(a, b) {
   do_check_false(a.subsumesConsideringDomain(b));
   do_check_false(b.subsumes(a));
   do_check_false(b.subsumesConsideringDomain(a));
 }
 
 function checkOriginAttributes(prin, attrs, suffix) {
   attrs = attrs || {};
   do_check_eq(prin.originAttributes.appId, attrs.appId || 0);
-  do_check_eq(prin.originAttributes.inBrowser, attrs.inBrowser || false);
+  do_check_eq(prin.originAttributes.inIsolatedMozBrowser, attrs.inIsolatedMozBrowser || false);
   do_check_eq(prin.originSuffix, suffix || '');
   do_check_eq(ChromeUtils.originAttributesToSuffix(attrs), suffix || '');
   do_check_true(ChromeUtils.originAttributesMatchPattern(prin.originAttributes, attrs));
   if (!prin.isNullPrincipal && !prin.origin.startsWith('[')) {
     do_check_true(ssm.createCodebasePrincipalFromOrigin(prin.origin).equals(prin));
   } else {
     checkThrows(() => ssm.createCodebasePrincipalFromOrigin(prin.origin));
   }
 }
 
 // utility function useful for debugging
 function printAttrs(name, attrs) {
   do_print(name + " {\n" +
            "\tappId: " + attrs.appId + ",\n" +
            "\tuserContextId: " + attrs.userContextId + ",\n" +
-           "\tinBrowser: " + attrs.inBrowser + ",\n" +
+           "\tinIsolatedMozBrowser: " + attrs.inIsolatedMozBrowser + ",\n" +
            "\taddonId: '" + attrs.addonId + "',\n" +
            "\tsignedPkg: '" + attrs.signedPkg + "'\n}");
 }
 
 
 function checkValues(attrs, values) {
   values = values || {};
   //printAttrs("attrs", attrs);
   //printAttrs("values", values);
   do_check_eq(attrs.appId, values.appId || 0);
   do_check_eq(attrs.userContextId, values.userContextId || 0);
-  do_check_eq(attrs.inBrowser, values.inBrowser || false);
+  do_check_eq(attrs.inIsolatedMozBrowser, values.inIsolatedMozBrowser || false);
   do_check_eq(attrs.addonId, values.addonId || '');
   do_check_eq(attrs.signedPkg, values.signedPkg || '');
 }
 
 function run_test() {
   // Attributeless origins.
   do_check_eq(ssm.getSystemPrincipal().origin, '[System Principal]');
   checkOriginAttributes(ssm.getSystemPrincipal());
@@ -94,32 +94,32 @@ function run_test() {
   // Just app.
   var exampleOrg_app = ssm.createCodebasePrincipal(makeURI('http://example.org'), {appId: 42});
   var nullPrin_app = ssm.createNullPrincipal({appId: 42});
   checkOriginAttributes(exampleOrg_app, {appId: 42}, '^appId=42');
   checkOriginAttributes(nullPrin_app, {appId: 42}, '^appId=42');
   do_check_eq(exampleOrg_app.origin, 'http://example.org^appId=42');
 
   // Just browser.
-  var exampleOrg_browser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {inBrowser: true});
-  var nullPrin_browser = ssm.createNullPrincipal({inBrowser: true});
-  checkOriginAttributes(exampleOrg_browser, {inBrowser: true}, '^inBrowser=1');
-  checkOriginAttributes(nullPrin_browser, {inBrowser: true}, '^inBrowser=1');
+  var exampleOrg_browser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {inIsolatedMozBrowser: true});
+  var nullPrin_browser = ssm.createNullPrincipal({inIsolatedMozBrowser: true});
+  checkOriginAttributes(exampleOrg_browser, {inIsolatedMozBrowser: true}, '^inBrowser=1');
+  checkOriginAttributes(nullPrin_browser, {inIsolatedMozBrowser: true}, '^inBrowser=1');
   do_check_eq(exampleOrg_browser.origin, 'http://example.org^inBrowser=1');
 
   // App and browser.
-  var exampleOrg_appBrowser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {inBrowser: true, appId: 42});
-  var nullPrin_appBrowser = ssm.createNullPrincipal({inBrowser: true, appId: 42});
-  checkOriginAttributes(exampleOrg_appBrowser, {appId: 42, inBrowser: true}, '^appId=42&inBrowser=1');
-  checkOriginAttributes(nullPrin_appBrowser, {appId: 42, inBrowser: true}, '^appId=42&inBrowser=1');
+  var exampleOrg_appBrowser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {inIsolatedMozBrowser: true, appId: 42});
+  var nullPrin_appBrowser = ssm.createNullPrincipal({inIsolatedMozBrowser: true, appId: 42});
+  checkOriginAttributes(exampleOrg_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, '^appId=42&inBrowser=1');
+  checkOriginAttributes(nullPrin_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, '^appId=42&inBrowser=1');
   do_check_eq(exampleOrg_appBrowser.origin, 'http://example.org^appId=42&inBrowser=1');
 
   // App and browser, different domain.
-  var exampleCom_appBrowser = ssm.createCodebasePrincipal(makeURI('https://www.example.com:123'), {appId: 42, inBrowser: true});
-  checkOriginAttributes(exampleCom_appBrowser, {appId: 42, inBrowser: true}, '^appId=42&inBrowser=1');
+  var exampleCom_appBrowser = ssm.createCodebasePrincipal(makeURI('https://www.example.com:123'), {appId: 42, inIsolatedMozBrowser: true});
+  checkOriginAttributes(exampleCom_appBrowser, {appId: 42, inIsolatedMozBrowser: true}, '^appId=42&inBrowser=1');
   do_check_eq(exampleCom_appBrowser.origin, 'https://www.example.com:123^appId=42&inBrowser=1');
 
   // Addon.
   var exampleOrg_addon = ssm.createCodebasePrincipal(makeURI('http://example.org'), {addonId: 'dummy'});
   checkOriginAttributes(exampleOrg_addon, { addonId: "dummy" }, '^addonId=dummy');
   do_check_eq(exampleOrg_addon.origin, 'http://example.org^addonId=dummy');
 
   // Make sure we don't crash when serializing principals with UNKNOWN_APP_ID.
@@ -156,18 +156,18 @@ function run_test() {
   do_check_eq(exampleOrg_userContextApp.origin, 'http://example.org^appId=24&userContextId=42');
 
   // Just signedPkg
   var exampleOrg_signedPkg = ssm.createCodebasePrincipal(makeURI('http://example.org'), {signedPkg: 'whatever'});
   checkOriginAttributes(exampleOrg_signedPkg, { signedPkg: 'whatever' }, '^signedPkg=whatever');
   do_check_eq(exampleOrg_signedPkg.origin, 'http://example.org^signedPkg=whatever');
 
   // signedPkg and browser
-  var exampleOrg_signedPkg_browser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {signedPkg: 'whatever', inBrowser: true});
-  checkOriginAttributes(exampleOrg_signedPkg_browser, { signedPkg: 'whatever', inBrowser: true }, '^inBrowser=1&signedPkg=whatever');
+  var exampleOrg_signedPkg_browser = ssm.createCodebasePrincipal(makeURI('http://example.org'), {signedPkg: 'whatever', inIsolatedMozBrowser: true});
+  checkOriginAttributes(exampleOrg_signedPkg_browser, { signedPkg: 'whatever', inIsolatedMozBrowser: true }, '^inBrowser=1&signedPkg=whatever');
   do_check_eq(exampleOrg_signedPkg_browser.origin, 'http://example.org^inBrowser=1&signedPkg=whatever');
 
   // Just signedPkg (but different value from 'exampleOrg_signedPkg_app')
   var exampleOrg_signedPkg_another = ssm.createCodebasePrincipal(makeURI('http://example.org'), {signedPkg: 'whatup'});
 
   // Check that all of the above are cross-origin.
   checkCrossOrigin(exampleOrg_app, exampleOrg);
   checkCrossOrigin(exampleOrg_app, nullPrin_app);
@@ -207,20 +207,20 @@ function run_test() {
   checkValues(emptyAttrs);
 
   var uri = "http://example.org";
   var tests = [
     [ "", {} ],
     [ "^appId=5", {appId: 5} ],
     [ "^userContextId=3", {userContextId: 3} ],
     [ "^addonId=fooBar", {addonId: "fooBar"} ],
-    [ "^inBrowser=1", {inBrowser: true} ],
+    [ "^inBrowser=1", {inIsolatedMozBrowser: true} ],
     [ "^signedPkg=bazQux", {signedPkg: "bazQux"} ],
     [ "^appId=3&inBrowser=1&userContextId=6",
-      {appId: 3, userContextId: 6, inBrowser: true} ] ];
+      {appId: 3, userContextId: 6, inIsolatedMozBrowser: true} ] ];
 
   // check that we can create an origin attributes from an origin properly
   tests.forEach(function(t) {
     let attrs = ChromeUtils.createOriginAttributesFromOrigin(uri + t[0]);
     checkValues(attrs, t[1]);
     do_check_eq(ChromeUtils.originAttributesToSuffix(attrs), t[0]);
   });
 
--- a/docshell/base/LoadContext.cpp
+++ b/docshell/base/LoadContext.cpp
@@ -173,17 +173,17 @@ LoadContext::SetRemoteTabs(bool aUseRemo
 
 NS_IMETHODIMP
 LoadContext::GetIsInBrowserElement(bool* aIsInBrowserElement)
 {
   MOZ_ASSERT(mIsNotNull);
 
   NS_ENSURE_ARG_POINTER(aIsInBrowserElement);
 
-  *aIsInBrowserElement = mOriginAttributes.mInBrowser;
+  *aIsInBrowserElement = mOriginAttributes.mInIsolatedMozBrowser;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 LoadContext::GetAppId(uint32_t* aAppId)
 {
   MOZ_ASSERT(mIsNotNull);
 
--- a/docshell/base/LoadContext.h
+++ b/docshell/base/LoadContext.h
@@ -34,35 +34,35 @@ class LoadContext final
   : public nsILoadContext
   , public nsIInterfaceRequestor
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSILOADCONTEXT
   NS_DECL_NSIINTERFACEREQUESTOR
 
-  // AppId/inBrowser arguments override those in SerializedLoadContext provided
-  // by child process.
+  // appId/inIsolatedMozBrowser arguments override those in SerializedLoadContext
+  // provided by child process.
   LoadContext(const IPC::SerializedLoadContext& aToCopy,
               dom::Element* aTopFrameElement,
               DocShellOriginAttributes& aAttrs)
     : mTopFrameElement(do_GetWeakReference(aTopFrameElement))
     , mNestedFrameId(0)
     , mIsContent(aToCopy.mIsContent)
     , mUsePrivateBrowsing(aToCopy.mUsePrivateBrowsing)
     , mUseRemoteTabs(aToCopy.mUseRemoteTabs)
     , mOriginAttributes(aAttrs)
 #ifdef DEBUG
     , mIsNotNull(aToCopy.mIsNotNull)
 #endif
   {
   }
 
-  // AppId/inBrowser arguments override those in SerializedLoadContext provided
-  // by child process.
+  // appId/inIsolatedMozBrowser arguments override those in SerializedLoadContext
+  // provided by child process.
   LoadContext(const IPC::SerializedLoadContext& aToCopy,
               uint64_t aNestedFrameId,
               DocShellOriginAttributes& aAttrs)
     : mTopFrameElement(nullptr)
     , mNestedFrameId(aNestedFrameId)
     , mIsContent(aToCopy.mIsContent)
     , mUsePrivateBrowsing(aToCopy.mUsePrivateBrowsing)
     , mUseRemoteTabs(aToCopy.mUseRemoteTabs)
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -13996,17 +13996,17 @@ nsDocShell::GetOriginAttributes()
 
   if (mOwnOrContainingAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
     attrs.mAppId = mOwnOrContainingAppId;
   }
 
   attrs.mUserContextId = mUserContextId;
 
   if (mFrameType == eFrameTypeBrowser) {
-    attrs.mInBrowser = true;
+    attrs.mInIsolatedMozBrowser = true;
   }
 
   return attrs;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetOriginAttributes(JS::MutableHandle<JS::Value> aVal)
 {
--- a/dom/apps/AppsUtils.jsm
+++ b/dom/apps/AppsUtils.jsm
@@ -144,26 +144,27 @@ function _setAppProperties(aObj, aApp) {
 this.AppsUtils = {
   // Clones a app, without the manifest.
   cloneAppObject: function(aApp) {
     let obj = {};
     _setAppProperties(obj, aApp);
     return obj;
   },
 
-  // Creates a nsILoadContext object with a given appId and isBrowser flag.
-  createLoadContext: function createLoadContext(aAppId, aIsBrowser) {
+  // Creates a nsILoadContext object with a given appId and inIsolatedMozBrowser
+  // flag.
+  createLoadContext: function createLoadContext(aAppId, aInIsolatedMozBrowser) {
     return {
        associatedWindow: null,
        topWindow : null,
        appId: aAppId,
-       isInBrowserElement: aIsBrowser,
+       isInBrowserElement: aInIsolatedMozBrowser,
        originAttributes: {
          appId: aAppId,
-         inBrowser: aIsBrowser
+         inIsolatedMozBrowser: aInIsolatedMozBrowser
        },
        usePrivateBrowsing: false,
        isContent: false,
 
        isAppOfType: function(appType) {
          throw Cr.NS_ERROR_NOT_IMPLEMENTED;
        },
 
--- a/dom/apps/Webapps.js
+++ b/dom/apps/Webapps.js
@@ -178,17 +178,17 @@ WebappsRegistry.prototype = {
                     categories: categories
                   },
 
              from: installURL,
              oid: this._id,
              topId: this._topId,
              requestID: requestID,
              appId: principal.appId,
-             isBrowser: principal.isInBrowserElement,
+             isBrowser: principal.isInIsolatedMozBrowserElement,
              isPackage: isPackage
            };
   },
 
   // mozIDOMApplicationRegistry implementation
 
   install: function(aURL, aParams) {
     let request = this.createRequest();
--- a/dom/apps/Webapps.jsm
+++ b/dom/apps/Webapps.jsm
@@ -3534,17 +3534,17 @@ this.DOMApplicationRegistry = {
       }).bind(this),
       onStatus: function(aRequest, aContext, aStatus, aStatusArg) { },
 
       // nsILoadContext
       appId: aOldApp.installerAppId,
       isInBrowserElement: aOldApp.installerIsBrowser,
       originAttributes: {
         appId: aOldApp.installerAppId,
-        inBrowser: aOldApp.installerIsBrowser
+        inIsolatedMozBrowser: aOldApp.installerIsBrowser
       },
       usePrivateBrowsing: false,
       isContent: false,
       associatedWindow: null,
       topWindow : null,
       isAppOfType: function(appType) {
         throw Cr.NS_ERROR_NOT_IMPLEMENTED;
       }
@@ -4897,17 +4897,17 @@ this.DOMApplicationRegistry = {
     };
     this._clearOriginData(appId, browserOnly);
     this._notifyCategoryAndObservers(subject, "webapps-clear-data", null, msg);
   },
 
   _clearOriginData: function(appId, browserOnly) {
     let attributes = {appId: appId};
     if (browserOnly) {
-      attributes.inBrowser = true;
+      attributes.inIsolatedMozBrowser = true;
     }
     this._notifyCategoryAndObservers(null, "clear-origin-data", JSON.stringify(attributes));
   }
 };
 
 /**
  * Appcache download observer
  */
--- a/dom/apps/tests/unit/test_moziapplication.js
+++ b/dom/apps/tests/unit/test_moziapplication.js
@@ -48,16 +48,16 @@ add_test(() => {
                  "app[" + key + "] should be equal to mozapp[" + key + "]");
   });
 
   Assert.ok(mozapp.principal, "app principal should exist");
   let expectedPrincipalOrigin = app.origin + "^appId=" + app.localId;
   Assert.equal(mozapp.principal.origin, expectedPrincipalOrigin,
                "app principal origin ok");
   Assert.equal(mozapp.principal.appId, app.localId, "app principal appId ok");
-  Assert.equal(mozapp.principal.isInBrowserElement, false,
-               "app principal isInBrowserElement ok");
+  Assert.equal(mozapp.principal.isInIsolatedMozBrowserElement, false,
+               "app principal isInIsolatedMozBrowserElement ok");
   run_next_test();
 });
 
 function run_test() {
   run_next_test();
 }
--- a/dom/base/ChromeUtils.cpp
+++ b/dom/base/ChromeUtils.cpp
@@ -103,15 +103,15 @@ ChromeUtils::CreateOriginAttributesFromD
 
 /* static */ bool
 ChromeUtils::IsOriginAttributesEqual(dom::GlobalObject& aGlobal,
                                      const dom::OriginAttributesDictionary& aA,
                                      const dom::OriginAttributesDictionary& aB)
 {
   return aA.mAddonId == aB.mAddonId &&
          aA.mAppId == aB.mAppId &&
-         aA.mInBrowser == aB.mInBrowser &&
+         aA.mInIsolatedMozBrowser == aB.mInIsolatedMozBrowser &&
          aA.mSignedPkg == aB.mSignedPkg &&
          aA.mUserContextId == aB.mUserContextId;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -3061,17 +3061,17 @@ nsFrameLoader::MaybeUpdatePrimaryTabPare
 nsresult
 nsFrameLoader::GetNewTabContext(MutableTabContext* aTabContext,
                                 nsIURI* aURI,
                                 const nsACString& aPackageId)
 {
   nsCOMPtr<mozIApplication> ownApp = GetOwnApp();
   nsCOMPtr<mozIApplication> containingApp = GetContainingApp();
   DocShellOriginAttributes attrs;
-  attrs.mInBrowser = OwnerIsBrowserFrame();
+  attrs.mInIsolatedMozBrowser = OwnerIsBrowserFrame();
 
   nsCString signedPkgOrigin;
   if (!aPackageId.IsEmpty()) {
     // Only when aPackageId is not empty would signed package origin
     // be meaningful.
     nsPrincipal::GetOriginForURI(aURI, signedPkgOrigin);
   }
 
--- a/dom/base/test/test_messagemanager_principal.html
+++ b/dom/base/test/test_messagemanager_principal.html
@@ -29,18 +29,18 @@
         sendAsyncMessage(message.name, "principal: " + (message.principal ? "OK" : "KO"));
 
         sendAsyncMessage(message.name, "principal.appId: " +
                          ("appId" in message.principal ? "OK" : "KO"));
 
         sendAsyncMessage(message.name, "principal.origin: " +
                          ("origin" in message.principal ? "OK" : "KO"));
 
-        sendAsyncMessage(message.name, "principal.isInBrowserElement: " +
-                         ("isInBrowserElement" in message.principal ? "OK" : "KO"));
+        sendAsyncMessage(message.name, "principal.isInIsolatedMozBrowserElement: " +
+                         ("isInIsolatedMozBrowserElement" in message.principal ? "OK" : "KO"));
 
         sendAsyncMessage(message.name, "DONE");
       });
     }
 
     function runTests() {
       ok("Browser prefs set.");
 
--- a/dom/base/test/test_messagemanager_send_principal.html
+++ b/dom/base/test/test_messagemanager_send_principal.html
@@ -33,18 +33,18 @@
                          (message.data instanceof Ci.nsIPrincipal ? "OK" : "KO"));
 
         sendAsyncMessage("test:result", "principal.appId: " +
                          ("appId" in message.data ? "OK" : "KO"));
 
         sendAsyncMessage("test:result", "principal.origin: " +
                          ("origin" in message.data ? "OK" : "KO"));
 
-        sendAsyncMessage("test:result", "principal.isInBrowserElement: " +
-                         ("isInBrowserElement" in message.data ? "OK" : "KO"));
+        sendAsyncMessage("test:result", "principal.isInIsolatedMozBrowserElement: " +
+                         ("isInIsolatedMozBrowserElement" in message.data ? "OK" : "KO"));
       });
 
       addMessageListener("test:system", function(message) {
         sendAsyncMessage("test:result", "isSystemPrincipal: " +
                          (secMan.isSystemPrincipal(message.data) ? "OK" : "KO"));
       });
 
       addMessageListener("test:ep", function(message) {
--- a/dom/base/test/test_messagemanager_targetchain.html
+++ b/dom/base/test/test_messagemanager_targetchain.html
@@ -105,17 +105,17 @@
       SpecialPowers.pushPermissions([
         { type: "browser", allow: 1, context: { url: principal.URI.spec,
                                                 originAttributes: {
                                                   appId: principal.appId
                                                 }}},
         { type: "browser", allow: 1, context: { url: principal.URI.spec,
                                                 originAttributes: {
                                                   appId: principal.appId,
-                                                  inBrowser: true }}}
+                                                  inIsolatedMozBrowser: true }}}
       ], () => {
         SpecialPowers.pushPrefEnv({
           set: [
             ["dom.mozBrowserFramesEnabled", true],
             ["dom.ipc.browser_frames.oop_by_default", false],
           ]
         }, runTests);
       });
--- a/dom/browser-element/mochitest/browserElement_AllowEmbedAppsInNestedOOIframe.js
+++ b/dom/browser-element/mochitest/browserElement_AllowEmbedAppsInNestedOOIframe.js
@@ -18,17 +18,17 @@ function runTest() {
   iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
     is(e.detail.message == 'app', true, e.detail.message);
     SimpleTest.finish();
   });
 
   document.body.appendChild(iframe);
 
   var context = {url: 'http://example.org',
-                 originAttributes: {inBrowser: true}};
+                 originAttributes: {inIsolatedMozBrowser: true}};
   SpecialPowers.pushPermissions([
     {type: 'browser', allow: 1, context: context},
     {type: 'embed-apps', allow: 1, context: context}
   ], function() {
     iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_AllowEmbedAppsInNestedOOIframe.html';
   });
 }
 
--- a/dom/browser-element/mochitest/browserElement_Auth.js
+++ b/dom/browser-element/mochitest/browserElement_Auth.js
@@ -167,17 +167,17 @@ function testAuthJarNoInterfere(e) {
 
   // Set a bunch of auth data that should not conflict with the correct auth data already
   // stored in the cache.
   var attrs = {appId: 1};
   var principal = secMan.createCodebasePrincipal(uri, attrs);
   authMgr.setAuthIdentity('http', 'test', -1, 'basic', 'http_realm',
                           'tests/dom/browser-element/mochitest/file_http_401_response.sjs',
                           '', 'httpuser', 'wrongpass', false, principal);
-  attrs = {appId: 1, inBrowser: true};
+  attrs = {appId: 1, inIsolatedMozBrowser: true};
   principal = secMan.createCodebasePrincipal(uri, attrs);
   authMgr.setAuthIdentity('http', 'test', -1, 'basic', 'http_realm',
                           'tests/dom/browser-element/mochitest/file_http_401_response.sjs',
                           '', 'httpuser', 'wrongpass', false, principal);
   principal = secMan.createCodebasePrincipal(uri, {});
   authMgr.setAuthIdentity('http', 'test', -1, 'basic', 'http_realm',
                           'tests/dom/browser-element/mochitest/file_http_401_response.sjs',
                           '', 'httpuser', 'wrongpass', false, principal);
@@ -202,17 +202,17 @@ function testAuthJarInterfere(e) {
     .getService(SpecialPowers.Ci.nsIHttpAuthManager);
   var secMan = SpecialPowers.Cc["@mozilla.org/scriptsecuritymanager;1"]
                .getService(SpecialPowers.Ci.nsIScriptSecurityManager);
   var ioService = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
                   .getService(SpecialPowers.Ci.nsIIOService);
   var uri = ioService.newURI("http://test/tests/dom/browser-element/mochitest/file_http_401_response.sjs", null, null);
 
   // Set some auth data that should overwrite the successful stored details.
-  var principal = secMan.createCodebasePrincipal(uri, {inBrowser: true});
+  var principal = secMan.createCodebasePrincipal(uri, {inIsolatedMozBrowser: true});
   authMgr.setAuthIdentity('http', 'test', -1, 'basic', 'http_realm',
                           'tests/dom/browser-element/mochitest/file_http_401_response.sjs',
                           '', 'httpuser', 'wrongpass', false, principal);
 
   // Will authenticate with correct password, prompt should not be
   // called again.
   var gotusernamepasswordrequired = false;
   function onUserNameAndPasswordRequired() {
--- a/dom/browser-element/mochitest/browserElement_CopyPaste.js
+++ b/dom/browser-element/mochitest/browserElement_CopyPaste.js
@@ -324,16 +324,16 @@ function testCut2(e) {
   mm.loadFrameScript(getScriptForGetContent(), false);
 }
 
 // Give our origin permission to open browsers, and remove it when the test is complete.
 var principal = SpecialPowers.wrap(document).nodePrincipal;
 var context = { url: SpecialPowers.wrap(principal.URI).spec,
                 originAttributes: {
                   appId: principal.appId,
-                  inBrowser: true }};
+                  inIsolatedMozBrowser: true }};
 
 addEventListener('testready', function() {
   SpecialPowers.pushPermissions([
     {type: 'browser', allow: 1, context: context}
   ], runTest);
 });
 
--- a/dom/browser-element/mochitest/browserElement_DisallowEmbedAppsInOOP.js
+++ b/dom/browser-element/mochitest/browserElement_DisallowEmbedAppsInOOP.js
@@ -24,17 +24,17 @@ function runTest() {
   iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
     is(e.detail.message == 'app', canEmbedApp, e.detail.message);
     SimpleTest.finish();
   });
 
   document.body.appendChild(iframe);
 
   var context = {url: 'http://example.org',
-                 originAttributes: {inBrowser: true}};
+                 originAttributes: {inIsolatedMozBrowser: true}};
   SpecialPowers.pushPermissions([
     {type: 'browser', allow: 1, context: context},
     {type: 'embed-apps', allow: 1, context: context}
   ], function() {
     iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_DisallowEmbedAppsInOOP.html';
   });
 }
 
--- a/dom/browser-element/mochitest/browserElement_Proxy.js
+++ b/dom/browser-element/mochitest/browserElement_Proxy.js
@@ -10,26 +10,26 @@ browserElementTestHelpers.addPermission(
 function runTest() {
   let frameUrl = SimpleTest.getTestFileURL('/file_empty.html');
   SpecialPowers.pushPermissions([{
     type: 'browser:embedded-system-app',
     allow: true,
     context: {
       url: frameUrl,
       originAttributes: {
-        inBrowser: true
+        inIsolatedMozBrowser: true
       }
     }
   },{
     type: 'browser',
     allow: true,
     context: {
       url: frameUrl,
       originAttributes: {
-        inBrowser: true
+        inIsolatedMozBrowser: true
       }
     }
   }], createFrame);
 }
 
 var frame;
 var mm;
 
--- a/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js
+++ b/dom/browser-element/mochitest/browserElement_SetInputMethodActive.js
@@ -88,17 +88,17 @@ function createFrames() {
 function setPermissions() {
   let permissions = [{
     type: 'input',
     allow: true,
     context: {
       url: SimpleTest.getTestFileURL('/file_empty.html'),
       originAttributes: {
         appId: currentAppId,
-        inBrowser: true
+        inIsolatedMozBrowser: true
       }
     }
   }];
 
   if (inApp) {
     // The current document would also need to be given access for IPC to
     // recognize our permission (why)?
     permissions.push({
--- a/dom/browser-element/mochitest/browserElement_SetVisibleFrames.js
+++ b/dom/browser-element/mochitest/browserElement_SetVisibleFrames.js
@@ -16,17 +16,17 @@ browserElementTestHelpers.addPermission(
 
 var iframe;
 
 function runTest() {
   var principal = SpecialPowers.wrap(document).nodePrincipal;
   SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
                                                 originAttributes: {
                                                   appId: principal.appId,
-                                                  inBrowser: true
+                                                  inIsolatedMozBrowser: true
                                                 }});
 
   iframe = document.createElement('iframe');
   iframe.setAttribute('mozbrowser', 'true');
 
   // Our test involves three <iframe mozbrowser>'s, parent, child1, and child2.
   // child1 and child2 are contained inside parent.  child1 is visibile, and
   // child2 is not.
@@ -75,17 +75,17 @@ function finish() {
   // expected, but if we don't remove our listener, then we'll end up causing
   // the /next/ test to fail!
   iframe.removeEventListener('mozbrowsershowmodalprompt', checkMessage);
 
   var principal = SpecialPowers.wrap(document).nodePrincipal;
   SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
                                              originAttributes: {
                                                appId: principal.appId,
-                                               inBrowser: true
+                                               inIsolatedMozBrowser: true
                                              }});
   SimpleTest.finish();
 }
 
 var expectedMsg = null;
 var expectedMsgCallback = null;
 function expectMessage(msg, next) {
   expectedMsg = msg;
--- a/dom/browser-element/mochitest/browserElement_SetVisibleFrames2.js
+++ b/dom/browser-element/mochitest/browserElement_SetVisibleFrames2.js
@@ -10,17 +10,17 @@ SimpleTest.waitForExplicitFinish();
 browserElementTestHelpers.setEnabledPref(true);
 browserElementTestHelpers.addPermission();
 
 function runTest() {
   var principal = SpecialPowers.wrap(document).nodePrincipal;
   SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
                                                 originAttributes: {
                                                   appId: principal.appId,
-                                                  inBrowser: true
+                                                  inIsolatedMozBrowser: true
                                                 }});
 
   var iframe = document.createElement('iframe');
   iframe.setAttribute('mozbrowser', 'true');
 
   // We need remote = false here until bug 761935 is fixed; see
   // SetVisibleFrames.js for an explanation.
   iframe.remote = false;
@@ -56,15 +56,15 @@ function runTest() {
   document.body.appendChild(iframe);
 }
 
 function finish() {
   var principal = SpecialPowers.wrap(document).nodePrincipal;
   SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
                                              originAttributes: {
                                                appId: principal.appId,
-                                               inBrowser: true
+                                               inIsolatedMozBrowser: true
                                              }});
 
   SimpleTest.finish();
 }
 
 addEventListener('testready', runTest);
--- a/dom/browser-element/mochitest/priority/test_ExpectingSystemMessage2.html
+++ b/dom/browser-element/mochitest/priority/test_ExpectingSystemMessage2.html
@@ -20,25 +20,25 @@ browserElementTestHelpers.addPermission(
 browserElementTestHelpers.enableProcessPriorityManager();
 SpecialPowers.addPermission("embed-apps", true, document);
 
 // Give our origin permission to open browsers, and remove it when the test is complete.
 var principal = SpecialPowers.wrap(document).nodePrincipal;
 SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
                                               originAttributes: {
                                                 appId: principal.appId,
-                                                inBrowser: true
+                                                inIsolatedMozBrowser: true
                                               }});
 
 addEventListener('unload', function() {
   var principal = SpecialPowers.wrap(document).nodePrincipal;
   SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
                                              originAttributes: {
                                                appId: principal.appId,
-                                               inBrowser: true
+                                               inIsolatedMozBrowser: true
                                              }});
 });
 
 function runTest() {
   var iframe = document.createElement('iframe');
   iframe.setAttribute('mozbrowser', true);
   iframe.setAttribute('expecting-system-message', true);
   iframe.setAttribute('mozapp', 'http://example.org/manifest.webapp');
--- a/dom/browser-element/mochitest/priority/test_NestedFrames.html
+++ b/dom/browser-element/mochitest/priority/test_NestedFrames.html
@@ -19,25 +19,25 @@ browserElementTestHelpers.setEnabledPref
 browserElementTestHelpers.addPermission();
 browserElementTestHelpers.enableProcessPriorityManager();
 
 // Give our origin permission to open browsers, and remove it when the test is complete.
 var principal = SpecialPowers.wrap(document).nodePrincipal;
 SpecialPowers.addPermission("browser", true, {url: SpecialPowers.wrap(principal.URI).spec,
                                               originAttributes: {
                                                 appId: principal.appId,
-                                                inBrowser: true
+                                                inIsolatedMozBrowser: true
                                               }});
 
 addEventListener('unload', function() {
   var principal = SpecialPowers.wrap(document).nodePrincipal;
   SpecialPowers.removePermission("browser", {url: SpecialPowers.wrap(principal.URI).spec,
                                              originAttributes: {
                                                appId: principal.appId,
-                                               inBrowser: true
+                                               inIsolatedMozBrowser: true
                                              }});
 });
 
 function runTest() {
   // Set up the following hierarchy of frames:
   //
   //   <iframe mozbrowser remote=false src='file_NestedFramesOuter.html'>
   //     <iframe mozbrowser remote=true src='file_empty.html'>
--- a/dom/indexedDB/test/unit/test_defaultStorageUpgrade.js
+++ b/dom/indexedDB/test/unit/test_defaultStorageUpgrade.js
@@ -42,21 +42,21 @@ function testSteps()
 
     // This one lives in storage/default/file++++c++Users+joe+index.html
     { url: "file:///c:/Users/joe/index.html", dbName: "dbK", dbVersion: 1 },
 
     // This one lives in storage/permanent/chrome
     { dbName: "dbL", dbVersion: 1 },
 
     // This one lives in storage/default/1007+f+app+++system.gaiamobile.org
-    { appId: 1007, inMozBrowser: false, url: "app://system.gaiamobile.org",
+    { appId: 1007, inIsolatedMozBrowser: false, url: "app://system.gaiamobile.org",
       dbName: "dbM", dbVersion: 1 },
 
     // This one lives in storage/default/1007+t+https+++developer.cdn.mozilla.net
-    { appId: 1007, inMozBrowser: true, url: "https://developer.cdn.mozilla.net",
+    { appId: 1007, inIsolatedMozBrowser: true, url: "https://developer.cdn.mozilla.net",
       dbName: "dbN", dbVersion: 1 },
 
     // This one lives in storage/default/http+++127.0.0.1
     { url: "http://127.0.0.1", dbName: "dbO", dbVersion: 1 },
 
     // This one lives in storage/default/file++++
     { url: "file:///", dbName: "dbP", dbVersion: 1 },
 
@@ -88,17 +88,17 @@ function testSteps()
 
   function openDatabase(params) {
     let request;
     if ("url" in params) {
       let uri = ios.newURI(params.url, null, null);
       let principal =
         ssm.createCodebasePrincipal(uri,
                                     {appId: params.appId || ssm.NO_APPID,
-                                     inBrowser: params.inMozBrowser});
+                                     inIsolatedMozBrowser: params.inIsolatedMozBrowser});
       if ("dbVersion" in params) {
         request = indexedDB.openForPrincipal(principal, params.dbName,
                                              params.dbVersion);
       } else {
         request = indexedDB.openForPrincipal(principal, params.dbName,
                                              params.dbOptions);
       }
     } else {
--- a/dom/inputmethod/mochitest/test_bug1043828.html
+++ b/dom/inputmethod/mochitest/test_bug1043828.html
@@ -87,17 +87,17 @@ function runTest() {
     let imeUrl = basePath + '/file_blank.html';
 
     SpecialPowers.pushPermissions([{
       type: 'input',
       allow: true,
       context: {
         url: imeUrl,
         originAttributes: {
-          inBrowser: true
+          inIsolatedMozBrowser: true
         }
       }
     }], function() {
       keyboardA.src = imeUrl;
       keyboardB.src = imeUrl;
 
       var handler = {
         handleEvent: function(){
--- a/dom/inputmethod/mochitest/test_bug944397.html
+++ b/dom/inputmethod/mochitest/test_bug944397.html
@@ -74,17 +74,17 @@ function runTest() {
     let imeUrl = basePath + '/file_inputmethod.html#data';
 
     SpecialPowers.pushPermissions([{
       type: 'input',
       allow: true,
       context: {
         url: imeUrl,
         originAttributes: {
-          inBrowser: true
+          inIsolatedMozBrowser: true
         }
       }
     }], function() {
       // STEP 2c: Tell Gecko to use this iframe as its keyboard app
       let req = keyboard.setInputMethodActive(true);
 
       req.onsuccess = function() {
         ok(true, 'setInputMethodActive succeeded.');
--- a/dom/inputmethod/mochitest/test_focus_blur_manage_events.html
+++ b/dom/inputmethod/mochitest/test_focus_blur_manage_events.html
@@ -137,17 +137,17 @@ function setupInputAppFrame() {
     document.body.appendChild(inputAppFrame);
 
     SpecialPowers.pushPermissions([{
       type: 'input',
       allow: true,
       context: {
         url: imeUrl,
         originAttributes: {
-          inBrowser: true
+          inIsolatedMozBrowser: true
         }
       }
     }], function() {
       let mm = SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
       inputAppFrame.addEventListener('mozbrowserloadend', function() {
         mm.addMessageListener('text:appEvent', function(msg) {
           ok(false, 'Input app should not receive ' + msg.data.type + ' event.');
         });
--- a/dom/inputmethod/mochitest/test_input_registry_events.html
+++ b/dom/inputmethod/mochitest/test_input_registry_events.html
@@ -66,17 +66,17 @@ function setupInputAppFrame() {
     document.body.appendChild(inputAppFrame);
 
     SpecialPowers.pushPermissions([{
       type: 'input',
       allow: true,
       context: {
         url: imeUrl,
         originAttributes: {
-          inBrowser: true
+          inIsolatedMozBrowser: true
         }
       }
     }], function() {
       let mm = appFrameMM =
         SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
 
       inputAppFrame.addEventListener('mozbrowserloadend', function() {
         mm.addMessageListener('test:appEvent', function(msg) {
--- a/dom/inputmethod/mochitest/test_simple_manage_events.html
+++ b/dom/inputmethod/mochitest/test_simple_manage_events.html
@@ -99,17 +99,17 @@ function setupInputAppFrame() {
     document.body.appendChild(inputAppFrame);
 
     SpecialPowers.pushPermissions([{
       type: 'input',
       allow: true,
       context: {
         url: imeUrl,
         originAttributes: {
-          inBrowser: true
+          inIsolatedMozBrowser: true
         }
       }
     }], function() {
       let mm = appFrameMM =
         SpecialPowers.getBrowserFrameMessageManager(inputAppFrame);
 
       inputAppFrame.addEventListener('mozbrowserloadend', function() {
         mm.addMessageListener('test:appEvent', function(msg) {
--- a/dom/ipc/TabContext.cpp
+++ b/dom/ipc/TabContext.cpp
@@ -25,17 +25,17 @@ TabContext::TabContext()
   , mContainingAppId(NO_APP_ID)
   , mOriginAttributes()
 {
 }
 
 bool
 TabContext::IsBrowserElement() const
 {
-  return mOriginAttributes.mInBrowser;
+  return mOriginAttributes.mInIsolatedMozBrowser;
 }
 
 bool
 TabContext::IsBrowserOrApp() const
 {
   return HasOwnApp() || IsBrowserElement();
 }
 
@@ -305,18 +305,18 @@ MaybeInvalidTabContext::MaybeInvalidTabC
       break;
     }
     default: {
       MOZ_CRASH();
     }
   }
 
   nsCOMPtr<mozIApplication> ownApp;
-  if (!originAttributes.mInBrowser) {
-    // mAppId corresponds to OwnOrContainingAppId; if mInBrowser is
+  if (!originAttributes.mInIsolatedMozBrowser) {
+    // mAppId corresponds to OwnOrContainingAppId; if mInIsolatedMozBrowser is
     // false then it's ownApp otherwise it's containingApp
     ownApp = GetAppForId(originAttributes.mAppId);
     if ((ownApp == nullptr) != (originAttributes.mAppId == NO_APP_ID)) {
       mInvalidReason = "Got an ownAppId that didn't correspond to an app.";
       return;
     }
   }
 
--- a/dom/messages/SystemMessageManager.js
+++ b/dom/messages/SystemMessageManager.js
@@ -327,17 +327,17 @@ SystemMessageManager.prototype = {
   // nsIDOMGlobalPropertyInitializer implementation.
   init: function(aWindow) {
     debug("init");
     this.initDOMRequestHelper(aWindow,
                               ["SystemMessageManager:Message",
                                "SystemMessageManager:GetPendingMessages:Return"]);
 
     let principal = aWindow.document.nodePrincipal;
-    this._isInBrowserElement = principal.isInBrowserElement;
+    this._isInBrowserElement = principal.isInIsolatedMozBrowserElement;
     this._pageURL = principal.URI.spec;
 
     let appsService = Cc["@mozilla.org/AppsService;1"]
                         .getService(Ci.nsIAppsService);
     this._manifestURL = appsService.getManifestURLByLocalId(principal.appId);
 
     // Two cases are valid to register the manifest URL for the current process:
     // 1. This is asked by a child process (parent process must be ready).
--- a/dom/payment/Payment.jsm
+++ b/dom/payment/Payment.jsm
@@ -231,17 +231,17 @@ var PaymentManager =  {
         };
 
 #ifdef MOZ_B2G
         // Let this payment provider access the firefox-accounts API when
         // it's loaded in the trusted UI.
         if (systemAppId != Ci.nsIScriptSecurityManager.NO_APP_ID) {
           this.LOG("Granting firefox-accounts permission to " + provider.uri);
           let uri = Services.io.newURI(provider.uri, null, null);
-          let attrs = {appId: systemAppId, inBrowser: true};
+          let attrs = {appId: systemAppId, inIsolatedMozBrowser: true};
           let principal =
             Services.scriptSecurityManager.createCodebasePrincipal(uri, attrs);
 
           Services.perms.addFromPrincipal(principal, "firefox-accounts",
                                           Ci.nsIPermissionManager.ALLOW_ACTION,
                                           Ci.nsIPermissionManager.EXPIRE_SESSION);
         }
 #endif
--- a/dom/permission/PermissionSettings.js
+++ b/dom/permission/PermissionSettings.js
@@ -37,17 +37,17 @@ PermissionSettings.prototype = {
   get: function get(aPermName, aManifestURL, aOrigin, aBrowserFlag) {
     // TODO: Bug 1196644 - Add signPKg parameter into PermissionSettings.js
     debug("Get called with: " + aPermName + ", " + aManifestURL + ", " + aOrigin + ", " + aBrowserFlag);
     let uri = Services.io.newURI(aOrigin, null, null);
     let appID = appsService.getAppLocalIdByManifestURL(aManifestURL);
     let principal =
       Services.scriptSecurityManager.createCodebasePrincipal(uri,
                                                              {appId: appID,
-                                                              inBrowser: aBrowserFlag});
+                                                              inIsolatedMozBrowser: aBrowserFlag});
     let result = Services.perms.testExactPermanentPermission(principal, aPermName);
 
     switch (result)
     {
       case Ci.nsIPermissionManager.UNKNOWN_ACTION:
         return "unknown";
       case Ci.nsIPermissionManager.ALLOW_ACTION:
         return "allow";
@@ -63,17 +63,17 @@ PermissionSettings.prototype = {
 
   isExplicit: function isExplicit(aPermName, aManifestURL, aOrigin,
                                   aBrowserFlag) {
     // TODO: Bug 1196644 - Add signPKg parameter into PermissionSettings.js
     debug("isExplicit: " + aPermName + ", " + aManifestURL + ", " + aOrigin);
     let uri = Services.io.newURI(aOrigin, null, null);
     let app = appsService.getAppByManifestURL(aManifestURL);
     let principal = Services.scriptSecurityManager
-      .createCodebasePrincipal(uri, {appId: app.localId, inBrowser: aBrowserFlag});
+      .createCodebasePrincipal(uri, {appId: app.localId, inIsolatedMozBrowser: aBrowserFlag});
 
     return isExplicitInPermissionsTable(aPermName,
                                         principal.appStatus);
   },
 
   set: function set(aPermName, aPermValue, aManifestURL, aOrigin,
                     aBrowserFlag) {
     debug("Set called with: " + aPermName + ", " + aManifestURL + ", " +
@@ -104,17 +104,17 @@ PermissionSettings.prototype = {
 
   remove: function remove(aPermName, aManifestURL, aOrigin) {
     // TODO: Bug 1196644 - Add signPKg parameter into PermissionSettings.js
     let uri = Services.io.newURI(aOrigin, null, null);
     let appID = appsService.getAppLocalIdByManifestURL(aManifestURL);
     let principal =
       Services.scriptSecurityManager.createCodebasePrincipal(uri,
                                                              {appId: appID,
-                                                              inBrowser: true});
+                                                              inIsolatedMozBrowser: true});
 
     if (principal.appStatus !== Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
       let errorMsg = "PermissionSettings.js: '" + aOrigin + "'" +
                      " is installed or permission is implicit, cannot remove '" +
                      aPermName + "'.";
       Cu.reportError(errorMsg);
       throw new Components.Exception(errorMsg);
     }
--- a/dom/permission/PermissionSettings.jsm
+++ b/dom/permission/PermissionSettings.jsm
@@ -77,17 +77,17 @@ this.PermissionSettingsModule = {
         Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(aData.origin);
       app = {localId: principal.appId};
     } else {
       app = appsService.getAppByManifestURL(aData.manifestURL);
       let uri = Services.io.newURI(aData.origin, null, null);
       principal =
         Services.scriptSecurityManager.createCodebasePrincipal(uri,
                                                                {appId: app.localId,
-                                                                inBrowser: aData.browserFlag});
+                                                                inIsolatedMozBrowser: aData.browserFlag});
     }
 
     let action;
     switch (aData.value)
     {
       case "unknown":
         action = Ci.nsIPermissionManager.UNKNOWN_ACTION;
         break;
@@ -126,17 +126,17 @@ this.PermissionSettingsModule = {
       principal =
         Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(aOrigin);
     } else {
       let uri = Services.io.newURI(aOrigin, null, null);
       let appID = appsService.getAppLocalIdByManifestURL(aManifestURL);
       principal =
         Services.scriptSecurityManager.createCodebasePrincipal(uri,
                                                                {appId: appID,
-                                                                inBrowser: aBrowserFlag});
+                                                                inIsolatedMozBrowser: aBrowserFlag});
     }
     let result = Services.perms.testExactPermissionFromPrincipal(principal, aPermName);
     switch (result)
     {
       case Ci.nsIPermissionManager.UNKNOWN_ACTION:
         return "unknown";
       case Ci.nsIPermissionManager.ALLOW_ACTION:
         return "allow";
--- a/dom/push/test/xpcshell/head.js
+++ b/dom/push/test/xpcshell/head.js
@@ -502,16 +502,16 @@ var tearDownServiceInParent = Task.async
     originAttributes: '',
   });
   ok(record.pushEndpoint.startsWith('https://example.org/push'),
     'Wrong push endpoint in subscription record');
 
   record = yield db.getByIdentifiers({
     scope: 'https://example.net/scope/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: 1, inBrowser: true }),
+      { appId: 1, inIsolatedMozBrowser: true }),
   });
   ok(record.pushEndpoint.startsWith('https://example.org/push'),
     'Wrong push endpoint in app record');
 
   record = yield db.getByKeyID('3a414737-2fd0-44c0-af05-7efc172475fc');
   ok(!record, 'Unsubscribed record should not exist');
 });
--- a/dom/push/test/xpcshell/test_clear_origin_data.js
+++ b/dom/push/test/xpcshell/test_clear_origin_data.js
@@ -46,41 +46,41 @@ function run_test() {
 
 add_task(function* test_webapps_cleardata() {
   let db = PushServiceWebSocket.newPushDB();
   do_register_cleanup(() => {return db.drop().then(_ => db.close());});
 
   let testRecords = [{
     scope: 'https://example.org/1',
     originAttributes: { appId: 1 },
-    clearIf: { appId: 1, inBrowser: false },
+    clearIf: { appId: 1, inIsolatedMozBrowser: false },
   }, {
     scope: 'https://example.org/1',
-    originAttributes: { appId: 1, inBrowser: true },
+    originAttributes: { appId: 1, inIsolatedMozBrowser: true },
     clearIf: { appId: 1 },
   }, {
     scope: 'https://example.org/1',
-    originAttributes: { appId: 2, inBrowser: true },
-    clearIf: { appId: 2, inBrowser: true },
+    originAttributes: { appId: 2, inIsolatedMozBrowser: true },
+    clearIf: { appId: 2, inIsolatedMozBrowser: true },
   }, {
     scope: 'https://example.org/2',
     originAttributes: { appId: 1 },
-    clearIf: { appId: 1, inBrowser: false },
+    clearIf: { appId: 1, inIsolatedMozBrowser: false },
   }, {
     scope: 'https://example.org/2',
-    originAttributes: { appId: 2, inBrowser: true },
-    clearIf: { appId: 2, inBrowser: true },
+    originAttributes: { appId: 2, inIsolatedMozBrowser: true },
+    clearIf: { appId: 2, inIsolatedMozBrowser: true },
   }, {
     scope: 'https://example.org/3',
-    originAttributes: { appId: 3, inBrowser: true },
-    clearIf: { inBrowser: true },
+    originAttributes: { appId: 3, inIsolatedMozBrowser: true },
+    clearIf: { inIsolatedMozBrowser: true },
   }, {
     scope: 'https://example.org/3',
-    originAttributes: { appId: 4, inBrowser: true },
-    clearIf: { inBrowser: true },
+    originAttributes: { appId: 4, inIsolatedMozBrowser: true },
+    clearIf: { inIsolatedMozBrowser: true },
   }];
 
   let unregisterDone;
   let unregisterPromise = new Promise(resolve =>
     unregisterDone = after(testRecords.length, resolve));
 
   PushService.init({
     serverURI: "wss://push.example.org",
@@ -118,25 +118,25 @@ add_task(function* test_webapps_cleardat
     PushService.register({
       scope: test.scope,
       originAttributes: ChromeUtils.originAttributesToSuffix(
         test.originAttributes),
     })
   ));
 
   // Removes records for all scopes with the same app ID. Excludes records
-  // where `inBrowser` is true.
-  yield clearForPattern(testRecords, { appId: 1, inBrowser: false });
+  // where `inIsolatedMozBrowser` is true.
+  yield clearForPattern(testRecords, { appId: 1, inIsolatedMozBrowser: false });
 
-  // Removes the remaining record for app ID 1, where `inBrowser` is true.
+  // Removes the remaining record for app ID 1, where `inIsolatedMozBrowser` is true.
   yield clearForPattern(testRecords, { appId: 1 });
 
   // Removes all records for all scopes with the same app ID, where
-  // `inBrowser` is true.
-  yield clearForPattern(testRecords, { appId: 2, inBrowser: true });
+  // `inIsolatedMozBrowser` is true.
+  yield clearForPattern(testRecords, { appId: 2, inIsolatedMozBrowser: true });
 
-  // Removes all records where `inBrowser` is true.
-  yield clearForPattern(testRecords, { inBrowser: true });
+  // Removes all records where `inIsolatedMozBrowser` is true.
+  yield clearForPattern(testRecords, { inIsolatedMozBrowser: true });
 
   equal(testRecords.length, 0, 'Should remove all test records');
   yield waitForPromise(unregisterPromise, DEFAULT_TIMEOUT,
     'Timed out waiting for unregister');
 });
--- a/dom/push/test/xpcshell/test_notification_http2.js
+++ b/dom/push/test/xpcshell/test_notification_http2.js
@@ -75,17 +75,17 @@ add_task(function* test_pushNotification
       d: '1jUPhzVsRkzV0vIzwL4ZEsOlKdNOWm7TmaTfzitJkgM',
       ext: true,
       key_ops: ["deriveBits"],
       kty: "EC",
       x: '8J3iA1CSPBFqHrUul0At3NkosudTlQDAPO1Dn-HRCxM',
       y: '26jk0IFbqcK6-JxhHAm-rsHEwy0CyVJjtnfOcqc1tgA'
     },
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
     systemRecord: true,
   }, {
     subscriptionUri: serverURL + '/pushNotifications/subscription2',
     pushEndpoint: serverURL + '/pushEndpoint2',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpoint2',
     scope: 'https://example.com/page/2',
     p256dhPublicKey: 'BPnWyUo7yMnuMlyKtERuLfWE8a09dtdjHSW2lpC9_BqR5TZ1rK8Ldih6ljyxVwnBA-nygQHGRpEmu1jV5K8437E',
@@ -94,17 +94,17 @@ add_task(function* test_pushNotification
       d: 'lFm4nPsUKYgNGBJb5nXXKxl8bspCSp0bAhCYxbveqT4',
       ext: true,
       key_ops: ["deriveBits"],
       kty: 'EC',
       x: '-dbJSjvIye4yXIq0RG4t9YTxrT1212MdJbaWkL38GpE',
       y: '5TZ1rK8Ldih6ljyxVwnBA-nygQHGRpEmu1jV5K8437E'
     },
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
     systemRecord: true,
   }, {
     subscriptionUri: serverURL + '/pushNotifications/subscription3',
     pushEndpoint: serverURL + '/pushEndpoint3',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpoint3',
     scope: 'https://example.com/page/3',
     p256dhPublicKey: 'BDhUHITSeVrWYybFnb7ylVTCDDLPdQWMpf8gXhcWwvaaJa6n3YH8TOcH8narDF6t8mKVvg2ioLW-8MH5O4dzGcI',
@@ -113,17 +113,17 @@ add_task(function* test_pushNotification
       d: 'Q1_SE1NySTYzjbqgWwPgrYh7XRg3adqZLkQPsy319G8',
       ext: true,
       key_ops: ["deriveBits"],
       kty: 'EC',
       x: 'OFQchNJ5WtZjJsWdvvKVVMIMMs91BYyl_yBeFxbC9po',
       y: 'Ja6n3YH8TOcH8narDF6t8mKVvg2ioLW-8MH5O4dzGcI'
     },
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
     systemRecord: true,
   }];
 
   for (let record of records) {
     yield db.put(record);
   }
 
--- a/dom/push/test/xpcshell/test_reconnect_retry.js
+++ b/dom/push/test/xpcshell/test_reconnect_retry.js
@@ -53,22 +53,22 @@ add_task(function* test_reconnect_retry(
         }
       });
     }
   });
 
   let registration = yield PushService.register({
     scope: 'https://example.com/page/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   let retryEndpoint = 'https://example.org/push/' + channelID;
   equal(registration.endpoint, retryEndpoint, 'Wrong endpoint for retried request');
 
   registration = yield PushService.register({
     scope: 'https://example.com/page/2',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   notEqual(registration.endpoint, retryEndpoint, 'Wrong endpoint for new request')
 
   equal(registers, 3, 'Wrong registration count');
 });
--- a/dom/push/test/xpcshell/test_register_5xxCode_http2.js
+++ b/dom/push/test/xpcshell/test_register_5xxCode_http2.js
@@ -76,17 +76,17 @@ add_task(function* test1() {
 
   PushService.init({
     serverURI: serverURL + "/subscribe5xxCode",
     db
   });
 
   let originAttributes = ChromeUtils.originAttributesToSuffix({
     appId: Ci.nsIScriptSecurityManager.NO_APP_ID,
-    inBrowser: false,
+    inIsolatedMozBrowser: false,
   });
   let newRecord = yield PushService.register({
     scope: 'https://example.com/retry5xxCode',
     originAttributes: originAttributes,
   });
 
   var subscriptionUri = serverURL + '/subscription';
   var pushEndpoint = serverURL + '/pushEndpoint';
--- a/dom/push/test/xpcshell/test_register_case.js
+++ b/dom/push/test/xpcshell/test_register_case.js
@@ -42,17 +42,17 @@ add_task(function* test_register_case() 
       });
     }
   });
 
   let newRecord = yield waitForPromise(
     PushService.register({
       scope: 'https://example.net/case',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     DEFAULT_TIMEOUT,
     'Mixed-case register response timed out'
   );
   equal(newRecord.endpoint, 'https://example.com/update/case',
     'Wrong push endpoint in registration record');
 
   let record = yield db.getByPushEndpoint('https://example.com/update/case');
--- a/dom/push/test/xpcshell/test_register_error_http2.js
+++ b/dom/push/test/xpcshell/test_register_error_http2.js
@@ -40,17 +40,17 @@ add_task(function* test_pushSubscription
     serverURI: serverURL + "/pushSubscriptionNoConnection/subscribe",
     db
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-response',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for not being able to establish connecion.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, "Should not store records when connection couldn't be established.");
   PushService.uninit();
 });
@@ -80,17 +80,17 @@ add_task(function* test_pushSubscription
     serverURI: serverURL + "/pushSubscriptionMissingLocation/subscribe",
     db
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-response',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for the missing location header.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when the location header is missing.');
   PushService.uninit();
 });
@@ -106,17 +106,17 @@ add_task(function* test_pushSubscription
     serverURI: serverURL + "/pushSubscriptionMissingLink/subscribe",
     db
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-response',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for the missing link header.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when a link header is missing.');
   PushService.uninit();
 });
@@ -132,17 +132,17 @@ add_task(function* test_pushSubscription
     serverURI: serverURL + "/pushSubscriptionMissingLink1/subscribe",
     db
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-response',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for the missing push endpoint.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when the push endpoint is missing.');
   PushService.uninit();
 });
@@ -158,17 +158,17 @@ add_task(function* test_pushSubscription
     serverURI: serverURL + "/pushSubscriptionLocationBogus/subscribe",
     db
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-response',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for the bogus location'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when location header is bogus.');
   PushService.uninit();
 });
@@ -184,17 +184,17 @@ add_task(function* test_pushSubscription
     serverURI: serverURL + "/pushSubscriptionNot201Code/subscribe",
     db
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-response',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for not 201 responce code.'
   );
 
   let record = yield db.getAllKeyIDs();
   ok(record.length === 0, 'Should not store records when respons code is not 201.');
 });
 
--- a/dom/push/test/xpcshell/test_register_invalid_channel.js
+++ b/dom/push/test/xpcshell/test_register_invalid_channel.js
@@ -43,16 +43,16 @@ add_task(function* test_register_invalid
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.com/invalid-channel',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for invalid channel ID'
   );
 
   let record = yield db.getByKeyID(channelID);
   ok(!record, 'Should not store records for error responses');
 });
--- a/dom/push/test/xpcshell/test_register_invalid_endpoint.js
+++ b/dom/push/test/xpcshell/test_register_invalid_endpoint.js
@@ -44,16 +44,16 @@ add_task(function* test_register_invalid
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-endpoint',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for invalid endpoint'
   );
 
   let record = yield db.getByKeyID(channelID);
   ok(!record, 'Should not store records with invalid endpoints');
 });
--- a/dom/push/test/xpcshell/test_register_invalid_json.js
+++ b/dom/push/test/xpcshell/test_register_invalid_json.js
@@ -44,17 +44,17 @@ add_task(function* test_register_invalid
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/invalid-json',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for invalid JSON response'
   );
 
   yield waitForPromise(helloPromise, DEFAULT_TIMEOUT,
     'Reconnect after invalid JSON response timed out');
   equal(registers, 1, 'Wrong register count');
 });
--- a/dom/push/test/xpcshell/test_register_no_id.js
+++ b/dom/push/test/xpcshell/test_register_no_id.js
@@ -48,17 +48,17 @@ add_task(function* test_register_no_id()
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.com/incomplete',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for incomplete register response'
   );
 
   yield waitForPromise(helloPromise, DEFAULT_TIMEOUT,
     'Reconnect after incomplete register response timed out');
   equal(registers, 1, 'Wrong register count');
 });
--- a/dom/push/test/xpcshell/test_register_request_queue.js
+++ b/dom/push/test/xpcshell/test_register_request_queue.js
@@ -40,22 +40,22 @@ add_task(function* test_register_request
         }
       });
     }
   });
 
   let firstRegister = PushService.register({
     scope: 'https://example.com/page/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   let secondRegister = PushService.register({
     scope: 'https://example.com/page/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
 
   yield waitForPromise(Promise.all([
     rejects(firstRegister, 'Should time out the first request'),
     rejects(secondRegister, 'Should time out the second request')
   ]), DEFAULT_TIMEOUT, 'Queued requests did not time out');
 
   yield waitForPromise(helloPromise, DEFAULT_TIMEOUT,
--- a/dom/push/test/xpcshell/test_register_rollback.js
+++ b/dom/push/test/xpcshell/test_register_rollback.js
@@ -70,17 +70,17 @@ add_task(function* test_register_rollbac
     }
   });
 
   // Should return a rejected promise if storage fails.
   yield rejects(
     PushService.register({
       scope: 'https://example.com/storage-error',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for unregister database failure'
   );
 
   // Should send an out-of-band unregister request.
   yield waitForPromise(unregisterPromise, DEFAULT_TIMEOUT,
     'Unregister request timed out');
   equal(handshakes, 1, 'Wrong handshake count');
--- a/dom/push/test/xpcshell/test_register_success.js
+++ b/dom/push/test/xpcshell/test_register_success.js
@@ -51,17 +51,17 @@ add_task(function* test_register_success
         }
       });
     }
   });
 
   let newRecord = yield PushService.register({
     scope: 'https://example.org/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   equal(newRecord.endpoint, 'https://example.com/update/1',
     'Wrong push endpoint in registration record');
 
   let record = yield db.getByKeyID(channelID);
   equal(record.channelID, channelID,
     'Wrong channel ID in database record');
   equal(record.pushEndpoint, 'https://example.com/update/1',
--- a/dom/push/test/xpcshell/test_register_success_http2.js
+++ b/dom/push/test/xpcshell/test_register_success_http2.js
@@ -60,17 +60,17 @@ add_task(function* test_pushSubscription
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionSuccess/subscribe",
     db
   });
 
   let newRecord = yield PushService.register({
     scope: 'https://example.org/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
 
   var subscriptionUri = serverURL + '/pushSubscriptionSuccesss';
   var pushEndpoint = serverURL + '/pushEndpointSuccess';
   var pushReceiptEndpoint = serverURL + '/receiptPushEndpointSuccess';
   equal(newRecord.endpoint, pushEndpoint,
     'Wrong push endpoint in registration record');
 
@@ -95,17 +95,17 @@ add_task(function* test_pushSubscription
   PushService.init({
     serverURI: serverURL + "/pushSubscriptionMissingLink2/subscribe",
     db
   });
 
   let newRecord = yield PushService.register({
     scope: 'https://example.org/no_receiptEndpoint',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
 
   var subscriptionUri = serverURL + '/subscriptionMissingLink2';
   var pushEndpoint = serverURL + '/pushEndpointMissingLink2';
   var pushReceiptEndpoint = '';
   equal(newRecord.endpoint, pushEndpoint,
     'Wrong push endpoint in registration record');
 
--- a/dom/push/test/xpcshell/test_register_timeout.js
+++ b/dom/push/test/xpcshell/test_register_timeout.js
@@ -70,17 +70,17 @@ add_task(function* test_register_timeout
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.net/page/timeout',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for request timeout'
   );
 
   let record = yield db.getByKeyID(channelID);
   ok(!record, 'Should not store records for timed-out responses');
 
   yield waitForPromise(
--- a/dom/push/test/xpcshell/test_register_wrong_id.js
+++ b/dom/push/test/xpcshell/test_register_wrong_id.js
@@ -54,17 +54,17 @@ add_task(function* test_register_wrong_i
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.com/mismatched',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for mismatched register reply'
   );
 
   yield waitForPromise(helloPromise, DEFAULT_TIMEOUT,
     'Reconnect after mismatched register reply timed out');
   equal(registers, 1, 'Wrong register count');
 });
--- a/dom/push/test/xpcshell/test_register_wrong_type.js
+++ b/dom/push/test/xpcshell/test_register_wrong_type.js
@@ -48,17 +48,17 @@ add_task(function* test_register_wrong_t
       });
     }
   });
 
   yield rejects(
     PushService.register({
       scope: 'https://example.com/mistyped',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for non-string channel ID'
   );
 
   yield waitForPromise(helloPromise, DEFAULT_TIMEOUT,
     'Reconnect after sending non-string channel ID timed out');
   equal(registers, 1, 'Wrong register count');
 });
--- a/dom/push/test/xpcshell/test_registration_error.js
+++ b/dom/push/test/xpcshell/test_registration_error.js
@@ -29,16 +29,16 @@ add_task(function* test_registrations_er
       return new MockWebSocket(uri);
     }
   });
 
   yield rejects(
     PushService.registration({
       scope: 'https://example.net/1',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     function(error) {
       return error == 'Database error';
     },
     'Wrong message'
   );
 });
--- a/dom/push/test/xpcshell/test_registration_error_http2.js
+++ b/dom/push/test/xpcshell/test_registration_error_http2.js
@@ -23,16 +23,16 @@ add_task(function* test_registrations_er
       }
     }),
   });
 
   yield rejects(
     PushService.registration({
       scope: 'https://example.net/1',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     function(error) {
       return error == 'Database error';
     },
     'Wrong message'
   );
 });
--- a/dom/push/test/xpcshell/test_registration_none.js
+++ b/dom/push/test/xpcshell/test_registration_none.js
@@ -21,12 +21,12 @@ add_task(function* test_registration_non
     makeWebSocket(uri) {
       return new MockWebSocket(uri);
     }
   });
 
   let registration = yield PushService.registration({
     scope: 'https://example.net/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   ok(!registration, 'Should not open a connection without registration');
 });
--- a/dom/push/test/xpcshell/test_registration_success.js
+++ b/dom/push/test/xpcshell/test_registration_success.js
@@ -31,17 +31,17 @@ add_task(function* test_registration_suc
       { appId: 42 }),
     version: 10,
     quota: Infinity,
   }, {
     channelID: 'b1cf38c9-6836-4d29-8a30-a3e98d59b728',
     pushEndpoint: 'https://example.org/update/different-manifest',
     scope: 'https://example.org/c',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: 42, inBrowser: true }),
+      { appId: 42, inIsolatedMozBrowser: true }),
     version: 15,
     quota: Infinity,
   }];
   for (let record of records) {
     yield db.put(record);
   }
 
   let handshakeDone;
--- a/dom/push/test/xpcshell/test_registration_success_http2.js
+++ b/dom/push/test/xpcshell/test_registration_success_http2.js
@@ -41,48 +41,48 @@ add_task(function* test_pushNotification
   var serverURL = "https://localhost:" + serverPort;
 
   let records = [{
     subscriptionUri: serverURL + '/subscriptionA',
     pushEndpoint: serverURL + '/pushEndpointA',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpointA',
     scope: 'https://example.net/a',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
   }, {
     subscriptionUri: serverURL + '/subscriptionB',
     pushEndpoint: serverURL + '/pushEndpointB',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpointB',
     scope: 'https://example.net/b',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
   }, {
     subscriptionUri: serverURL + '/subscriptionC',
     pushEndpoint: serverURL + '/pushEndpointC',
     pushReceiptEndpoint: serverURL + '/pushReceiptEndpointC',
     scope: 'https://example.net/c',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
   }];
 
   for (let record of records) {
     yield db.put(record);
   }
 
   PushService.init({
     serverURI: serverURL,
     db
   });
 
   let registration = yield PushService.registration({
     scope: 'https://example.net/a',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   equal(
     registration.endpoint,
     serverURL + '/pushEndpointA',
     'Wrong push endpoint for scope'
   );
 });
--- a/dom/push/test/xpcshell/test_unregister_empty_scope.js
+++ b/dom/push/test/xpcshell/test_unregister_empty_scope.js
@@ -27,13 +27,13 @@ add_task(function* test_unregister_empty
       });
     }
   });
 
   yield rejects(
     PushService.unregister({
       scope: '',
       originAttributes: ChromeUtils.originAttributesToSuffix(
-        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+        { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     }),
     'Expected error for empty endpoint'
   );
 });
--- a/dom/push/test/xpcshell/test_unregister_invalid_json.js
+++ b/dom/push/test/xpcshell/test_unregister_invalid_json.js
@@ -70,17 +70,17 @@ add_task(function* test_unregister_inval
   });
   let record = yield db.getByKeyID(
     '87902e90-c57e-4d18-8354-013f4a556559');
   ok(!record, 'Failed to delete unregistered record');
 
   yield PushService.unregister({
     scope: 'https://example.net/page/1',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   record = yield db.getByKeyID(
     '057caa8f-9b99-47ff-891c-adad18ce603e');
   ok(!record,
     'Failed to delete unregistered record after receiving invalid JSON');
 
   yield waitForPromise(unregisterPromise, DEFAULT_TIMEOUT,
     'Timed out waiting for unregister');
--- a/dom/push/test/xpcshell/test_unregister_not_found.js
+++ b/dom/push/test/xpcshell/test_unregister_not_found.js
@@ -26,12 +26,12 @@ add_task(function* test_unregister_not_f
         }
       });
     }
   });
 
   let result = yield PushService.unregister({
     scope: 'https://example.net/nonexistent',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   ok(result === false, "unregister should resolve with false for nonexistent scope");
 });
--- a/dom/push/test/xpcshell/test_unregister_success_http2.js
+++ b/dom/push/test/xpcshell/test_unregister_success_http2.js
@@ -61,29 +61,29 @@ add_task(function* test_pushUnsubscripti
   var serverURL = "https://localhost:" + serverPort;
 
   yield db.put({
     subscriptionUri: serverURL + '/subscriptionUnsubscriptionSuccess',
     pushEndpoint: serverURL + '/pushEndpointUnsubscriptionSuccess',
     pushReceiptEndpoint: serverURL + '/receiptPushEndpointUnsubscriptionSuccess',
     scope: 'https://example.com/page/unregister-success',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
     quota: Infinity,
   });
 
   PushService.init({
     serverURI: serverURL,
     db
   });
 
   yield PushService.unregister({
     scope: 'https://example.com/page/unregister-success',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   let record = yield db.getByKeyID(serverURL + '/subscriptionUnsubscriptionSuccess');
   ok(!record, 'Unregister did not remove record');
 
 });
 
 add_task(function* test_complete() {
   prefs.setBoolPref("network.http.spdy.enforce-tls-profile", tlsProfile);
--- a/dom/push/test/xpcshell/test_updateRecordNoEncryptionKeys_ws.js
+++ b/dom/push/test/xpcshell/test_updateRecordNoEncryptionKeys_ws.js
@@ -66,17 +66,17 @@ add_task(function* test_with_data_enable
         }
       });
     },
   });
 
   let newRecord = yield PushService.register({
     scope: 'https://example.com/page/3',
     originAttributes: ChromeUtils.originAttributesToSuffix(
-      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inBrowser: false }),
+      { appId: Ci.nsIScriptSecurityManager.NO_APP_ID, inIsolatedMozBrowser: false }),
   });
   ok(newRecord.p256dhKey, 'Should generate public keys for new records');
 
   let record = yield db.getByKeyID('eb18f12a-cc42-4f14-accb-3bfc1227f1aa');
   ok(record.p256dhPublicKey, 'Should add public key to partial record');
   ok(record.p256dhPrivateKey, 'Should add private key to partial record');
 
   record = yield db.getByKeyID('0d8886b9-8da1-4778-8f5d-1cf93a877ed6');
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -1350,29 +1350,29 @@ class MOZ_STACK_CLASS OriginParser final
   nsCString mSchema;
   nsCString mHost;
   Nullable<uint32_t> mPort;
   nsTArray<nsCString> mPathnameComponents;
   nsCString mHandledTokens;
 
   SchemaType mSchemaType;
   State mState;
-  bool mInMozBrowser;
+  bool mInIsolatedMozBrowser;
   bool mMaybeDriveLetter;
   bool mError;
 
 public:
   explicit OriginParser(const nsACString& aOrigin)
     : mOrigin(aOrigin)
     , mTokenizer(aOrigin, '+')
     , mAppId(kNoAppId)
     , mPort()
     , mSchemaType(eNone)
     , mState(eExpectingAppIdOrSchema)
-    , mInMozBrowser(false)
+    , mInIsolatedMozBrowser(false)
     , mMaybeDriveLetter(false)
     , mError(false)
   { }
 
   static bool
   ParseOrigin(const nsACString& aOrigin,
               nsCString& aSpec,
               PrincipalOriginAttributes* aAttrs);
@@ -5708,17 +5708,17 @@ OriginClearOp::DoInitOnMainThread()
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   const mozilla::PrincipalOriginAttributes& attrs =
     mozilla::BasePrincipal::Cast(principal)->OriginAttributesRef();
 
   nsAutoCString pattern;
-  QuotaManager::GetOriginPatternString(attrs.mAppId, attrs.mInBrowser, origin,
+  QuotaManager::GetOriginPatternString(attrs.mAppId, attrs.mInIsolatedMozBrowser, origin,
                                        pattern);
 
   mOriginScope.SetFromPattern(pattern);
 
   return NS_OK;
 }
 
 void
@@ -6261,17 +6261,17 @@ OriginParser::Parse(nsACString& aSpec, P
     QM_WARNING("Origin '%s' failed to parse, handled tokens: %s", mOrigin.get(),
                mHandledTokens.get());
 
     return false;
   }
 
   MOZ_ASSERT(mState == eComplete || mState == eHandledTrailingSeparator);
 
-  *aAttrs = PrincipalOriginAttributes(mAppId, mInMozBrowser);
+  *aAttrs = PrincipalOriginAttributes(mAppId, mInIsolatedMozBrowser);
 
   nsAutoCString spec(mSchema);
 
   if (mSchemaType == eFile) {
     spec.AppendLiteral("://");
 
     for (uint32_t count = mPathnameComponents.Length(), index = 0;
          index < count;
@@ -6386,19 +6386,19 @@ OriginParser::HandleToken(const nsDepend
         QM_WARNING("'%d' is not a valid length for the inMozBrowser flag!",
                    aToken.Length());
 
         mError = true;
         return;
       }
 
       if (aToken.First() == 't') {
-        mInMozBrowser = true;
+        mInIsolatedMozBrowser = true;
       } else if (aToken.First() == 'f') {
-        mInMozBrowser = false;
+        mInIsolatedMozBrowser = false;
       } else {
         QM_WARNING("'%s' is not a valid value for the inMozBrowser flag!",
                    nsCString(aToken).get());
 
         mError = true;
         return;
       }
 
--- a/dom/requestsync/RequestSyncService.jsm
+++ b/dom/requestsync/RequestSyncService.jsm
@@ -518,17 +518,17 @@ this.RequestSyncService = {
 
     let toSave = null;
     let self = this;
     this.forEachRegistration(function(aObj) {
       if (aObj.data.task != aData.task) {
         return;
       }
 
-      if (aObj.principal.isInBrowserElement != aData.isInBrowserElement ||
+      if (aObj.principal.isInIsolatedMozBrowserElement != aData.isInBrowserElement ||
           aObj.principal.originNoSuffix != aData.origin) {
         return;
       }
 
       let app = appsService.getAppByLocalId(aObj.principal.appId);
       if (app && app.manifestURL != aData.manifestURL ||
           (!app && aData.manifestURL != "")) {
         return;
@@ -567,17 +567,17 @@ this.RequestSyncService = {
     debug("runTask");
 
     let task = null;
     this.forEachRegistration(function(aObj) {
       if (aObj.data.task != aData.task) {
         return;
       }
 
-      if (aObj.principal.isInBrowserElement != aData.isInBrowserElement ||
+      if (aObj.principal.isInIsolatedMozBrowserElement != aData.isInBrowserElement ||
           aObj.principal.originNoSuffix != aData.origin) {
         return;
       }
 
       let app = appsService.getAppByLocalId(aObj.principal.appId);
       if (app && app.manifestURL != aData.manifestURL ||
           (!app && aData.manifestURL != "")) {
         return;
@@ -614,17 +614,17 @@ this.RequestSyncService = {
              data: aObj.data };
   },
 
   createFullTaskObject: function(aObj) {
     let obj = this.createPartialTaskObject(aObj);
 
     obj.app = { manifestURL: '',
                 origin: aObj.principal.originNoSuffix,
-                isInBrowserElement: aObj.principal.isInBrowserElement };
+                isInBrowserElement: aObj.principal.isInIsolatedMozBrowserElement };
 
     let app = appsService.getAppByLocalId(aObj.principal.appId);
     if (app) {
       obj.app.manifestURL = app.manifestURL;
     }
 
     obj.state = aObj.state;
     obj.overwrittenMinInterval = aObj.overwrittenMinInterval;
--- a/dom/storage/DOMStorageDBThread.cpp
+++ b/dom/storage/DOMStorageDBThread.cpp
@@ -53,31 +53,31 @@ Scheme0Scope(DOMStorageCacheBridge* aCac
 
   nsCString suffix = aCache->OriginSuffix();
 
   PrincipalOriginAttributes oa;
   if (!suffix.IsEmpty()) {
     oa.PopulateFromSuffix(suffix);
   }
 
-  if (oa.mAppId != nsIScriptSecurityManager::NO_APP_ID || oa.mInBrowser) {
+  if (oa.mAppId != nsIScriptSecurityManager::NO_APP_ID || oa.mInIsolatedMozBrowser) {
     result.AppendInt(oa.mAppId);
     result.Append(':');
-    result.Append(oa.mInBrowser ? 't' : 'f');
+    result.Append(oa.mInIsolatedMozBrowser ? 't' : 'f');
     result.Append(':');
   }
 
   // If there is more than just appid and/or inbrowser stored in origin
   // attributes, put it to the schema 0 scope as well.  We must do that
   // to keep the scope column unique (same resolution as schema 1 has
   // with originAttributes and originKey columns) so that switch between
   // schema 1 and 0 always works in both ways.
   nsAutoCString remaining;
   oa.mAppId = 0;
-  oa.mInBrowser = false;
+  oa.mInIsolatedMozBrowser = false;
   oa.CreateSuffix(remaining);
   if (!remaining.IsEmpty()) {
     MOZ_ASSERT(!suffix.IsEmpty());
 
     if (result.IsEmpty()) {
       // Must contain the old prefix, otherwise we won't search for the whole
       // origin attributes suffix.
       result.Append(NS_LITERAL_CSTRING("0:f:"));
--- a/dom/storage/DOMStorageDBUpdater.cpp
+++ b/dom/storage/DOMStorageDBUpdater.cpp
@@ -62,83 +62,83 @@ nsReverseStringSQLFunction::OnFunctionCa
 class ExtractOriginData : protected mozilla::Tokenizer
 {
 public:
   ExtractOriginData(const nsACString& scope, nsACString& suffix, nsACString& origin)
     : mozilla::Tokenizer(scope)
   {
     using mozilla::OriginAttributes;
 
-    // Parse optional appId:isInBrowserElement: string, in case
+    // Parse optional appId:isInIsolatedMozBrowserElement: string, in case
     // we don't find it, the scope is our new origin key and suffix
     // is empty.
     suffix.Truncate();
     origin.Assign(scope);
 
     // Bail out if it isn't appId.
     uint32_t appId;
     if (!ReadInteger(&appId)) {
       return;
     }
 
     // Should be followed by a colon.
     if (!CheckChar(':')) {
       return;
     }
 
-    // Bail out if it isn't 'browserFlag'.
-    nsDependentCSubstring browserFlag;
-    if (!ReadWord(browserFlag)) {
+    // Bail out if it isn't 'isolatedBrowserFlag'.
+    nsDependentCSubstring isolatedBrowserFlag;
+    if (!ReadWord(isolatedBrowserFlag)) {
       return;
     }
 
-    bool inBrowser = browserFlag == "t";
-    bool notInBrowser = browserFlag == "f";
-    if (!inBrowser && !notInBrowser) {
+    bool inIsolatedMozBrowser = isolatedBrowserFlag == "t";
+    bool notInIsolatedBrowser = isolatedBrowserFlag == "f";
+    if (!inIsolatedMozBrowser && !notInIsolatedBrowser) {
       return;
     }
 
     // Should be followed by a colon.
     if (!CheckChar(':')) {
       return;
     }
 
-    // OK, we have found appId and inBrowser flag, create the suffix from it
-    // and take the rest as the origin key.
+    // OK, we have found appId and inIsolatedMozBrowser flag, create the suffix
+    // from it and take the rest as the origin key.
 
     // If the profile went through schema 1 -> schema 0 -> schema 1 switching
     // we may have stored the full attributes origin suffix when there were
-    // more than just appid and inbrowser set on storage principal's
+    // more than just appId and inIsolatedMozBrowser set on storage principal's
     // OriginAttributes.
     //
     // To preserve full uniqueness we store this suffix to the scope key.
     // Schema 0 code will just ignore it while keeping the scoping unique.
     //
     // The whole scope string is in one of the following forms (when we are here):
     //
     // "1001:f:^appId=1001&inBrowser=false&addonId=101:gro.allizom.rxd.:https:443"
     // "1001:f:gro.allizom.rxd.:https:443"
     //         |
     //         +- the parser cursor position.
     //
     // If there is '^', the full origin attributes suffix follows.  We search
     // for ':' since it is the delimiter used in the scope string and is never
-    // contained in the origin attributes suffix.  Remaning string after
+    // contained in the origin attributes suffix.  Remaining string after
     // the comma is the reversed-domain+schema+port tuple.
     Record();
     if (CheckChar('^')) {
       Token t;
       while (Next(t)) {
         if (t.Equals(Token::Char(':'))) {
           Claim(suffix);
           break;
         }
       }
     } else {
-      PrincipalOriginAttributes attrs(appId, inBrowser);
+      PrincipalOriginAttributes attrs(appId, inIsolatedMozBrowser);
       attrs.CreateSuffix(suffix);
     }
 
     // Consume the rest of the input as "origin".
     origin.Assign(Substring(mCursor, mEnd));
   }
 };
 
--- a/dom/webidl/ChromeUtils.webidl
+++ b/dom/webidl/ChromeUtils.webidl
@@ -82,19 +82,19 @@ interface ChromeUtils : ThreadSafeChrome
  * (1) Add them to both dictionaries.
  * (2) Update the methods on mozilla::OriginAttributes, including equality,
  *     serialization, deserialization, and inheritance.
  * (3) Update the methods on mozilla::OriginAttributesPattern, including matching.
  */
 dictionary OriginAttributesDictionary {
   unsigned long appId = 0;
   unsigned long userContextId = 0;
-  boolean inBrowser = false;
+  boolean inIsolatedMozBrowser = false;
   DOMString addonId = "";
   DOMString signedPkg = "";
 };
 dictionary OriginAttributesPatternDictionary {
   unsigned long appId;
   unsigned long userContextId;
-  boolean inBrowser;
+  boolean inIsolatedMozBrowser;
   DOMString addonId;
   DOMString signedPkg;
 };
--- a/dom/workers/ServiceWorkerManagerService.cpp
+++ b/dom/workers/ServiceWorkerManagerService.cpp
@@ -58,22 +58,22 @@ public:
     if (NS_IsMainThread()) {
       for (uint32_t i = 0; i < mData->Length(); ++i) {
         NotifySoftUpdateData& data = mData->ElementAt(i);
         nsTArray<TabContext> contextArray =
           data.mContentParent->GetManagedTabContext();
         // mContentParent needs to be released in the main thread.
         data.mContentParent = nullptr;
         // We only send the notification about the soft update to the
-        // tabs/apps with the same appId and inBrowser values.
+        // tabs/apps with the same appId and inIsolatedMozBrowser values.
         // Sending a notification to the wrong process will make the process
         // to be killed.
         for (uint32_t j = 0; j < contextArray.Length(); ++j) {
           if ((contextArray[j].OwnOrContainingAppId() == mOriginAttributes.mAppId) &&
-              (contextArray[j].IsBrowserElement() == mOriginAttributes.mInBrowser)) {
+              (contextArray[j].IsBrowserElement() == mOriginAttributes.mInIsolatedMozBrowser)) {
             continue;
           }
           // Array entries with no mParent won't receive any notification.
           data.mParent = nullptr;
         }
       }
       nsresult rv = mBackgroundThread->Dispatch(this, NS_DISPATCH_NORMAL);
       MOZ_ALWAYS_TRUE(NS_SUCCEEDED(rv));
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -118,20 +118,20 @@ GetPrincipalFromOrigin(const nsACString&
 
   nsCOMPtr<nsIPrincipal> principal = mozilla::BasePrincipal::CreateCodebasePrincipal(uri, attrs);
   principal.forget(aPrincipal);
   return NS_OK;
 }
 
 
 nsresult
-GetPrincipal(nsIURI* aURI, uint32_t aAppId, bool aIsInBrowserElement, nsIPrincipal** aPrincipal)
+GetPrincipal(nsIURI* aURI, uint32_t aAppId, bool aIsInIsolatedMozBrowserElement, nsIPrincipal** aPrincipal)
 {
   // TODO: Bug 1165267 - Use OriginAttributes for nsCookieService
-  mozilla::PrincipalOriginAttributes attrs(aAppId, aIsInBrowserElement);
+  mozilla::PrincipalOriginAttributes attrs(aAppId, aIsInIsolatedMozBrowserElement);
   nsCOMPtr<nsIPrincipal> principal = mozilla::BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   NS_ENSURE_TRUE(principal, NS_ERROR_FAILURE);
 
   principal.forget(aPrincipal);
   return NS_OK;
 }
 
 nsresult
@@ -358,17 +358,17 @@ private:
   nsCOMPtr<mozIStorageConnection> mDBConn;
   int64_t* mID;
 };
 
 
 nsresult
 UpgradeHostToOriginAndInsert(const nsACString& aHost, const nsAFlatCString& aType,
                              uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
-                             int64_t aModificationTime, uint32_t aAppId, bool aIsInBrowserElement,
+                             int64_t aModificationTime, uint32_t aAppId, bool aIsInIsolatedMozBrowserElement,
                              UpgradeHostToOriginHelper* aHelper)
 {
   if (aHost.EqualsLiteral("<file>")) {
     // We no longer support the magic host <file>
     NS_WARNING("The magic host <file> is no longer supported. "
                "It is being removed from the permissions database.");
     return NS_OK;
   }
@@ -382,17 +382,17 @@ UpgradeHostToOriginAndInsert(const nsACS
     // these useless database entries
     bool nullpScheme = false;
     if (NS_SUCCEEDED(uri->SchemeIs("moz-nullprincipal", &nullpScheme)) && nullpScheme) {
       NS_WARNING("A moz-nullprincipal: permission is being discarded.");
       return NS_OK;
     }
 
     nsCOMPtr<nsIPrincipal> principal;
-    rv = GetPrincipal(uri, aAppId, aIsInBrowserElement, getter_AddRefs(principal));
+    rv = GetPrincipal(uri, aAppId, aIsInIsolatedMozBrowserElement, getter_AddRefs(principal));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoCString origin;
     rv = principal->GetOrigin(origin);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return aHelper->Insert(origin, aType, aPermission,
                            aExpireType, aExpireTime, aModificationTime);
@@ -490,17 +490,17 @@ UpgradeHostToOriginAndInsert(const nsACS
       if (NS_WARN_IF(NS_FAILED(rv))) continue;
 
       // Use the provided host - this URI may be for a subdomain, rather than the host we care about.
       rv = uri->SetHost(aHost);
       if (NS_WARN_IF(NS_FAILED(rv))) continue;
 
       // We now have a URI which we can make a nsIPrincipal out of
       nsCOMPtr<nsIPrincipal> principal;
-      rv = GetPrincipal(uri, aAppId, aIsInBrowserElement, getter_AddRefs(principal));
+      rv = GetPrincipal(uri, aAppId, aIsInIsolatedMozBrowserElement, getter_AddRefs(principal));
       if (NS_WARN_IF(NS_FAILED(rv))) continue;
 
       nsAutoCString origin;
       rv = principal->GetOrigin(origin);
       if (NS_WARN_IF(NS_FAILED(rv))) continue;
 
       // Ensure that we don't insert the same origin repeatedly
       if (insertedOrigins.Contains(origin)) {
@@ -536,30 +536,30 @@ UpgradeHostToOriginAndInsert(const nsACS
     } else {
       hostSegment.Assign(aHost);
     }
 
     // http:// URI default
     rv = NS_NewURI(getter_AddRefs(uri), NS_LITERAL_CSTRING("http://") + hostSegment);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = GetPrincipal(uri, aAppId, aIsInBrowserElement, getter_AddRefs(principal));
+    rv = GetPrincipal(uri, aAppId, aIsInIsolatedMozBrowserElement, getter_AddRefs(principal));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = principal->GetOrigin(origin);
     NS_ENSURE_SUCCESS(rv, rv);
 
     aHelper->Insert(origin, aType, aPermission,
                     aExpireType, aExpireTime, aModificationTime);
 
     // https:// URI default
     rv = NS_NewURI(getter_AddRefs(uri), NS_LITERAL_CSTRING("https://") + hostSegment);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = GetPrincipal(uri, aAppId, aIsInBrowserElement, getter_AddRefs(principal));
+    rv = GetPrincipal(uri, aAppId, aIsInIsolatedMozBrowserElement, getter_AddRefs(principal));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = principal->GetOrigin(origin);
     NS_ENSURE_SUCCESS(rv, rv);
 
     aHelper->Insert(origin, aType, aPermission,
                     aExpireType, aExpireTime, aModificationTime);
   }
--- a/extensions/cookie/test/channel_utils.js
+++ b/extensions/cookie/test/channel_utils.js
@@ -161,24 +161,24 @@ ChannelListener.prototype = {
     }
   }
 };
 
 /**
  * Class that implements nsILoadContext.  Use it as callbacks for channel when
  * test needs it.
  */
-function LoadContextCallback(appId, inBrowserElement, isPrivate, isContent) {
+function LoadContextCallback(appId, inIsolatedMozBrowser, isPrivate, isContent) {
   this.appId = appId;
-  this.isInBrowserElement = inBrowserElement;
+  this.isInBrowserElement = inIsolatedMozBrowser;
   this.usePrivateBrowsing = isPrivate;
   this.isContent = isContent;
   this.originAttributes = {
     appId: appId,
-    inBrowser: inBrowserElement
+    inIsolatedMozBrowser: inIsolatedMozBrowser
   };
 }
 
 LoadContextCallback.prototype = {
   associatedWindow: null,
   topWindow : null,
   isAppOfType: function(appType) {
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
--- a/extensions/cookie/test/test_app_uninstall_permissions.html
+++ b/extensions/cookie/test/test_app_uninstall_permissions.html
@@ -75,17 +75,17 @@ function onInstall() {
   var attrs = {appId: testAppId};
   var principal = secMan.createCodebasePrincipal(ioService.newURI("http://www.example.com", null, null),
                                                  attrs);
 
   permManager.addFromPrincipal(principal, "foobar", Ci.nsIPermissionManager.ALLOW_ACTION);
   permManager.addFromPrincipal(principal, "foo", Ci.nsIPermissionManager.DENY_ACTION);
   permManager.addFromPrincipal(principal, "bar", Ci.nsIPermissionManager.ALLOW_ACTION, Ci.nsIPermissionManager.EXPIRE_SESSION, 0);
 
-  attrs = {appId: testAppId, inBrowser: true};
+  attrs = {appId: testAppId, inIsolatedMozBrowser: true};
   principal = secMan.createCodebasePrincipal(ioService.newURI("http://www.example.com", null, null),
                                              attrs);
   permManager.addFromPrincipal(principal, "foobar", Ci.nsIPermissionManager.ALLOW_ACTION);
 
   attrs = {appId: testAppId};
   principal = secMan.createCodebasePrincipal(ioService.newURI("http://www.example.org", null, null),
                                              attrs);
   permManager.addFromPrincipal(principal, "foobar", Ci.nsIPermissionManager.ALLOW_ACTION);
--- a/extensions/cookie/test/unit/test_permmanager_cleardata.js
+++ b/extensions/cookie/test/unit/test_permmanager_cleardata.js
@@ -49,20 +49,20 @@ function run_test()
 {
   do_get_profile();
 
   pm = Cc["@mozilla.org/permissionmanager;1"]
          .getService(Ci.nsIPermissionManager);
 
   let entries = [
     { origin: 'http://example.com', originAttributes: { appId: 1 } },
-    { origin: 'http://example.com', originAttributes: { appId: 1, inBrowser: true } },
+    { origin: 'http://example.com', originAttributes: { appId: 1, inIsolatedMozBrowser: true } },
     { origin: 'http://example.com', originAttributes: {} },
     { origin: 'http://example.com', originAttributes: { appId: 2 } },
   ];
 
   // In that case, all permissions from app 1 should be removed but not the other ones.
   test(entries, getData({appId: 1}), [ pm.UNKNOWN_ACTION, pm.UNKNOWN_ACTION, pm.ALLOW_ACTION, pm.ALLOW_ACTION ]);
 
   // In that case, only the permissions of app 1 related to a browserElement should be removed.
   // All the other permissions should stay.
-  test(entries, getData({appId: 1, inBrowser: true}), [ pm.ALLOW_ACTION, pm.UNKNOWN_ACTION, pm.ALLOW_ACTION, pm.ALLOW_ACTION ]);
+  test(entries, getData({appId: 1, inIsolatedMozBrowser: true}), [ pm.ALLOW_ACTION, pm.UNKNOWN_ACTION, pm.ALLOW_ACTION, pm.ALLOW_ACTION ]);
 }
--- a/extensions/cookie/test/unit/test_permmanager_defaults.js
+++ b/extensions/cookie/test/unit/test_permmanager_defaults.js
@@ -51,17 +51,17 @@ add_task(function* do_test() {
            getService(Ci.nsIPermissionManager);
 
   // test the default permission was applied.
   let principal = Services.scriptSecurityManager.createCodebasePrincipal(TEST_ORIGIN, {});
   let principalHttps = Services.scriptSecurityManager.createCodebasePrincipal(TEST_ORIGIN_HTTPS, {});
   let principal2 = Services.scriptSecurityManager.createCodebasePrincipal(TEST_ORIGIN_2, {});
   let principal3 = Services.scriptSecurityManager.createCodebasePrincipal(TEST_ORIGIN_3, {});
 
-  let attrs = {appId: 1000, inBrowser: true};
+  let attrs = {appId: 1000, inIsolatedMozBrowser: true};
   let principal4 = Services.scriptSecurityManager.createCodebasePrincipal(TEST_ORIGIN, attrs);
   let principal5 = Services.scriptSecurityManager.createCodebasePrincipal(TEST_ORIGIN_3, attrs);
 
   do_check_eq(Ci.nsIPermissionManager.ALLOW_ACTION,
               pm.testPermissionFromPrincipal(principal, TEST_PERMISSION));
   do_check_eq(Ci.nsIPermissionManager.ALLOW_ACTION,
               pm.testPermissionFromPrincipal(principalHttps, TEST_PERMISSION));
   do_check_eq(Ci.nsIPermissionManager.ALLOW_ACTION,
--- a/extensions/cookie/test/unit/test_permmanager_matches.js
+++ b/extensions/cookie/test/unit/test_permmanager_matches.js
@@ -48,33 +48,33 @@ function run_test() {
   let attrs = {appId: 1000};
   let uri0_1000_n = secMan.createCodebasePrincipal(uri0, attrs);
   let uri1_1000_n = secMan.createCodebasePrincipal(uri1, attrs);
   let uri2_1000_n = secMan.createCodebasePrincipal(uri2, attrs);
   let uri3_1000_n = secMan.createCodebasePrincipal(uri3, attrs);
   let uri4_1000_n = secMan.createCodebasePrincipal(uri4, attrs);
   let uri5_1000_n = secMan.createCodebasePrincipal(uri5, attrs);
 
-  attrs = {appId: 1000, inBrowser: true};
+  attrs = {appId: 1000, inIsolatedMozBrowser: true};
   let uri0_1000_y = secMan.createCodebasePrincipal(uri0, attrs);
   let uri1_1000_y = secMan.createCodebasePrincipal(uri1, attrs);
   let uri2_1000_y = secMan.createCodebasePrincipal(uri2, attrs);
   let uri3_1000_y = secMan.createCodebasePrincipal(uri3, attrs);
   let uri4_1000_y = secMan.createCodebasePrincipal(uri4, attrs);
   let uri5_1000_y = secMan.createCodebasePrincipal(uri5, attrs);
 
   attrs = {appId: 2000};
   let uri0_2000_n = secMan.createCodebasePrincipal(uri0, attrs);
   let uri1_2000_n = secMan.createCodebasePrincipal(uri1, attrs);
   let uri2_2000_n = secMan.createCodebasePrincipal(uri2, attrs);
   let uri3_2000_n = secMan.createCodebasePrincipal(uri3, attrs);
   let uri4_2000_n = secMan.createCodebasePrincipal(uri4, attrs);
   let uri5_2000_n = secMan.createCodebasePrincipal(uri5, attrs);
 
-  attrs = {appId: 2000, inBrowser: true};
+  attrs = {appId: 2000, inIsolatedMozBrowser: true};
   let uri0_2000_y = secMan.createCodebasePrincipal(uri0, attrs);
   let uri1_2000_y = secMan.createCodebasePrincipal(uri1, attrs);
   let uri2_2000_y = secMan.createCodebasePrincipal(uri2, attrs);
   let uri3_2000_y = secMan.createCodebasePrincipal(uri3, attrs);
   let uri4_2000_y = secMan.createCodebasePrincipal(uri4, attrs);
   let uri5_2000_y = secMan.createCodebasePrincipal(uri5, attrs);
 
   pm.addFromPrincipal(uri0_n_n, "test/matches", pm.ALLOW_ACTION);
--- a/extensions/cookie/test/unit/test_permmanager_removeforapp.js
+++ b/extensions/cookie/test/unit/test_permmanager_removeforapp.js
@@ -1,19 +1,19 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function run_test() {
   // initialize the permission manager service
   let ssm = Services.scriptSecurityManager;
   let pm = Services.perms;
 
-  function mkPrin(uri, appId, inBrowser) {
+  function mkPrin(uri, appId, inIsolatedMozBrowser) {
     return ssm.createCodebasePrincipal(Services.io.newURI(uri, null, null),
-                                       {appId: appId, inBrowser: inBrowser});
+                                       {appId: appId, inIsolatedMozBrowser: inIsolatedMozBrowser});
   }
 
   function checkPerms(perms) {
     perms.forEach((perm) => {
       // Look up the expected permission
       do_check_eq(pm.getPermissionObject(mkPrin(perm[0],  perm[1], perm[2]),
                                          perm[3], true).capability,
                   perm[4], "Permission is expected in the permission database");
@@ -88,12 +88,12 @@ function run_test() {
 
     ['http://google.com',  1011, false, 'a', 1],
     ['http://google.com',  1011, false, 'b', 1],
     ['http://mozilla.com', 1011, false, 'b', 1],
     ['http://mozilla.com', 1011, false, 'a', 1],
   ];
 
   attrs = { appId: 1001,
-            inBrowser: true };
+            inIsolatedMozBrowser: true };
   pm.removePermissionsWithAttributes(JSON.stringify(attrs));
   checkPerms(remove_true_perms);
 }
--- a/netwerk/base/nsNetUtil.cpp
+++ b/netwerk/base/nsNetUtil.cpp
@@ -561,24 +561,24 @@ NS_LoadGroupMatchesPrincipal(nsILoadGrou
     uint32_t contextAppId;
     bool contextInBrowserElement;
     rv = loadContext->GetAppId(&contextAppId);
     NS_ENSURE_SUCCESS(rv, false);
     rv = loadContext->GetIsInBrowserElement(&contextInBrowserElement);
     NS_ENSURE_SUCCESS(rv, false);
 
     uint32_t principalAppId;
-    bool principalInBrowserElement;
+    bool principalInIsolatedBrowser;
     rv = aPrincipal->GetAppId(&principalAppId);
     NS_ENSURE_SUCCESS(rv, false);
-    rv = aPrincipal->GetIsInBrowserElement(&principalInBrowserElement);
+    rv = aPrincipal->GetIsInIsolatedMozBrowserElement(&principalInIsolatedBrowser);
     NS_ENSURE_SUCCESS(rv, false);
 
     return contextAppId == principalAppId &&
-           contextInBrowserElement == principalInBrowserElement;
+           contextInBrowserElement == principalInIsolatedBrowser;
 }
 
 nsresult
 NS_NewDownloader(nsIStreamListener   **result,
                  nsIDownloadObserver  *observer,
                  nsIFile              *downloadLocation /* = nullptr */)
 {
     nsresult rv;
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -247,17 +247,17 @@ nsUDPMessage::GetDataAsTArray()
 //-----------------------------------------------------------------------------
 // nsUDPSocket
 //-----------------------------------------------------------------------------
 
 nsUDPSocket::nsUDPSocket()
   : mLock("nsUDPSocket.mLock")
   , mFD(nullptr)
   , mAppId(NECKO_UNKNOWN_APP_ID)
-  , mIsInBrowserElement(false)
+  , mIsInIsolatedMozBrowserElement(false)
   , mAttached(false)
   , mByteReadCount(0)
   , mByteWriteCount(0)
 {
   mAddr.raw.family = PR_AF_UNSPEC;
   // we want to be able to access the STS directly, and it may not have been
   // constructed yet.  the STS constructor sets gSocketTransportService.
   if (!gSocketTransportService)
@@ -598,17 +598,17 @@ nsUDPSocket::InitWithAddress(const NetAd
   }
 
   if (aPrincipal) {
     nsresult rv = aPrincipal->GetAppId(&mAppId);
     if (NS_FAILED(rv)) {
       return rv;
     }
 
-    rv = aPrincipal->GetIsInBrowserElement(&mIsInBrowserElement);
+    rv = aPrincipal->GetIsInIsolatedMozBrowserElement(&mIsInIsolatedMozBrowserElement);
     if (NS_FAILED(rv)) {
       return rv;
     }
   }
 
 #ifdef MOZ_WIDGET_GONK
   if (mAppId != NECKO_UNKNOWN_APP_ID) {
     nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
@@ -758,17 +758,17 @@ nsUDPSocket::SaveNetworkStats(bool aEnfo
     return;
   }
 
   uint64_t total = mByteReadCount + mByteWriteCount;
   if (aEnforce || total > NETWORK_STATS_THRESHOLD) {
     // Create the event to save the network statistics.
     // the event is then dispathed to the main thread.
     RefPtr<nsRunnable> event =
-      new SaveNetworkStatsEvent(mAppId, mIsInBrowserElement, mActiveNetworkInfo,
+      new SaveNetworkStatsEvent(mAppId, mIsInIsolatedMozBrowserElement, mActiveNetworkInfo,
                                 mByteReadCount, mByteWriteCount, false);
     NS_DispatchToMainThread(event);
 
     // Reset the counters after saving.
     mByteReadCount = 0;
     mByteWriteCount = 0;
   }
 #endif
--- a/netwerk/base/nsUDPSocket.h
+++ b/netwerk/base/nsUDPSocket.h
@@ -60,17 +60,17 @@ private:
   void CloseSocket();
 
   // lock protects access to mListener;
   // so mListener is not cleared while being used/locked.
   mozilla::Mutex                       mLock;
   PRFileDesc                           *mFD;
   mozilla::net::NetAddr                mAddr;
   uint32_t                             mAppId;
-  bool                                 mIsInBrowserElement;
+  bool                                 mIsInIsolatedMozBrowserElement;
   nsCOMPtr<nsIUDPSocketListener>       mListener;
   nsCOMPtr<nsIEventTarget>             mListenerTarget;
   bool                                 mAttached;
   RefPtr<nsSocketTransportService>   mSts;
 
   uint64_t   mByteReadCount;
   uint64_t   mByteWriteCount;
 #ifdef MOZ_WIDGET_GONK
--- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp
+++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp
@@ -2399,17 +2399,17 @@ nsresult
 nsOfflineCacheDevice::Evict(nsILoadContextInfo *aInfo)
 {
   NS_ENSURE_ARG(aInfo);
 
   nsresult rv;
 
   mozilla::OriginAttributes const *oa = aInfo->OriginAttributesPtr();
 
-  if (oa->mAppId == NECKO_NO_APP_ID && oa->mInBrowser == false) {
+  if (oa->mAppId == NECKO_NO_APP_ID && oa->mInIsolatedMozBrowser == false) {
     nsCOMPtr<nsICacheService> serv = do_GetService(kCacheServiceCID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return nsCacheService::GlobalInstance()->EvictEntriesInternal(nsICache::STORE_OFFLINE);
   }
 
   nsAutoCString jaridsuffix;
   jaridsuffix.Append('%');
--- a/netwerk/cache2/CacheFile.cpp
+++ b/netwerk/cache2/CacheFile.cpp
@@ -1988,17 +1988,17 @@ CacheFile::InitIndexEntry()
     return NS_OK;
 
   nsresult rv;
 
   // Bug 1201042 - will pass OriginAttributes directly.
   rv = CacheFileIOManager::InitIndexEntry(mHandle,
                                           mMetadata->OriginAttributes().mAppId,
                                           mMetadata->IsAnonymous(),
-                                          mMetadata->OriginAttributes().mInBrowser,
+                                          mMetadata->OriginAttributes().mInIsolatedMozBrowser,
                                           mPinned);
   NS_ENSURE_SUCCESS(rv, rv);
 
   uint32_t expTime;
   mMetadata->GetExpirationTime(&expTime);
 
   uint32_t frecency;
   mMetadata->GetFrecency(&frecency);
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -947,21 +947,21 @@ protected:
   RefPtr<CacheFileHandle>       mHandle;
   nsCString                     mNewName;
   nsCOMPtr<CacheFileIOListener> mCallback;
 };
 
 class InitIndexEntryEvent : public nsRunnable {
 public:
   InitIndexEntryEvent(CacheFileHandle *aHandle, uint32_t aAppId,
-                      bool aAnonymous, bool aInBrowser, bool aPinning)
+                      bool aAnonymous, bool aInIsolatedMozBrowser, bool aPinning)
     : mHandle(aHandle)
     , mAppId(aAppId)
     , mAnonymous(aAnonymous)
-    , mInBrowser(aInBrowser)
+    , mInIsolatedMozBrowser(aInIsolatedMozBrowser)
     , mPinning(aPinning)
   {
     MOZ_COUNT_CTOR(InitIndexEntryEvent);
   }
 
 protected:
   ~InitIndexEntryEvent()
   {
@@ -970,33 +970,33 @@ protected:
 
 public:
   NS_IMETHOD Run()
   {
     if (mHandle->IsClosed() || mHandle->IsDoomed()) {
       return NS_OK;
     }
 
-    CacheIndex::InitEntry(mHandle->Hash(), mAppId, mAnonymous, mInBrowser, mPinning);
+    CacheIndex::InitEntry(mHandle->Hash(), mAppId, mAnonymous, mInIsolatedMozBrowser, mPinning);
 
     // We cannot set the filesize before we init the entry. If we're opening
     // an existing entry file, frecency and expiration time will be set after
     // parsing the entry file, but we must set the filesize here since nobody is
     // going to set it if there is no write to the file.
     uint32_t sizeInK = mHandle->FileSizeInK();
     CacheIndex::UpdateEntry(mHandle->Hash(), nullptr, nullptr, &sizeInK);
 
     return NS_OK;
   }
 
 protected:
   RefPtr<CacheFileHandle> mHandle;
   uint32_t                  mAppId;
   bool                      mAnonymous;
-  bool                      mInBrowser;
+  bool                      mInIsolatedMozBrowser;
   bool                      mPinning;
 };
 
 class UpdateIndexEntryEvent : public nsRunnable {
 public:
   UpdateIndexEntryEvent(CacheFileHandle *aHandle, const uint32_t *aFrecency,
                         const uint32_t *aExpirationTime)
     : mHandle(aHandle)
@@ -1248,18 +1248,18 @@ CacheFileIOManager::ShutdownInternal()
     // given hash is released. Null out the pointer so that we crash if there
     // is a bug in this code and we dereference the pointer after this point.
     if (!h->IsSpecialFile()) {
       h->mHash = nullptr;
     }
   }
 
   // Assert the table is empty. When we are here, no new handles can be added
-  // and handles will no longer remove them self from this table and we don't 
-  // want to keep invalid handles here. Also, there is no lookup after this 
+  // and handles will no longer remove them self from this table and we don't
+  // want to keep invalid handles here. Also, there is no lookup after this
   // point to happen.
   MOZ_ASSERT(mHandles.HandleCount() == 0);
 
   // Release trash directory enumerator
   if (mTrashDirEnumerator) {
     mTrashDirEnumerator->Close();
     mTrashDirEnumerator = nullptr;
   }
@@ -3418,35 +3418,36 @@ CacheFileIOManager::FindTrashDirToRemove
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 // static
 nsresult
 CacheFileIOManager::InitIndexEntry(CacheFileHandle *aHandle,
                                    uint32_t         aAppId,
                                    bool             aAnonymous,
-                                   bool             aInBrowser,
+                                   bool             aInIsolatedMozBrowser,
                                    bool             aPinning)
 {
   LOG(("CacheFileIOManager::InitIndexEntry() [handle=%p, appId=%u, anonymous=%d"
-       ", inBrowser=%d, pinned=%d]", aHandle, aAppId, aAnonymous, aInBrowser, aPinning));
+       ", inIsolatedMozBrowser=%d, pinned=%d]", aHandle, aAppId, aAnonymous,
+       aInIsolatedMozBrowser, aPinning));
 
   nsresult rv;
   RefPtr<CacheFileIOManager> ioMan = gInstance;
 
   if (aHandle->IsClosed() || !ioMan) {
     return NS_ERROR_NOT_INITIALIZED;
   }
 
   if (aHandle->IsSpecialFile()) {
     return NS_ERROR_UNEXPECTED;
   }
 
   RefPtr<InitIndexEntryEvent> ev =
-    new InitIndexEntryEvent(aHandle, aAppId, aAnonymous, aInBrowser, aPinning);
+    new InitIndexEntryEvent(aHandle, aAppId, aAnonymous, aInIsolatedMozBrowser, aPinning);
   rv = ioMan->mIOThread->Dispatch(ev, CacheIOThread::WRITE);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 // static
 nsresult
--- a/netwerk/cache2/CacheFileIOManager.h
+++ b/netwerk/cache2/CacheFileIOManager.h
@@ -311,17 +311,17 @@ public:
   static nsresult EvictIfOverLimit();
   static nsresult EvictAll();
   static nsresult EvictByContext(nsILoadContextInfo *aLoadContextInfo,
                                  bool aPinning);
 
   static nsresult InitIndexEntry(CacheFileHandle *aHandle,
                                  uint32_t         aAppId,
                                  bool             aAnonymous,
-                                 bool             aInBrowser,
+                                 bool             aInIsolatedMozBrowser,
                                  bool             aPinning);
   static nsresult UpdateIndexEntry(CacheFileHandle *aHandle,
                                    const uint32_t  *aFrecency,
                                    const uint32_t  *aExpirationTime);
 
   static nsresult UpdateIndexEntry();
 
   enum EEnumerateMode {
--- a/netwerk/cache2/CacheFileUtils.cpp
+++ b/netwerk/cache2/CacheFileUtils.cpp
@@ -85,17 +85,17 @@ private:
       }
       break;
     }
     case 'p':
       isPrivate = true;
       break;
     case 'b':
       // Leaving to be able to read and understand oldformatted entries
-      originAttribs.mInBrowser = true;
+      originAttribs.mInIsolatedMozBrowser = true;
       break;
     case 'a':
       isAnonymous = true;
       break;
     case 'i': {
       // Leaving to be able to read and understand oldformatted entries
       if (!ReadInteger(&originAttribs.mAppId)) {
         return false; // not a valid 32-bit integer
--- a/netwerk/cache2/CacheIndex.cpp
+++ b/netwerk/cache2/CacheIndex.cpp
@@ -686,22 +686,22 @@ CacheIndex::EnsureEntryExists(const SHA1
   return NS_OK;
 }
 
 // static
 nsresult
 CacheIndex::InitEntry(const SHA1Sum::Hash *aHash,
                       uint32_t             aAppId,
                       bool                 aAnonymous,
-                      bool                 aInBrowser,
+                      bool                 aInIsolatedMozBrowser,
                       bool                 aPinned)
 {
   LOG(("CacheIndex::InitEntry() [hash=%08x%08x%08x%08x%08x, appId=%u, "
-       "anonymous=%d, inBrowser=%d, pinned=%d]", LOGSHA1(aHash), aAppId,
-       aAnonymous, aInBrowser, aPinned));
+       "anonymous=%d, inIsolatedMozBrowser=%d, pinned=%d]", LOGSHA1(aHash),
+       aAppId, aAnonymous, aInIsolatedMozBrowser, aPinned));
 
   MOZ_ASSERT(CacheFileIOManager::IsOnIOThread());
 
   StaticMutexAutoLock lock(sLock);
 
   RefPtr<CacheIndex> index = gInstance;
 
   if (!index) {
@@ -724,17 +724,17 @@ CacheIndex::InitEntry(const SHA1Sum::Has
     }
 
     if (index->mState == READY || index->mState == UPDATING ||
         index->mState == BUILDING) {
       MOZ_ASSERT(index->mPendingUpdates.Count() == 0);
       MOZ_ASSERT(entry);
       MOZ_ASSERT(entry->IsFresh());
 
-      if (IsCollision(entry, aAppId, aAnonymous, aInBrowser)) {
+      if (IsCollision(entry, aAppId, aAnonymous, aInIsolatedMozBrowser)) {
         index->mIndexNeedsUpdate = true; // TODO Does this really help in case of collision?
         reinitEntry = true;
       } else {
         if (entry->IsInitialized()) {
           return NS_OK;
         }
       }
     } else {
@@ -742,28 +742,28 @@ CacheIndex::InitEntry(const SHA1Sum::Has
       DebugOnly<bool> removed = updated && updated->IsRemoved();
 
       MOZ_ASSERT(updated || !removed);
       MOZ_ASSERT(updated || entry);
 
       if (updated) {
         MOZ_ASSERT(updated->IsFresh());
 
-        if (IsCollision(updated, aAppId, aAnonymous, aInBrowser)) {
+        if (IsCollision(updated, aAppId, aAnonymous, aInIsolatedMozBrowser)) {
           index->mIndexNeedsUpdate = true;
           reinitEntry = true;
         } else {
           if (updated->IsInitialized()) {
             return NS_OK;
           }
         }
       } else {
         MOZ_ASSERT(entry->IsFresh());
 
-        if (IsCollision(entry, aAppId, aAnonymous, aInBrowser)) {
+        if (IsCollision(entry, aAppId, aAnonymous, aInIsolatedMozBrowser)) {
           index->mIndexNeedsUpdate = true;
           reinitEntry = true;
         } else {
           if (entry->IsInitialized()) {
             return NS_OK;
           }
         }
 
@@ -781,20 +781,20 @@ CacheIndex::InitEntry(const SHA1Sum::Has
         updated->MarkFresh();
       } else {
         entry->InitNew();
         entry->MarkFresh();
       }
     }
 
     if (updated) {
-      updated->Init(aAppId, aAnonymous, aInBrowser, aPinned);
+      updated->Init(aAppId, aAnonymous, aInIsolatedMozBrowser, aPinned);
       updated->MarkDirty();
     } else {
-      entry->Init(aAppId, aAnonymous, aInBrowser, aPinned);
+      entry->Init(aAppId, aAnonymous, aInIsolatedMozBrowser, aPinned);
       entry->MarkDirty();
     }
   }
 
   index->StartUpdatingIndexIfNeeded();
   index->WriteIndexToDiskIfNeeded();
 
   return NS_OK;
@@ -1455,29 +1455,30 @@ CacheIndex::IsIndexUsable()
   return true;
 }
 
 // static
 bool
 CacheIndex::IsCollision(CacheIndexEntry *aEntry,
                         uint32_t         aAppId,
                         bool             aAnonymous,
-                        bool             aInBrowser)
+                        bool             aInIsolatedMozBrowser)
 {
   if (!aEntry->IsInitialized()) {
     return false;
   }
 
   if (aEntry->AppId() != aAppId || aEntry->Anonymous() != aAnonymous ||
-      aEntry->InBrowser() != aInBrowser) {
+      aEntry->InIsolatedMozBrowser() != aInIsolatedMozBrowser) {
     LOG(("CacheIndex::IsCollision() - Collision detected for entry hash=%08x"
          "%08x%08x%08x%08x, expected values: appId=%u, anonymous=%d, "
-         "inBrowser=%d; actual values: appId=%u, anonymous=%d, inBrowser=%d]",
-         LOGSHA1(aEntry->Hash()), aAppId, aAnonymous, aInBrowser,
-         aEntry->AppId(), aEntry->Anonymous(), aEntry->InBrowser()));
+         "inIsolatedMozBrowser=%d; actual values: appId=%u, anonymous=%d, "
+         "inIsolatedMozBrowser=%d]",
+         LOGSHA1(aEntry->Hash()), aAppId, aAnonymous, aInIsolatedMozBrowser,
+         aEntry->AppId(), aEntry->Anonymous(), aEntry->InIsolatedMozBrowser()));
     return true;
   }
 
   return false;
 }
 
 // static
 bool
@@ -2583,17 +2584,17 @@ CacheIndex::InitEntryFromDiskData(CacheI
 {
   aEntry->InitNew();
   aEntry->MarkDirty();
   aEntry->MarkFresh();
 
   // Bug 1201042 - will pass OriginAttributes directly.
   aEntry->Init(aMetaData->OriginAttributes().mAppId,
                aMetaData->IsAnonymous(),
-               aMetaData->OriginAttributes().mInBrowser,
+               aMetaData->OriginAttributes().mInIsolatedMozBrowser,
                aMetaData->Pinned());
 
   uint32_t expirationTime;
   aMetaData->GetExpirationTime(&expirationTime);
   aEntry->SetExpirationTime(expirationTime);
 
   uint32_t frecency;
   aMetaData->GetFrecency(&frecency);
--- a/netwerk/cache2/CacheIndex.h
+++ b/netwerk/cache2/CacheIndex.h
@@ -59,17 +59,17 @@ struct CacheIndexRecord {
   SHA1Sum::Hash mHash;
   uint32_t      mFrecency;
   uint32_t      mExpirationTime;
   uint32_t      mAppId;
 
   /*
    *    1000 0000 0000 0000 0000 0000 0000 0000 : initialized
    *    0100 0000 0000 0000 0000 0000 0000 0000 : anonymous
-   *    0010 0000 0000 0000 0000 0000 0000 0000 : inBrowser
+   *    0010 0000 0000 0000 0000 0000 0000 0000 : inIsolatedMozBrowser
    *    0001 0000 0000 0000 0000 0000 0000 0000 : removed
    *    0000 1000 0000 0000 0000 0000 0000 0000 : dirty
    *    0000 0100 0000 0000 0000 0000 0000 0000 : fresh
    *    0000 0011 0000 0000 0000 0000 0000 0000 : reserved
    *    0000 0000 1111 1111 1111 1111 1111 1111 : file size (in kB)
    */
   uint32_t      mFlags;
 
@@ -143,44 +143,47 @@ public:
   void InitNew()
   {
     mRec->mFrecency = 0;
     mRec->mExpirationTime = nsICacheEntry::NO_EXPIRATION_TIME;
     mRec->mAppId = nsILoadContextInfo::NO_APP_ID;
     mRec->mFlags = 0;
   }
 
-  void Init(uint32_t aAppId, bool aAnonymous, bool aInBrowser, bool aPinned)
+  void Init(uint32_t aAppId, bool aAnonymous, bool aInIsolatedMozBrowser, bool aPinned)
   {
     MOZ_ASSERT(mRec->mFrecency == 0);
     MOZ_ASSERT(mRec->mExpirationTime == nsICacheEntry::NO_EXPIRATION_TIME);
     MOZ_ASSERT(mRec->mAppId == nsILoadContextInfo::NO_APP_ID);
     // When we init the entry it must be fresh and may be dirty
     MOZ_ASSERT((mRec->mFlags & ~kDirtyMask) == kFreshMask);
 
     mRec->mAppId = aAppId;
     mRec->mFlags |= kInitializedMask;
     if (aAnonymous) {
       mRec->mFlags |= kAnonymousMask;
     }
-    if (aInBrowser) {
-      mRec->mFlags |= kInBrowserMask;
+    if (aInIsolatedMozBrowser) {
+      mRec->mFlags |= kInIsolatedMozBrowserMask;
     }
     if (aPinned) {
       mRec->mFlags |= kPinnedMask;
     }
   }
 
   const SHA1Sum::Hash * Hash() const { return &mRec->mHash; }
 
   bool IsInitialized() const { return !!(mRec->mFlags & kInitializedMask); }
 
   uint32_t AppId() const { return mRec->mAppId; }
   bool     Anonymous() const { return !!(mRec->mFlags & kAnonymousMask); }
-  bool     InBrowser() const { return !!(mRec->mFlags & kInBrowserMask); }
+  bool     InIsolatedMozBrowser() const
+  {
+    return !!(mRec->mFlags & kInIsolatedMozBrowserMask);
+  }
 
   bool IsRemoved() const { return !!(mRec->mFlags & kRemovedMask); }
   void MarkRemoved() { mRec->mFlags |= kRemovedMask; }
 
   bool IsDirty() const { return !!(mRec->mFlags & kDirtyMask); }
   void MarkDirty() { mRec->mFlags |= kDirtyMask; }
   void ClearDirty() { mRec->mFlags &= ~kDirtyMask; }
 
@@ -251,31 +254,32 @@ public:
 
     mRec->mFrecency = NetworkEndian::readUint32(&src->mFrecency);
     mRec->mExpirationTime = NetworkEndian::readUint32(&src->mExpirationTime);
     mRec->mAppId = NetworkEndian::readUint32(&src->mAppId);
     mRec->mFlags = NetworkEndian::readUint32(&src->mFlags);
   }
 
   void Log() const {
-    LOG(("CacheIndexEntry::Log() [this=%p, hash=%08x%08x%08x%08x%08x, fresh=%u,"
-         " initialized=%u, removed=%u, dirty=%u, anonymous=%u, inBrowser=%u, "
-         "appId=%u, frecency=%u, expirationTime=%u, size=%u]",
+    LOG(("CacheIndexEntry::Log() [this=%p, hash=%08x%08x%08x%08x%08x, "
+         "fresh=%u, initialized=%u, removed=%u, dirty=%u, anonymous=%u, "
+         "inIsolatedMozBrowser=%u, appId=%u, frecency=%u, expirationTime=%u, "
+         "size=%u]",
          this, LOGSHA1(mRec->mHash), IsFresh(), IsInitialized(), IsRemoved(),
-         IsDirty(), Anonymous(), InBrowser(), AppId(), GetFrecency(),
+         IsDirty(), Anonymous(), InIsolatedMozBrowser(), AppId(), GetFrecency(),
          GetExpirationTime(), GetFileSize()));
   }
 
   static bool RecordMatchesLoadContextInfo(CacheIndexRecord *aRec,
                                            nsILoadContextInfo *aInfo)
   {
     if (!aInfo->IsPrivate() &&
         aInfo->OriginAttributesPtr()->mAppId == aRec->mAppId &&
         aInfo->IsAnonymous() == !!(aRec->mFlags & kAnonymousMask) &&
-        aInfo->OriginAttributesPtr()->mInBrowser == !!(aRec->mFlags & kInBrowserMask)) {
+        aInfo->OriginAttributesPtr()->mInIsolatedMozBrowser == !!(aRec->mFlags & kInIsolatedMozBrowserMask)) {
       return true;
     }
 
     return false;
   }
 
   // Memory reporting
   size_t SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const
@@ -290,17 +294,17 @@ public:
 
 private:
   friend class CacheIndexEntryUpdate;
   friend class CacheIndex;
   friend class CacheIndexEntryAutoManage;
 
   static const uint32_t kInitializedMask = 0x80000000;
   static const uint32_t kAnonymousMask   = 0x40000000;
-  static const uint32_t kInBrowserMask   = 0x20000000;
+  static const uint32_t kInIsolatedMozBrowserMask   = 0x20000000;
 
   // This flag is set when the entry was removed. We need to keep this
   // information in memory until we write the index file.
   static const uint32_t kRemovedMask     = 0x10000000;
 
   // This flag is set when the information in memory is not in sync with the
   // information in index file on disk.
   static const uint32_t kDirtyMask       = 0x08000000;
@@ -617,17 +621,17 @@ public:
   // index is outdated.
   static nsresult EnsureEntryExists(const SHA1Sum::Hash *aHash);
 
   // Initialize the entry. It MUST be present in index. Call to AddEntry() or
   // EnsureEntryExists() must precede the call to this method.
   static nsresult InitEntry(const SHA1Sum::Hash *aHash,
                             uint32_t             aAppId,
                             bool                 aAnonymous,
-                            bool                 aInBrowser,
+                            bool                 aInIsolatedMozBrowser,
                             bool                 aPinned);
 
   // Remove entry from index. The entry should be present in index.
   static nsresult RemoveEntry(const SHA1Sum::Hash *aHash);
 
   // Update some information in entry. The entry MUST be present in index and
   // MUST be initialized. Call to AddEntry() or EnsureEntryExists() and to
   // InitEntry() must precede the call to this method.
@@ -719,17 +723,17 @@ private:
 
   // This method checks whether the entry has the same values of appId,
   // isAnonymous and isInBrowser. We don't expect to find a collision since
   // these values are part of the key that we hash and we use a strong hash
   // function.
   static bool IsCollision(CacheIndexEntry *aEntry,
                           uint32_t         aAppId,
                           bool             aAnonymous,
-                          bool             aInBrowser);
+                          bool             aInIsolatedMozBrowser);
 
   // Checks whether any of the information about the entry has changed.
   static bool HasEntryChanged(CacheIndexEntry *aEntry,
                               const uint32_t  *aFrecency,
                               const uint32_t  *aExpirationTime,
                               const uint32_t  *aSize);
 
   // Merge all pending operations from mPendingUpdates into mIndex.
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -50,17 +50,17 @@ void AppendMemoryStorageID(nsAutoCString
 // it would otherwise need to include CacheEntry.h and that then would
 // need to be exported to make nsNetModule.cpp compilable.
 typedef nsClassHashtable<nsCStringHashKey, CacheEntryTable>
         GlobalEntryTables;
 
 /**
  * Keeps tables of entries.  There is one entries table for each distinct load
  * context type.  The distinction is based on following load context info states:
- * <isPrivate|isAnon|appId|inBrowser> which builds a mapping key.
+ * <isPrivate|isAnon|appId|inIsolatedMozBrowser> which builds a mapping key.
  *
  * Thread-safe to access, protected by the service mutex.
  */
 static GlobalEntryTables* sGlobalEntryTables;
 
 CacheMemoryConsumer::CacheMemoryConsumer(uint32_t aFlags)
 : mReportedMemoryConsumption(0)
 , mFlags(aFlags)
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -578,17 +578,17 @@ public:
     MOZ_ALWAYS_TRUE(attrs.Init(nsDependentString(aData)));
 
     nsCOMPtr<nsICookieManager2> cookieManager
       = do_GetService(NS_COOKIEMANAGER_CONTRACTID);
     MOZ_ASSERT(cookieManager);
 
     // TODO: We should add a new interface RemoveCookiesForOriginAttributes in
     // nsICookieManager2 and use it instead of RemoveCookiesForApp.
-    return cookieManager->RemoveCookiesForApp(attrs.mAppId, attrs.mInBrowser);
+    return cookieManager->RemoveCookiesForApp(attrs.mAppId, attrs.mInIsolatedMozBrowser);
   }
 };
 
 NS_IMPL_ISUPPORTS(AppClearDataObserver, nsIObserver)
 
 } // namespace
 
 size_t
@@ -820,26 +820,26 @@ class ConvertAppIdToOriginAttrsSQLFuncti
 
 NS_IMPL_ISUPPORTS(ConvertAppIdToOriginAttrsSQLFunction, mozIStorageFunction);
 
 NS_IMETHODIMP
 ConvertAppIdToOriginAttrsSQLFunction::OnFunctionCall(
   mozIStorageValueArray* aFunctionArguments, nsIVariant** aResult)
 {
   nsresult rv;
-  int32_t appId, inBrowser;
+  int32_t appId, inIsolatedMozBrowser;
 
   rv = aFunctionArguments->GetInt32(0, &appId);
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = aFunctionArguments->GetInt32(1, &inBrowser);
+  rv = aFunctionArguments->GetInt32(1, &inIsolatedMozBrowser);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // Create an originAttributes object by appId and inBrowserElemnt.
+  // Create an originAttributes object by appId and inIsolatedMozBrowser.
   // Then create the originSuffix string from this object.
-  NeckoOriginAttributes attrs(appId, (inBrowser ? 1 : 0));
+  NeckoOriginAttributes attrs(appId, (inIsolatedMozBrowser ? 1 : 0));
   nsAutoCString suffix;
   attrs.CreateSuffix(suffix);
 
   RefPtr<nsVariant> outVar(new nsVariant());
   rv = outVar->SetAsAUTF8String(suffix);
   NS_ENSURE_SUCCESS(rv, rv);
 
   outVar.forget(aResult);
@@ -896,17 +896,17 @@ SetInBrowserFromOriginAttributesSQLFunct
   nsAutoCString suffix;
   NeckoOriginAttributes attrs;
 
   rv = aFunctionArguments->GetUTF8String(0, suffix);
   NS_ENSURE_SUCCESS(rv, rv);
   attrs.PopulateFromSuffix(suffix);
 
   RefPtr<nsVariant> outVar(new nsVariant());
-  rv = outVar->SetAsInt32(attrs.mInBrowser);
+  rv = outVar->SetAsInt32(attrs.mInIsolatedMozBrowser);
   NS_ENSURE_SUCCESS(rv, rv);
 
   outVar.forget(aResult);
   return NS_OK;
 }
 
 } // namespace
 
@@ -1203,18 +1203,18 @@ nsCookieService::TryInitDB(bool aRecreat
       MOZ_FALLTHROUGH;
 
     case 5:
       {
         // Change in the version: Replace the columns |appId| and
         // |inBrowserElement| by a single column |originAttributes|.
         //
         // Why we made this change: FxOS new security model (NSec) encapsulates
-        // "appId/inBrowser" in nsIPrincipal::originAttributes to make it easier
-        // to modify the contents of this structure in the future.
+        // "appId/inIsolatedMozBrowser" in nsIPrincipal::originAttributes to make
+        // it easier to modify the contents of this structure in the future.
         //
         // We do the migration in several steps:
         // 1. Rename the old table.
         // 2. Create a new table.
         // 3. Copy data from the old table to the new table; convert appId and
         //    inBrowserElement to originAttributes in the meantime.
 
         // Rename existing table.
@@ -1939,17 +1939,17 @@ nsCookieService::SetCookieString(nsIURI 
 }
 
 NS_IMETHODIMP
 nsCookieService::SetCookieStringFromHttp(nsIURI     *aHostURI,
                                          nsIURI     *aFirstURI,
                                          nsIPrompt  *aPrompt,
                                          const char *aCookieHeader,
                                          const char *aServerTime,
-                                         nsIChannel *aChannel) 
+                                         nsIChannel *aChannel)
 {
   // The aPrompt argument is deprecated and unused.  Avoid introducing new
   // code that uses this argument by warning if the value is non-null.
   MOZ_ASSERT(!aPrompt);
   if (aPrompt) {
     nsCOMPtr<nsIConsoleService> aConsoleService =
         do_GetService("@mozilla.org/consoleservice;1");
     if (aConsoleService) {
@@ -1961,17 +1961,17 @@ nsCookieService::SetCookieStringFromHttp
                                true);
 }
 
 nsresult
 nsCookieService::SetCookieStringCommon(nsIURI *aHostURI,
                                        const char *aCookieHeader,
                                        const char *aServerTime,
                                        nsIChannel *aChannel,
-                                       bool aFromHttp) 
+                                       bool aFromHttp)
 {
   NS_ENSURE_ARG(aHostURI);
   NS_ENSURE_ARG(aCookieHeader);
 
   // Determine whether the request is foreign. Failure is acceptable.
   bool isForeign = true;
   mThirdPartyUtil->IsThirdPartyChannel(aChannel, aHostURI, &isForeign);
 
@@ -2859,17 +2859,17 @@ nsCookieService::ImportCookies(nsIFile *
       continue;
     }
 
     // compute the baseDomain from the host
     rv = GetBaseDomainFromHost(host, baseDomain);
     if (NS_FAILED(rv))
       continue;
 
-    // pre-existing cookies have appId=0, inBrowser=false set by default
+    // pre-existing cookies have appId=0, inIsolatedMozBrowser=false set by default
     // constructor of NeckoOriginAttributes().
     nsCookieKey key = DEFAULT_APP_KEY(baseDomain);
 
     // Create a new nsCookie and assign the data. We don't know the cookie
     // creation time, so just use the current time to generate a unique one.
     RefPtr<nsCookie> newCookie =
       nsCookie::Create(Substring(buffer, nameIndex, cookieIndex - nameIndex - 1),
                        Substring(buffer, cookieIndex, buffer.Length() - cookieIndex),
@@ -2880,17 +2880,17 @@ nsCookieService::ImportCookies(nsIFile *
                        nsCookie::GenerateUniqueCreationTime(currentTimeInUsec),
                        false,
                        Substring(buffer, secureIndex, expiresIndex - secureIndex - 1).EqualsLiteral(kTrue),
                        isHttpOnly,
                        key.mOriginAttributes);
     if (!newCookie) {
       return NS_ERROR_OUT_OF_MEMORY;
     }
-    
+
     // trick: preserve the most-recently-used cookie ordering,
     // by successively decrementing the lastAccessed time
     lastAccessedCounter--;
 
     if (originalCookieCount == 0) {
       AddCookieToList(key, newCookie, mDefaultDBState, paramsArray);
     }
     else {
@@ -3471,17 +3471,17 @@ nsCookieService::AddInternal(const nsCoo
 
     4. where appropriate, full <OCTET>s are allowed, where the spec dictates to
        reject control chars or non-ASCII chars. This is erring on the loose
        side, since there's probably no good reason to enforce this strictness.
 
     5. cookie <NAME> is optional, where spec requires it. This is a fairly
        trivial case, but allows the flexibility of setting only a cookie <VALUE>
        with a blank <NAME> and is required by some sites (see bug 169091).
-       
+
     6. Attribute "HttpOnly", not covered in the RFCs, is supported
        (see bug 178993).
 
  ** Begin BNF:
     token         = 1*<any allowed-chars except separators>
     value         = 1*<any allowed-chars except value-sep>
     separators    = ";" | "="
     value-sep     = ";"
@@ -3600,17 +3600,17 @@ nsCookieService::ParseAttributes(nsDepen
 
   nsASingleFragmentCString::const_char_iterator tempBegin, tempEnd;
   nsASingleFragmentCString::const_char_iterator cookieStart, cookieEnd;
   aCookieHeader.BeginReading(cookieStart);
   aCookieHeader.EndReading(cookieEnd);
 
   aCookieAttributes.isSecure = false;
   aCookieAttributes.isHttpOnly = false;
-  
+
   nsDependentCSubstring tokenString(cookieStart, cookieStart);
   nsDependentCSubstring tokenValue (cookieStart, cookieStart);
   bool newCookie, equalsFound;
 
   // extract cookie <NAME> & <VALUE> (first attribute), and copy the strings.
   // if we find multiple cookies, return for processing
   // note: if there's no '=', we assume token is <VALUE>. this is required by
   //       some sites (see bug 169091).
@@ -3643,17 +3643,17 @@ nsCookieService::ParseAttributes(nsDepen
       aCookieAttributes.expires = tokenValue;
 
     else if (tokenString.LowerCaseEqualsLiteral(kMaxage))
       aCookieAttributes.maxage = tokenValue;
 
     // ignore any tokenValue for isSecure; just set the boolean
     else if (tokenString.LowerCaseEqualsLiteral(kSecure))
       aCookieAttributes.isSecure = true;
-      
+
     // ignore any tokenValue for isHttpOnly (see bug 178993);
     // just set the boolean
     else if (tokenString.LowerCaseEqualsLiteral(kHttpOnly))
       aCookieAttributes.isHttpOnly = true;
   }
 
   // rebind aCookieHeader, in case we need to process another cookie
   aCookieHeader.Rebind(cookieStart, cookieEnd);
@@ -3970,18 +3970,18 @@ nsCookieService::CheckPath(nsCookieAttri
   return true;
 }
 
 bool
 nsCookieService::GetExpiry(nsCookieAttributes &aCookieAttributes,
                            int64_t             aServerTime,
                            int64_t             aCurrentTime)
 {
-  /* Determine when the cookie should expire. This is done by taking the difference between 
-   * the server time and the time the server wants the cookie to expire, and adding that 
+  /* Determine when the cookie should expire. This is done by taking the difference between
+   * the server time and the time the server wants the cookie to expire, and adding that
    * difference to the client time. This localizes the client time regardless of whether or
    * not the TZ environment variable was set on the client.
    *
    * Note: We need to consider accounting for network lag here, per RFC.
    */
   int64_t delta;
 
   // check for max-age attribute first; this overrides expires attribute
@@ -4310,50 +4310,51 @@ nsCookieService::GetCookiesFromHost(cons
   for (nsCookieEntry::IndexType i = 0; i < cookies.Length(); ++i) {
     cookieList.AppendObject(cookies[i]);
   }
 
   return NS_NewArrayEnumerator(aEnumerator, cookieList);
 }
 
 NS_IMETHODIMP
-nsCookieService::GetCookiesForApp(uint32_t aAppId, bool aOnlyBrowserElement,
+nsCookieService::GetCookiesForApp(uint32_t aAppId, bool aOnlyIsolatedMozBrowser,
                                   nsISimpleEnumerator** aEnumerator)
 {
   if (!mDBState) {
     NS_WARNING("No DBState! Profile already closed?");
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   NS_ENSURE_TRUE(aAppId != NECKO_UNKNOWN_APP_ID, NS_ERROR_INVALID_ARG);
 
   nsCOMArray<nsICookie> cookies;
   for (auto iter = mDBState->hostTable.Iter(); !iter.Done(); iter.Next()) {
     nsCookieEntry* entry = iter.Get();
 
     if (entry->mOriginAttributes.mAppId != aAppId ||
-        (aOnlyBrowserElement && !entry->mOriginAttributes.mInBrowser)) {
+        (aOnlyIsolatedMozBrowser && !entry->mOriginAttributes.mInIsolatedMozBrowser)) {
       continue;
     }
 
     const nsCookieEntry::ArrayType& entryCookies = entry->GetCookies();
 
     for (nsCookieEntry::IndexType i = 0; i < entryCookies.Length(); ++i) {
       cookies.AppendObject(entryCookies[i]);
     }
   }
 
   return NS_NewArrayEnumerator(aEnumerator, cookies);
 }
 
 NS_IMETHODIMP
-nsCookieService::RemoveCookiesForApp(uint32_t aAppId, bool aOnlyBrowserElement)
+nsCookieService::RemoveCookiesForApp(uint32_t aAppId,
+                                     bool aOnlyIsolatedMozBrowser)
 {
   nsCOMPtr<nsISimpleEnumerator> enumerator;
-  nsresult rv = GetCookiesForApp(aAppId, aOnlyBrowserElement,
+  nsresult rv = GetCookiesForApp(aAppId, aOnlyIsolatedMozBrowser,
                                  getter_AddRefs(enumerator));
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool hasMore;
   while (NS_SUCCEEDED(enumerator->HasMoreElements(&hasMore)) && hasMore) {
     nsCOMPtr<nsISupports> supports;
     nsCOMPtr<nsICookie> cookie;
@@ -4366,31 +4367,31 @@ nsCookieService::RemoveCookiesForApp(uin
     cookie->GetHost(host);
 
     nsAutoCString name;
     cookie->GetName(name);
 
     nsAutoCString path;
     cookie->GetPath(path);
 
-    // nsICookie do not carry the appId/inBrowserElement information.
+    // nsICookie do not carry the appId/isIsolatedBrowser information.
     // That means we have to guess. This is easy for appId but not for
-    // inBrowserElement flag.
+    // isIsolatedBrowser flag.
     // A simple solution is to always ask to remove the cookie with
-    // inBrowserElement = true and only ask for the other one to be removed if
+    // isIsolatedBrowser = true and only ask for the other one to be removed if
     // we happen to be in the case of !aOnlyBrowserElement.
-    // Anyway, with this solution, we will likely be looking for unexistant
+    // Anyway, with this solution, we will likely be looking for non-existent
     // cookies.
     //
     // NOTE: we could make this better by getting nsCookieEntry objects instead
     // of plain nsICookie.
     NeckoOriginAttributes attrs(aAppId, true);
     Remove(host, attrs, name, path, false);
-    if (!aOnlyBrowserElement) {
-      attrs.mInBrowser = false;
+    if (!aOnlyIsolatedMozBrowser) {
+      attrs.mInIsolatedMozBrowser = false;
       Remove(host, attrs, name, path, false);
     }
   }
 
   return NS_OK;
 }
 
 // find an exact cookie specified by host, name, and path that hasn't expired.
--- a/netwerk/cookie/nsICookieManager2.idl
+++ b/netwerk/cookie/nsICookieManager2.idl
@@ -106,27 +106,30 @@ interface nsICookieManager2 : nsICookieM
    *
    * @param aCookieFile the file to import, usually cookies.txt
    */
   void importCookies(in nsIFile aCookieFile);
 
   /**
    * Returns an enumerator of all cookies that are related to a specific app.
    *
-   * If the onlyBrowserELement parameter is set to true, only cookies part of
-   * a browser element inside the app will be returned. If set to false, all
-   * cookies will be returned, regardless of their browserElement flag.
+   * If the onlyIsolatedMozBrowser parameter is set to true, only cookies part
+   * of an isolated mozbrowser element inside the app will be returned. If set
+   * to false, all cookies will be returned, regardless of their
+   * inIsolatedMozBrowser flag.
    *
    * This method assumes that appId is a valid app id. It should not be a
    * special value like UNKNOWN_APP_ID or NO_APP_ID.
    */
-  nsISimpleEnumerator getCookiesForApp(in unsigned long appId, in boolean onlyBrowserElement);
+  nsISimpleEnumerator getCookiesForApp(in unsigned long appId,
+                                       in boolean onlyIsolatedMozBrowser);
 
   /**
    * Remove all the cookies associated with the app with the id aAppId.
    *
-   * If onlyBrowserElement is set to true, the method will only remove the
-   * cookies marked as part of a browser element inside the app.
+   * If onlyIsolatedMozBrowser is set to true, the method will only remove the
+   * cookies marked as part of an isolated mozbrowser element inside the app.
    *
    * Special app id values are not allowed (NO_APP_ID or UNKNOWN_APP_ID for example).
    */
-  void removeCookiesForApp(in unsigned long appId, in boolean onlyBrowserElement);
+  void removeCookiesForApp(in unsigned long appId,
+                           in boolean onlyIsolatedMozBrowser);
 };
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -122,17 +122,17 @@ NeckoParent::GetValidatedAppInfo(const S
   }
 
   nsTArray<TabContext> contextArray =
     static_cast<ContentParent*>(aContent)->GetManagedTabContext();
   for (uint32_t i = 0; i < contextArray.Length(); i++) {
     TabContext tabContext = contextArray[i];
     uint32_t appId = tabContext.OwnOrContainingAppId();
     bool inBrowserElement = aSerialized.IsNotNull() ?
-                              aSerialized.mOriginAttributes.mInBrowser :
+                              aSerialized.mOriginAttributes.mInIsolatedMozBrowser :
                               tabContext.IsBrowserElement();
 
     if (appId == NECKO_UNKNOWN_APP_ID) {
       continue;
     }
     // We may get appID=NO_APP if child frame is neither a browser nor an app
     if (appId == NECKO_NO_APP_ID) {
       if (tabContext.HasOwnApp()) {
@@ -151,17 +151,17 @@ NeckoParent::GetValidatedAppInfo(const S
         aSerialized.mOriginAttributes.mSignedPkg != tabContext.OriginAttributesRef().mSignedPkg) {
       continue;
     }
     if (aSerialized.mOriginAttributes.mUserContextId != tabContext.OriginAttributesRef().mUserContextId) {
       continue;
     }
     aAttrs = DocShellOriginAttributes();
     aAttrs.mAppId = appId;
-    aAttrs.mInBrowser = inBrowserElement;
+    aAttrs.mInIsolatedMozBrowser = inBrowserElement;
     aAttrs.mSignedPkg = aSerialized.mOriginAttributes.mSignedPkg;
     aAttrs.mUserContextId = aSerialized.mOriginAttributes.mUserContextId;
 
     return nullptr;
   }
 
   if (contextArray.Length() != 0) {
     return "App does not have permission";
--- a/netwerk/test/TestCookie.cpp
+++ b/netwerk/test/TestCookie.cpp
@@ -553,17 +553,17 @@ main(int32_t argc, char *argv[])
       SetACookie(cookieService, "http://multi.path.tests/one/two/three/four/five/six/", nullptr, "test7=path; path=", nullptr);
       SetACookie(cookieService, "http://multi.path.tests/", nullptr, "test8=path; path=/", nullptr);
       GetACookie(cookieService, "http://multi.path.tests/one/two/three/four/five/six/", nullptr, getter_Copies(cookie));
       rv[0] = CheckResult(cookie.get(), MUST_EQUAL, "test7=path; test6=path; test3=path; test1=path; test5=path; test4=path; test2=path; test8=path");
 
       allTestsPassed = PrintResult(rv, 1) && allTestsPassed;
 
 
-      // *** httponly tests 
+      // *** httponly tests
       sBuffer = PR_sprintf_append(sBuffer, "*** Beginning httponly tests...\n");
 
       // Since this cookie is NOT set via http, setting it fails
       SetACookieNoHttp(cookieService, "http://httponly.test/", "test=httponly; httponly");
       GetACookie(cookieService, "http://httponly.test/", nullptr, getter_Copies(cookie));
       rv[0] = CheckResult(cookie.get(), MUST_BE_NULL);
       // Since this cookie is set via http, it can be retrieved
       SetACookie(cookieService, "http://httponly.test/", nullptr, "test=httponly; httponly", nullptr);
@@ -604,17 +604,17 @@ main(int32_t argc, char *argv[])
 
 
       // *** nsICookieManager{2} interface tests
       sBuffer = PR_sprintf_append(sBuffer, "*** Beginning nsICookieManager{2} interface tests...\n");
       nsCOMPtr<nsICookieManager> cookieMgr = do_GetService(NS_COOKIEMANAGER_CONTRACTID, &rv0);
       if (NS_FAILED(rv0)) return -1;
       nsCOMPtr<nsICookieManager2> cookieMgr2 = do_QueryInterface(cookieMgr);
       if (!cookieMgr2) return -1;
-      
+
       // first, ensure a clean slate
       rv[0] = NS_SUCCEEDED(cookieMgr->RemoveAll());
       // add some cookies
       rv[1] = NS_SUCCEEDED(cookieMgr2->Add(NS_LITERAL_CSTRING("cookiemgr.test"), // domain
                                            NS_LITERAL_CSTRING("/foo"),           // path
                                            NS_LITERAL_CSTRING("test1"),          // name
                                            NS_LITERAL_CSTRING("yes"),            // value
                                            false,                             // is secure
@@ -642,17 +642,17 @@ main(int32_t argc, char *argv[])
       rv[4] = NS_SUCCEEDED(cookieMgr->GetEnumerator(getter_AddRefs(enumerator)));
       int32_t i = 0;
       bool more;
       nsCOMPtr<nsICookie2> expiredCookie, newDomainCookie;
       while (NS_SUCCEEDED(enumerator->HasMoreElements(&more)) && more) {
         nsCOMPtr<nsISupports> cookie;
         if (NS_FAILED(enumerator->GetNext(getter_AddRefs(cookie)))) break;
         ++i;
-        
+
         // keep tabs on the second and third cookies, so we can check them later
         nsCOMPtr<nsICookie2> cookie2(do_QueryInterface(cookie));
         if (!cookie2) break;
         nsAutoCString name;
         cookie2->GetName(name);
         if (name.EqualsLiteral("test2"))
           expiredCookie = cookie2;
         else if (name.EqualsLiteral("test3"))
@@ -751,10 +751,10 @@ main(int32_t argc, char *argv[])
     sBuffer = nullptr;
 
     return 0;
 }
 
 // Stubs to make this test happy
 
 mozilla::dom::OriginAttributesDictionary::OriginAttributesDictionary()
-  : mAppId(0), mInBrowser(false), mUserContextId(0)
+  : mAppId(0), mInIsolatedMozBrowser(false), mUserContextId(0)
 {}
--- a/netwerk/test/mochitests/test_origin_attributes_conversion.html
+++ b/netwerk/test/mochitests/test_origin_attributes_conversion.html
@@ -35,21 +35,21 @@ function runTest() {
     info("Got mozbrowserloadend");
     iframe.setAttribute("src", "http://mochi.test:8888/tests/netwerk/test/mochitests/signed_web_packaged_app.sjs!//index.html");
 
     iframe.addEventListener("mozbrowserloadend", function loadend(e) {
       iframe.removeEventListener("mozbrowserloadend", loadend);
       info("Got 2nd mozbrowserloadend");
 
       // Expected origin attributes for signed package.
-      var expectedSignedOA = {inBrowser: true,
+      var expectedSignedOA = {inIsolatedMozBrowser: true,
                               signedPkg: "09bc9714-7ab6-4320-9d20-fde4c237522c"};
 
       // Expected origin attributes for network request.
-      var expectedOA = {inBrowser: true};
+      var expectedOA = {inIsolatedMozBrowser: true};
 
       function checkOriginAttributes(attrs, expected) {
         for (var p in expected) {
           is(attrs[p], expected[p]);
         }
       }
 
       var mm = SpecialPowers.wrap(iframe)
--- a/netwerk/test/unit/head_channels.js
+++ b/netwerk/test/unit/head_channels.js
@@ -203,22 +203,22 @@ ChannelEventSink.prototype = {
   }
 };
 
 
 /**
  * Class that implements nsILoadContext.  Use it as callbacks for channel when
  * test needs it.
  */
-function LoadContextCallback(appId, inBrowserElement, isPrivate, isContent) {
+function LoadContextCallback(appId, inIsolatedMozBrowser, isPrivate, isContent) {
   this.appId = appId;
-  this.isInBrowserElement = inBrowserElement;
+  this.isInBrowserElement = inIsolatedMozBrowser;
   this.originAttributes = {
     appId: appId,
-    inBrowser: inBrowserElement
+    inIsolatedMozBrowser: inIsolatedMozBrowser
   };
   this.usePrivateBrowsing = isPrivate;
   this.isContent = isContent;
 }
 
 LoadContextCallback.prototype = {
   associatedWindow: null,
   topWindow : null,
--- a/netwerk/test/unit/test_auth_jar.js
+++ b/netwerk/test/unit/test_auth_jar.js
@@ -10,25 +10,25 @@ function createURI(s) {
 function run_test() {
   // Set up a profile.
   do_get_profile();
 
   var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
   const kURI1 = "http://example.com";
   var app1 = secMan.createCodebasePrincipal(createURI(kURI1), {appId: 1});
   var app10 = secMan.createCodebasePrincipal(createURI(kURI1),{appId: 10});
-  var app1browser = secMan.createCodebasePrincipal(createURI(kURI1), {appId: 1, inBrowser: true});
+  var app1browser = secMan.createCodebasePrincipal(createURI(kURI1), {appId: 1, inIsolatedMozBrowser: true});
 
   var am = Cc["@mozilla.org/network/http-auth-manager;1"].
            getService(Ci.nsIHttpAuthManager);
   am.setAuthIdentity("http", "a.example.com", -1, "basic", "realm", "", "example.com", "user", "pass", false, app1);
   am.setAuthIdentity("http", "a.example.com", -1, "basic", "realm", "", "example.com", "user3", "pass3", false, app1browser);
   am.setAuthIdentity("http", "a.example.com", -1, "basic", "realm", "", "example.com", "user2", "pass2", false, app10);
 
-  let attrs_inBrowser = JSON.stringify({ appId:1, inBrowser:true });
+  let attrs_inBrowser = JSON.stringify({ appId:1, inIsolatedMozBrowser:true });
   Services.obs.notifyObservers(null, "clear-origin-data", attrs_inBrowser);
   
   var domain = {value: ""}, user = {value: ""}, pass = {value: ""};
   try {
     am.getAuthIdentity("http", "a.example.com", -1, "basic", "realm", "", domain, user, pass, false, app1browser);
     do_check_false(true); // no identity should be present
   } catch (x) {
     do_check_eq(domain.value, "");
--- a/netwerk/test/unit/test_cache_jar.js
+++ b/netwerk/test/unit/test_cache_jar.js
@@ -14,25 +14,25 @@ function cached_handler(metadata, respon
   response.setHeader("Content-Type", "text/plain", false);
   response.setHeader("Cache-Control", "max-age=10000", false);
   response.setStatusLine(metadata.httpVersion, 200, "OK");
   var body = "0123456789";
   response.bodyOutputStream.write(body, body.length);
   handlers_called++;
 }
 
-function makeChan(url, appId, inBrowser) {
+function makeChan(url, appId, inIsolatedMozBrowser) {
   var chan = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
                     .QueryInterface(Ci.nsIHttpChannel);
   chan.notificationCallbacks = {
     appId: appId,
-    isInBrowserElement: inBrowser,
+    isInBrowserElement: inIsolatedMozBrowser,
     originAttributes: {
       appId: appId,
-      inBrowser: inBrowser,
+      inIsolatedMozBrowser: inIsolatedMozBrowser,
     },
     QueryInterface: function(iid) {
       if (iid.equals(Ci.nsILoadContext))
         return this;
       throw Cr.NS_ERROR_NO_INTERFACE;
     },
     getInterface: function(iid) { return this.QueryInterface(iid); }
   };
@@ -52,17 +52,17 @@ function run_all_tests() {
   }
 
   // We can't easily cause webapp data to be cleared from the child process, so skip
   // the rest of these tests.
   let procType = Cc["@mozilla.org/xre/runtime;1"].getService(Ci.nsIXULRuntime).processType;
   if (procType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT)
     return;
 
-  let attrs_inBrowser = JSON.stringify({ appId:1, inBrowser:true });
+  let attrs_inBrowser = JSON.stringify({ appId:1, inIsolatedMozBrowser:true });
   let attrs_notInBrowser = JSON.stringify({ appId:1 });
 
   Services.obs.notifyObservers(null, "clear-origin-data", attrs_inBrowser);
 
   for (let test of secondTests) {
     handlers_called = 0;
     var chan = makeChan(URL, test[0], test[1]);
     chan.asyncOpen2(new ChannelListener(doneFirstLoad, test[2]));
--- a/netwerk/test/unit/test_packaged_app_bug1214079.js
+++ b/netwerk/test/unit/test_packaged_app_bug1214079.js
@@ -149,17 +149,17 @@ function getChannelForURL(url) {
     NetUtil.newChannel({
       uri: url,
       loadingPrincipal: principal,
       contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
     });
 
   tmpChannel.notificationCallbacks =
     new LoadContextCallback(principal.appId,
-                            principal.isInBrowserElement,
+                            principal.isInIsolatedMozBrowserElement,
                             false,
                             false);
 
   return tmpChannel;
 }
 
 function test_badSignature_package()
 {
--- a/netwerk/test/unit/test_packaged_app_service.js
+++ b/netwerk/test/unit/test_packaged_app_service.js
@@ -81,17 +81,17 @@ function getChannelForURL(url, notificat
     });
 
   if (notificationCallbacks) {
     // Use custom notificationCallbacks if any.
     tmpChannel.notificationCallbacks = notificationCallbacks;
   } else {
     tmpChannel.notificationCallbacks =
       new LoadContextCallback(principal.appId,
-                              principal.isInBrowserElement,
+                              principal.isInIsolatedMozBrowserElement,
                               false,
                               false);
 
   }
   return tmpChannel;
 }
 
 // The package content
--- a/netwerk/test/unit/test_packaged_app_service_paths.js
+++ b/netwerk/test/unit/test_packaged_app_service_paths.js
@@ -21,17 +21,17 @@ function getChannelForURL(url) {
     NetUtil.newChannel({
       uri: url,
       loadingPrincipal: principal,
       contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER
     });
 
   tmpChannel.notificationCallbacks =
     new LoadContextCallback(principal.appId,
-                            principal.isInBrowserElement,
+                            principal.isInIsolatedMozBrowserElement,
                             false,
                             false);
   return tmpChannel;
 }
 
 var subresourcePaths = [
   [ "/index.html", "index.html" ],
   [ "index.html",  "index.html" ],
--- a/netwerk/test/unit_ipc/child_app_offline.js
+++ b/netwerk/test/unit_ipc/child_app_offline.js
@@ -1,25 +1,25 @@
 Cu.import("resource://gre/modules/NetUtil.jsm");
 
 function inChildProcess() {
   return Cc["@mozilla.org/xre/app-info;1"]
            .getService(Ci.nsIXULRuntime)
            .processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 }
 
-function makeChan(url, appId, inBrowser) {
+function makeChan(url, appId, inIsolatedMozBrowser) {
   var chan = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true})
                     .QueryInterface(Ci.nsIHttpChannel);
   chan.notificationCallbacks = {
     appId: appId,
-    isInBrowserElement: inBrowser,
+    isInBrowserElement: inIsolatedMozBrowser,
     originAttributes: {
       appId: appId,
-      inBrowser: inBrowser,
+      inIsolatedMozBrowser: inIsolatedMozBrowser,
     },
     QueryInterface: function(iid) {
       if (iid.equals(Ci.nsILoadContext))
         return this;
       throw Cr.NS_ERROR_NO_INTERFACE;
     },
     getInterface: function(iid) { return this.QueryInterface(iid); }
   };
--- a/services/fxaccounts/FxAccountsManager.jsm
+++ b/services/fxaccounts/FxAccountsManager.jsm
@@ -547,17 +547,18 @@ this.FxAccountsManager = {
    */
   getAssertion: function(aAudience, aPrincipal, aOptions) {
     if (!aAudience) {
       return this._error(ERROR_INVALID_AUDIENCE);
     }
 
     let principal = aPrincipal;
     log.debug("FxAccountsManager.getAssertion() aPrincipal: ",
-              principal.origin, principal.appId, principal.isInBrowserElement);
+              principal.origin, principal.appId,
+              principal.isInIsolatedMozBrowserElement);
 
     return this.getAccount().then(
       user => {
         if (user) {
           // Three have-user cases to consider. First: are we unverified?
           if (!user.verified) {
             return this._error(ERROR_UNVERIFIED_ACCOUNT, {
               user: user
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -851,28 +851,28 @@ class Marionette(object):
         return typing
 
     def get_permission(self, perm):
         with self.using_context('content'):
             value = self.execute_script("""
                 let value = {
                               'url': document.nodePrincipal.URI.spec,
                               'appId': document.nodePrincipal.appId,
-                              'isInBrowserElement': document.nodePrincipal.isInBrowserElement,
+                              'isInIsolatedMozBrowserElement': document.nodePrincipal.isInIsolatedMozBrowserElement,
                               'type': arguments[0]
                             };
                 return value;
                 """, script_args=[perm], sandbox='system')
 
         with self.using_context('chrome'):
             permission = self.execute_script("""
                 Components.utils.import("resource://gre/modules/Services.jsm");
                 let perm = arguments[0];
                 let secMan = Services.scriptSecurityManager;
-                let attrs = {appId: perm.appId, inBrowser: perm.isInBrowserElement};
+                let attrs = {appId: perm.appId, inIsolatedMozBrowser: perm.isInIsolatedMozBrowserElement};
                 let principal = secMan.createCodebasePrincipal(
                                 Services.io.newURI(perm.url, null, null),
                                 attrs);
                 let testPerm = Services.perms.testPermissionFromPrincipal(
                                principal, perm.type);
                 return testPerm;
                 """, script_args=[value])
         return permission
@@ -903,17 +903,17 @@ class Marionette(object):
                   }
                 };
                 Services.obs.addObserver(window.wrappedJSObject.permObserver,
                                          "perm-changed", false);
 
                 let value = {
                               'url': document.nodePrincipal.URI.spec,
                               'appId': document.nodePrincipal.appId,
-                              'isInBrowserElement': document.nodePrincipal.isInBrowserElement,
+                              'isInIsolatedMozBrowserElement': document.nodePrincipal.isInIsolatedMozBrowserElement,
                               'type': perm_type,
                               'action': allow
                             };
                 return value;
                 """, script_args=[allow, perm], sandbox='system')
 
         current_perm = self.get_permission(perm['type'])
         if current_perm == perm['action']:
@@ -924,17 +924,17 @@ class Marionette(object):
                     """, sandbox='system')
             return
 
         with self.using_context('chrome'):
             self.execute_script("""
                 Components.utils.import("resource://gre/modules/Services.jsm");
                 let perm = arguments[0];
                 let secMan = Services.scriptSecurityManager;
-                let attrs = {appId: perm.appId, inBrowser: perm.isInBrowserElement};
+                let attrs = {appId: perm.appId, inIsolatedMozBrowser: perm.isInIsolatedMozBrowserElement};
                 let principal = secMan.createCodebasePrincipal(Services.io.newURI(perm.url, null, null),
                                                                attrs);
                 Services.perms.addFromPrincipal(principal, perm.type, perm.action);
                 return true;
                 """, script_args=[perm])
 
         with self.using_context('content'):
             self.execute_async_script("""
--- a/testing/mochitest/tests/Harness_sanity/test_bug816847.html
+++ b/testing/mochitest/tests/Harness_sanity/test_bug816847.html
@@ -8,17 +8,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body onload="starttest();">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=816847">Mozilla Bug 816847</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /** Test for Bug 816847 **/
 SimpleTest.waitForExplicitFinish();
 
 const Cc = SpecialPowers.Cc;
 const Ci = SpecialPowers.Ci;
@@ -28,33 +28,33 @@ const Services = Cu.import("resource://g
 const appsSvc = Cc["@mozilla.org/AppsService;1"]
                   .getService(Ci.nsIAppsService)
 
 const manifest = "https://example.com/manifest.webapp";
 const allow = Ci.nsIPermissionManager.ALLOW_ACTION;
 const unknown = Ci.nsIPermissionManager.UNKNOWN_ACTION;
 const perms = ['network-events', 'geolocation', 'camera', 'alarms']
 
-function createPrincipal(aURI, aIsApp, aIsInBrowserElement) {
+function createPrincipal(aURI, aIsApp, aIsInIsolatedMozBrowserElement) {
   if (aIsApp) {
     var app = appsSvc.getAppByManifestURL(aURI);
     return app.principal;
   }
 
   var uri = Services.io.newURI(aURI, null, null);
   return Services.scriptSecurityManager
                  .createCodebasePrincipal(uri, {});
 }
 
 // test addPermission and removePermission
 function starttest(){
   var app = appsSvc.getAppByManifestURL(manifest);
-  ok(app != null, "Got an app "); 
+  ok(app != null, "Got an app ");
 
-  var origin = app.origin 
+  var origin = app.origin
   var nodePrincipal = SpecialPowers.wrap(document).nodePrincipal;
   var appPrincipal = createPrincipal(manifest, true);
   var noappPrincipal = createPrincipal(origin, false);
 
   SpecialPowers.addPermission(perms[0], true, origin);
   SpecialPowers.addPermission(perms[1], true, {manifestURL: manifest});
   SpecialPowers.addPermission(perms[2], true, document);
   SpecialPowers.addPermission(perms[3], true, {url: origin});
@@ -86,9 +86,8 @@ function starttest(){
 
   SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>
-
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -825,17 +825,17 @@ SpecialPowersAPI.prototype = {
       }
     }
   },
 
   popPermissions: function(callback) {
     if (this._permissionsUndoStack.length > 0) {
       // See pushPermissions comment regarding delay.
       let cb = callback ? this._delayCallbackTwice(callback) : null;
-      /* Each pop from the stack will yield an object {op/type/permission/value/url/appid/isInBrowserElement} or null */
+      /* Each pop from the stack will yield an object {op/type/permission/value/url/appid/isInIsolatedMozBrowserElement} or null */
       this._pendingPermissions.push([this._permissionsUndoStack.pop(), cb]);
       this._applyPermissions();
     } else {
       if (this._observingPermissions) {
         this._observingPermissions = false;
         this._removeMessageListener("specialpowers-perm-changed", this.permChangedProxy.bind(this));
       }
       this._setTimeout(callback);
--- a/toolkit/components/url-classifier/content/xml-fetcher.js
+++ b/toolkit/components/url-classifier/content/xml-fetcher.js
@@ -37,42 +37,43 @@ this.PROT_NewXMLHttpRequest = function P
  * appId.
  * @constructor
  */
 this.PROT_XMLFetcher = function PROT_XMLFetcher() {
   this.debugZone = "xmlfetcher";
   this._request = PROT_NewXMLHttpRequest();
   // implements nsILoadContext
   this.appId = Ci.nsIScriptSecurityManager.SAFEBROWSING_APP_ID;
-  this.isInBrowserElement = false;
+  this.isInIsolatedMozBrowserElement = false;
   this.usePrivateBrowsing = false;
   this.isContent = false;
 }
 
 PROT_XMLFetcher.prototype = {
   /**
    * Function that will be called back upon fetch completion.
    */
   _callback: null,
-  
+
 
   /**
    * Fetches some content.
-   * 
+   *
    * @param page URL to fetch
    * @param callback Function to call back when complete.
    */
   get: function(page, callback) {
     this._request.abort();                // abort() is asynchronous, so
     this._request = PROT_NewXMLHttpRequest();
     this._callback = callback;
     var asynchronous = true;
-    this._request.loadInfo.originAttributes = { appId: this.appId,
-                                                inBrowser: this.isInBrowserElement
-                                              }
+    this._request.loadInfo.originAttributes = {
+      appId: this.appId,
+      inIsolatedMozBrowser: this.isInIsolatedMozBrowserElement
+    };
     this._request.open("GET", page, asynchronous);
     this._request.channel.notificationCallbacks = this;
 
     // Create a closure
     var self = this;
     this._request.addEventListener("readystatechange", function() {
       self.readyStateChange(self);
     }, false);
@@ -96,17 +97,17 @@ PROT_XMLFetcher.prototype = {
     // If the request fails, on trunk we get status set to
     // NS_ERROR_NOT_AVAILABLE.  On 1.8.1 branch we get an exception
     // forwarded from nsIHttpChannel::GetResponseStatus.  To be consistent
     // between branch and trunk, we send back NS_ERROR_NOT_AVAILABLE for
     // http failures.
     var responseText = null;
     var status = Components.results.NS_ERROR_NOT_AVAILABLE;
     try {
-      G_Debug(this, "xml fetch status code: \"" + 
+      G_Debug(this, "xml fetch status code: \"" +
               fetcher._request.status + "\"");
       status = fetcher._request.status;
       responseText = fetcher._request.responseText;
     } catch(e) {
       G_Debug(this, "Caught exception trying to read xmlhttprequest " +
               "status/response.");
       G_Debug(this, e);
     }
--- a/toolkit/content/aboutServiceWorkers.js
+++ b/toolkit/content/aboutServiceWorkers.js
@@ -73,17 +73,17 @@ function display(info, pushService) {
 
   let title = document.createElement('h2');
   let titleStr = bundle.formatStringFromName('title', [info.principal.origin], 1);
   title.appendChild(document.createTextNode(titleStr));
   div.appendChild(title);
 
   if (info.principal.appId) {
     let b2gtitle = document.createElement('h3');
-    let trueFalse = bundle.GetStringFromName(info.principal.isInBrowserElement ? 'true' : 'false');
+    let trueFalse = bundle.GetStringFromName(info.principal.isInIsolatedMozBrowserElement ? 'true' : 'false');
 
     let b2gtitleStr =
       bundle.formatStringFromName('b2gtitle', [ brandBundle.getString("brandShortName"),
                                                 info.principal.appId,
                                                 trueFalse], 2);
     b2gtitle.appendChild(document.createTextNode(b2gtitleStr));
     div.appendChild(b2gtitle);
   }
--- a/uriloader/prefetch/OfflineCacheUpdateParent.cpp
+++ b/uriloader/prefetch/OfflineCacheUpdateParent.cpp
@@ -120,17 +120,17 @@ OfflineCacheUpdateParent::Schedule(const
 
     service->FindUpdate(manifestURI,
                         originSuffix,
                         nullptr,
                         getter_AddRefs(update));
     if (!update) {
         update = new nsOfflineCacheUpdate();
 
-        // Leave aDocument argument null. Only glues and children keep 
+        // Leave aDocument argument null. Only glues and children keep
         // document instances.
         rv = update->Init(manifestURI, documentURI, mLoadingPrincipal, nullptr, nullptr);
         NS_ENSURE_SUCCESS(rv, rv);
 
         rv = update->Schedule();
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
@@ -257,17 +257,17 @@ OfflineCacheUpdateParent::SetRemoteTabs(
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 OfflineCacheUpdateParent::GetIsInBrowserElement(bool *aIsInBrowserElement)
 {
     NS_ENSURE_TRUE(mLoadingPrincipal, NS_ERROR_UNEXPECTED);
-    return mLoadingPrincipal->GetIsInBrowserElement(aIsInBrowserElement);
+    return mLoadingPrincipal->GetIsInIsolatedMozBrowserElement(aIsInBrowserElement);
 }
 
 NS_IMETHODIMP
 OfflineCacheUpdateParent::GetAppId(uint32_t *aAppId)
 {
     NS_ENSURE_TRUE(mLoadingPrincipal, NS_ERROR_UNEXPECTED);
     return mLoadingPrincipal->GetAppId(aAppId);
 }
--- a/uriloader/prefetch/nsIOfflineCacheUpdate.idl
+++ b/uriloader/prefetch/nsIOfflineCacheUpdate.idl
@@ -219,18 +219,18 @@ interface nsIOfflineCacheUpdateService :
      */
     nsIOfflineCacheUpdate scheduleUpdate(in nsIURI aManifestURI,
                                          in nsIURI aDocumentURI,
                                          in nsIPrincipal aLoadingPrincipal,
                                          in mozIDOMWindow aWindow);
 
     /**
      * Schedule a cache update for a given offline manifest using app cache
-     * bound to the given appID+inBrowser flag.  If an existing update is
-     * scheduled or running, that update will be returned. Otherwise a new
+     * bound to the given appID+inIsolatedMozBrowser flag.  If an existing update
+     * is scheduled or running, that update will be returned. Otherwise a new
      * update will be scheduled.
      */
     nsIOfflineCacheUpdate scheduleAppUpdate(in nsIURI aManifestURI,
                                             in nsIURI aDocumentURI,
                                             in nsIPrincipal aLoadingPrincipal,
                                             in nsIFile aProfileDir);
 
     /**