bool WyciwygChannelParent::SetupAppData(const IPC::SerializedLoadContext& loadContext, PBrowserParent* aParent) { if (!mChannel) return true; const char* error = NeckoParent::CreateChannelLoadContext(aParent, Manager()->Manager(), loadContext, mLoadContext); if (error) { printf_stderr("WyciwygChannelParent::SetupAppData: FATAL ERROR: %s\n", error); return false; } if (!mLoadContext && loadContext.IsPrivateBitValid()) { nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(mChannel); if (pbChannel) pbChannel->SetPrivate(loadContext.mUsePrivateBrowsing); } mReceivedAppData = true; return true; }
MOZ_WARN_UNUSED_RESULT bool CookieServiceParent::GetOriginAttributesFromParams(const IPC::SerializedLoadContext &aLoadContext, NeckoOriginAttributes& aAttrs, bool& aIsPrivate) { aIsPrivate = false; DocShellOriginAttributes docShellAttrs; const char* error = NeckoParent::GetValidatedAppInfo(aLoadContext, Manager()->Manager(), docShellAttrs); if (error) { NS_WARNING(nsPrintfCString("CookieServiceParent: GetOriginAttributesFromParams: " "FATAL error: %s: KILLING CHILD PROCESS\n", error).get()); return false; } if (aLoadContext.IsPrivateBitValid()) { aIsPrivate = aLoadContext.mUsePrivateBrowsing; } aAttrs.InheritFromDocShellToNecko(docShellAttrs); return true; }
MOZ_WARN_UNUSED_RESULT bool CookieServiceParent::GetAppInfoFromParams(const IPC::SerializedLoadContext &aLoadContext, uint32_t& aAppId, bool& aIsInBrowserElement, bool& aIsPrivate) { aAppId = NECKO_NO_APP_ID; aIsInBrowserElement = false; aIsPrivate = false; const char* error = NeckoParent::GetValidatedAppInfo(aLoadContext, Manager()->Manager(), &aAppId, &aIsInBrowserElement); if (error) { NS_WARNING(nsPrintfCString("CookieServiceParent: GetAppInfoFromParams: " "FATAL error: %s: KILLING CHILD PROCESS\n", error).get()); return false; } if (aLoadContext.IsPrivateBitValid()) { aIsPrivate = aLoadContext.mUsePrivateBrowsing; } return true; }