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)
|
nsDOMStorage2::Fork(const nsSubstring &aDocumentURI)
|
||||||
{
|
{
|
||||||
nsRefPtr<nsDOMStorage2> storage = new nsDOMStorage2();
|
nsRefPtr<nsDOMStorage2> storage = new nsDOMStorage2();
|
||||||
if (!storage)
|
storage->InitAsSessionStorageFork(mPrincipal, aDocumentURI, mStorage);
|
||||||
return nsnull;
|
return storage.forget();
|
||||||
|
|
||||||
nsresult rv = storage->InitAsSessionStorageFork(mPrincipal, aDocumentURI, mStorage);
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return nsnull;
|
|
||||||
|
|
||||||
nsIDOMStorage* result = static_cast<nsIDOMStorage*>(storage.get());
|
|
||||||
storage.forget();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsDOMStorage2::IsForkOf(nsIDOMStorage* aThat)
|
bool nsDOMStorage2::IsForkOf(nsIDOMStorage* aThat)
|
||||||
@ -1829,14 +1821,12 @@ bool nsDOMStorage2::IsForkOf(nsIDOMStorage* aThat)
|
|||||||
return mStorage == storage->mStorage;
|
return mStorage == storage->mStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
void
|
||||||
nsDOMStorage2::InitAsSessionStorageFork(nsIPrincipal *aPrincipal, const nsSubstring &aDocumentURI, nsIDOMStorageObsolete* aStorage)
|
nsDOMStorage2::InitAsSessionStorageFork(nsIPrincipal *aPrincipal, const nsSubstring &aDocumentURI, nsDOMStorage* aStorage)
|
||||||
{
|
{
|
||||||
mPrincipal = aPrincipal;
|
mPrincipal = aPrincipal;
|
||||||
mDocumentURI = aDocumentURI;
|
mDocumentURI = aDocumentURI;
|
||||||
mStorage = static_cast<nsDOMStorage*>(aStorage);
|
mStorage = aStorage;
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTArray<nsString> *
|
nsTArray<nsString> *
|
||||||
|
@ -447,9 +447,9 @@ public:
|
|||||||
void BroadcastChangeNotification(const nsSubstring &aKey,
|
void BroadcastChangeNotification(const nsSubstring &aKey,
|
||||||
const nsSubstring &aOldValue,
|
const nsSubstring &aOldValue,
|
||||||
const nsSubstring &aNewValue);
|
const nsSubstring &aNewValue);
|
||||||
nsresult InitAsSessionStorageFork(nsIPrincipal *aPrincipal,
|
void InitAsSessionStorageFork(nsIPrincipal *aPrincipal,
|
||||||
const nsSubstring &aDocumentURI,
|
const nsSubstring &aDocumentURI,
|
||||||
nsIDOMStorageObsolete* aStorage);
|
nsDOMStorage* aStorage);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// storages bound to an origin hold the principal to
|
// storages bound to an origin hold the principal to
|
||||||
|
Loading…
Reference in New Issue
Block a user