From 8bb8ba83be4027603133d456a137454781de6c58 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 17 Feb 2016 20:55:57 -0600 Subject: [PATCH] Bug 1238160 - Rename nsILoadContext::GetIsInBrowserElement. r=smaug,mayhemer This change renames nsILoadContext::GetIsInBrowserElement to GetIsInIsolatedMozBrowserElement. Other methods that pass these values around also have name changes. Tokens such as "isInBrowserElement" 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: CUttXANQjSv --- docshell/base/LoadContext.cpp | 8 ++--- docshell/base/nsDocShell.cpp | 7 +++-- docshell/base/nsIDocShell.idl | 15 ++++++---- docshell/base/nsILoadContext.idl | 8 +++-- dom/apps/AppsUtils.jsm | 2 +- dom/apps/Webapps.jsm | 2 +- .../browserElement_AudioChannel_nested.js | 2 +- dom/ipc/TabParent.cpp | 2 +- dom/network/NetworkStatsService.jsm | 8 ++--- dom/network/NetworkStatsServiceProxy.js | 6 ++-- .../nsINetworkStatsServiceProxy.idl | 9 ++++-- dom/requestsync/RequestSyncManager.js | 8 ++--- extensions/cookie/test/channel_utils.js | 2 +- netwerk/base/NetStatistics.h | 8 ++--- netwerk/base/PACGenerator.js | 2 +- netwerk/base/ProxyAutoConfig.cpp | 29 ++++++++++--------- netwerk/base/ProxyAutoConfig.h | 14 +++++---- netwerk/base/nsNetUtil.cpp | 10 +++---- netwerk/base/nsNetUtil.h | 4 +-- netwerk/base/nsPACMan.cpp | 14 ++++----- netwerk/base/nsPACMan.h | 8 ++--- netwerk/base/nsProtocolProxyService.cpp | 23 ++++++++------- netwerk/protocol/http/nsHttpTransaction.cpp | 8 ++--- netwerk/protocol/http/nsHttpTransaction.h | 2 +- .../protocol/websocket/WebSocketChannel.cpp | 8 ++--- netwerk/protocol/websocket/WebSocketChannel.h | 2 +- netwerk/test/unit/head_channels.js | 3 +- netwerk/test/unit/test_cache_jar.js | 4 +-- .../test/unit/test_protocolproxyservice.js | 14 ++++----- netwerk/test/unit_ipc/child_app_offline.js | 2 +- .../prefetch/OfflineCacheUpdateParent.cpp | 4 +-- 31 files changed, 129 insertions(+), 109 deletions(-) diff --git a/docshell/base/LoadContext.cpp b/docshell/base/LoadContext.cpp index 605ada9734b..be7da52610f 100644 --- a/docshell/base/LoadContext.cpp +++ b/docshell/base/LoadContext.cpp @@ -34,7 +34,7 @@ nsILoadContext::GetOriginAttributes(mozilla::DocShellOriginAttributes& aAttrs) aAttrs = attrs; return true; } - + namespace mozilla { NS_IMPL_ISUPPORTS(LoadContext, nsILoadContext, nsIInterfaceRequestor) @@ -172,13 +172,13 @@ LoadContext::SetRemoteTabs(bool aUseRemoteTabs) } NS_IMETHODIMP -LoadContext::GetIsInBrowserElement(bool* aIsInBrowserElement) +LoadContext::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) { MOZ_ASSERT(mIsNotNull); - NS_ENSURE_ARG_POINTER(aIsInBrowserElement); + NS_ENSURE_ARG_POINTER(aIsInIsolatedMozBrowserElement); - *aIsInBrowserElement = mOriginAttributes.mInIsolatedMozBrowser; + *aIsInIsolatedMozBrowserElement = mOriginAttributes.mInIsolatedMozBrowser; return NS_OK; } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 9cd3c684aa8..33674234588 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -3500,7 +3500,8 @@ nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem, return false; } - if (targetDS->GetIsInBrowserElement() != accessingDS->GetIsInBrowserElement() || + if (targetDS->GetIsInIsolatedMozBrowserElement() != + accessingDS->GetIsInIsolatedMozBrowserElement() || targetDS->GetAppId() != accessingDS->GetAppId()) { return false; } @@ -13938,9 +13939,9 @@ nsDocShell::GetInheritedFrameType() } /* [infallible] */ NS_IMETHODIMP -nsDocShell::GetIsInBrowserElement(bool* aIsInBrowserElement) +nsDocShell::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) { - *aIsInBrowserElement = (GetInheritedFrameType() == eFrameTypeBrowser); + *aIsInIsolatedMozBrowserElement = (GetInheritedFrameType() == eFrameTypeBrowser); return NS_OK; } diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 7654e64b75d..ba07aa46c83 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -780,16 +780,21 @@ interface nsIDocShell : nsIDocShellTreeItem [infallible] readonly attribute boolean isBrowserOrApp; /** - * Returns true if this docshell corresponds to an