mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 732708 - Part e: Pass nsDOMStorage* to InitAsSessionStorageFork; r=mayhemer
This commit is contained in:
parent
25be92c77d
commit
56504c3389
@ -1808,16 +1808,8 @@ already_AddRefed<nsIDOMStorage>
|
||||
nsDOMStorage2::Fork(const nsSubstring &aDocumentURI)
|
||||
{
|
||||
nsRefPtr<nsDOMStorage2> storage = new nsDOMStorage2();
|
||||
if (!storage)
|
||||
return nsnull;
|
||||
|
||||
nsresult rv = storage->InitAsSessionStorageFork(mPrincipal, aDocumentURI, mStorage);
|
||||
if (NS_FAILED(rv))
|
||||
return nsnull;
|
||||
|
||||
nsIDOMStorage* result = static_cast<nsIDOMStorage*>(storage.get());
|
||||
storage.forget();
|
||||
return result;
|
||||
storage->InitAsSessionStorageFork(mPrincipal, aDocumentURI, mStorage);
|
||||
return storage.forget();
|
||||
}
|
||||
|
||||
bool nsDOMStorage2::IsForkOf(nsIDOMStorage* aThat)
|
||||
@ -1829,14 +1821,12 @@ bool nsDOMStorage2::IsForkOf(nsIDOMStorage* aThat)
|
||||
return mStorage == storage->mStorage;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDOMStorage2::InitAsSessionStorageFork(nsIPrincipal *aPrincipal, const nsSubstring &aDocumentURI, nsIDOMStorageObsolete* aStorage)
|
||||
void
|
||||
nsDOMStorage2::InitAsSessionStorageFork(nsIPrincipal *aPrincipal, const nsSubstring &aDocumentURI, nsDOMStorage* aStorage)
|
||||
{
|
||||
mPrincipal = aPrincipal;
|
||||
mDocumentURI = aDocumentURI;
|
||||
mStorage = static_cast<nsDOMStorage*>(aStorage);
|
||||
|
||||
return NS_OK;
|
||||
mStorage = aStorage;
|
||||
}
|
||||
|
||||
nsTArray<nsString> *
|
||||
|
@ -447,9 +447,9 @@ public:
|
||||
void BroadcastChangeNotification(const nsSubstring &aKey,
|
||||
const nsSubstring &aOldValue,
|
||||
const nsSubstring &aNewValue);
|
||||
nsresult InitAsSessionStorageFork(nsIPrincipal *aPrincipal,
|
||||
const nsSubstring &aDocumentURI,
|
||||
nsIDOMStorageObsolete* aStorage);
|
||||
void InitAsSessionStorageFork(nsIPrincipal *aPrincipal,
|
||||
const nsSubstring &aDocumentURI,
|
||||
nsDOMStorage* aStorage);
|
||||
|
||||
private:
|
||||
// storages bound to an origin hold the principal to
|
||||
|
Loading…
Reference in New Issue
Block a user