Bug 1195881 - Pass userContext through NeckoParent and TabChild. r=tanvi, r=sicking

This commit is contained in:
Kate McKinley 2016-01-07 10:51:04 -08:00
parent 06e4a6f988
commit 82579c5c6c
2 changed files with 14 additions and 3 deletions

View File

@ -835,7 +835,10 @@ TabChild::NotifyTabContextUpdated()
} else {
docShell->SetIsApp(OwnAppId());
}
docShell->SetIsSignedPackage(OriginAttributesRef().mSignedPkg);
OriginAttributes attrs = OriginAttributesRef();
docShell->SetIsSignedPackage(attrs.mSignedPkg);
docShell->SetUserContextId(attrs.mUserContextId);
}
}

View File

@ -145,12 +145,20 @@ NeckoParent::GetValidatedAppInfo(const SerializedLoadContext& aSerialized,
continue;
}
}
if (!aSerialized.mOriginAttributes.mSignedPkg.IsEmpty() &&
aSerialized.mOriginAttributes.mSignedPkg != tabContext.OriginAttributesRef().mSignedPkg) {
continue;
}
aAttrs = DocShellOriginAttributes(appId, inBrowserElement);
aAttrs.mSignedPkg = tabContext.OriginAttributesRef().mSignedPkg;
if (aSerialized.mOriginAttributes.mUserContextId != tabContext.OriginAttributesRef().mUserContextId) {
continue;
}
aAttrs = DocShellOriginAttributes();
aAttrs.mAppId = appId;
aAttrs.mInBrowser = inBrowserElement;
aAttrs.mSignedPkg = aSerialized.mOriginAttributes.mSignedPkg;
aAttrs.mUserContextId = aSerialized.mOriginAttributes.mUserContextId;
return nullptr;
}