Bug 1316683 - Part 5: Avoid going into SpiderMonkey for retrieving origin attributes; r=baku

Our caller is C++ code, and the implementations are all also written in C++,
so there is no reason to go through SpiderMonkey here.  This patch also makes
nsILoadContext builtinclass to ensure that the implementation is always native.
This commit is contained in:
Ehsan Akhgari
2017-03-18 16:08:12 -04:00
parent 6b27337d42
commit 3677a91998
9 changed files with 36 additions and 44 deletions

View File

@@ -62,9 +62,7 @@ SerializedLoadContext::Init(nsILoadContext* aLoadContext)
aLoadContext->GetIsContent(&mIsContent);
aLoadContext->GetUseRemoteTabs(&mUseRemoteTabs);
aLoadContext->GetUseTrackingProtection(&mUseTrackingProtection);
if (!aLoadContext->GetOriginAttributes(mOriginAttributes)) {
NS_WARNING("GetOriginAttributes failed");
}
aLoadContext->GetOriginAttributes(mOriginAttributes);
} else {
mIsNotNull = false;
mIsPrivateBitValid = false;