Backed out changeset 1b5c66916877 (bug 1237081) for mochitest browser-chrome bustage

--HG--
extra : commitid : HyS2gutZZNx
This commit is contained in:
Nigel Babu 2016-01-06 12:01:27 +05:30
parent 9a22f96774
commit 442c7ab5e1
4 changed files with 18 additions and 5 deletions

View File

@ -64,12 +64,10 @@ var SessionHistoryInternal = {
* The docShell that owns the session history.
*/
collect: function (docShell) {
let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
let data = {entries: [], userContextId: docShell.userContextId };
let webNavigation = docShell.QueryInterface(Ci.nsIWebNavigation);
let history = webNavigation.sessionHistory.QueryInterface(Ci.nsISHistoryInternal);
let data = {entries: [], userContextId: loadContext.originAttributes.userContextId };
if (history && history.count > 0) {
// Loop over the transaction linked list directly so we can get the
// persist property for each transaction.

View File

@ -13836,6 +13836,17 @@ nsDocShell::SetIsSignedPackage(const nsAString& aSignedPkg)
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetUserContextId(uint32_t* aUserContextId)
{
if (!aUserContextId) {
return NS_ERROR_FAILURE;
}
*aUserContextId = mUserContextId;
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::SetUserContextId(uint32_t aUserContextId)
{

View File

@ -232,7 +232,6 @@ public:
NS_IMETHOD GetUseRemoteTabs(bool*) override;
NS_IMETHOD SetRemoteTabs(bool) override;
NS_IMETHOD GetOriginAttributes(JS::MutableHandle<JS::Value>) override;
NS_IMETHOD SetUserContextId(uint32_t);
// Restores a cached presentation from history (mLSHE).
// This method swaps out the content viewer and simulates loads for

View File

@ -43,7 +43,7 @@ interface nsITabParent;
typedef unsigned long nsLoadFlags;
[scriptable, builtinclass, uuid(699f187c-958d-44bf-bd42-ecf725763f95)]
[scriptable, builtinclass, uuid(258a8a33-219f-42f8-8fa8-f8f2dcd2358b)]
interface nsIDocShell : nsIDocShellTreeItem
{
/**
@ -1096,4 +1096,9 @@ interface nsIDocShell : nsIDocShellTreeItem
* @see https://html.spec.whatwg.org/#dom-history-scroll-restoration
*/
attribute boolean currentScrollRestorationIsManual;
/**
* Sets/gets the user context ID for this docshell.
*/
attribute unsigned long userContextId;
};