mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1237081
- remove the getter of userContextId from nsIDocShell, r=smaug
This commit is contained in:
parent
9242692238
commit
54e1406a46
@ -64,10 +64,12 @@ var SessionHistoryInternal = {
|
||||
* The docShell that owns the session history.
|
||||
*/
|
||||
collect: function (docShell) {
|
||||
let data = {entries: [], userContextId: docShell.userContextId };
|
||||
let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
|
||||
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.
|
||||
@ -254,7 +256,7 @@ var SessionHistoryInternal = {
|
||||
let history = webNavigation.sessionHistory;
|
||||
|
||||
if ("userContextId" in tabData) {
|
||||
docShell.userContextId = tabData.userContextId;
|
||||
docShell.setUserContextId(tabData.userContextId);
|
||||
}
|
||||
|
||||
if (history.count > 0) {
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
function retrieveUserContextId(browser) {
|
||||
return ContentTask.spawn(browser, null, function* () {
|
||||
return docShell.userContextId;
|
||||
let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
|
||||
return loadContext.originAttributes.userContextId;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -13836,17 +13836,6 @@ 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)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ interface nsITabParent;
|
||||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
[scriptable, builtinclass, uuid(258a8a33-219f-42f8-8fa8-f8f2dcd2358b)]
|
||||
[scriptable, builtinclass, uuid(98358234-3936-4b95-b051-fcda4e55b52d)]
|
||||
interface nsIDocShell : nsIDocShellTreeItem
|
||||
{
|
||||
/**
|
||||
@ -1097,8 +1097,8 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
attribute boolean currentScrollRestorationIsManual;
|
||||
|
||||
/**
|
||||
* Sets/gets the user context ID for this docshell.
|
||||
/*
|
||||
* Sets the user context ID for this docshell.
|
||||
*/
|
||||
attribute unsigned long userContextId;
|
||||
void setUserContextId(in unsigned long aUserContextId);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user