mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 5b65bf834d5f (bug 879475)
This commit is contained in:
parent
70282728ec
commit
e89816068d
@ -157,7 +157,7 @@ IDBFactory::Create(nsPIDOMWindow* aWindow,
|
|||||||
TabChild* tabChild = TabChild::GetFrom(aWindow);
|
TabChild* tabChild = TabChild::GetFrom(aWindow);
|
||||||
IDB_ENSURE_TRUE(tabChild, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
IDB_ENSURE_TRUE(tabChild, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
||||||
|
|
||||||
IndexedDBChild* actor = new IndexedDBChild(tabChild, origin);
|
IndexedDBChild* actor = new IndexedDBChild(origin);
|
||||||
|
|
||||||
bool allowed;
|
bool allowed;
|
||||||
tabChild->SendPIndexedDBConstructor(actor, group, origin, &allowed);
|
tabChild->SendPIndexedDBConstructor(actor, group, origin, &allowed);
|
||||||
@ -216,7 +216,7 @@ IDBFactory::Create(JSContext* aCx,
|
|||||||
ContentChild* contentChild = ContentChild::GetSingleton();
|
ContentChild* contentChild = ContentChild::GetSingleton();
|
||||||
IDB_ENSURE_TRUE(contentChild, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
IDB_ENSURE_TRUE(contentChild, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
||||||
|
|
||||||
IndexedDBChild* actor = new IndexedDBChild(contentChild, origin);
|
IndexedDBChild* actor = new IndexedDBChild(origin);
|
||||||
|
|
||||||
contentChild->SendPIndexedDBConstructor(actor);
|
contentChild->SendPIndexedDBConstructor(actor);
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "mozilla/dom/nsIContentParent.h"
|
#include "mozilla/dom/nsIContentParent.h"
|
||||||
#include "mozilla/dom/FileHandleBinding.h"
|
#include "mozilla/dom/FileHandleBinding.h"
|
||||||
#include "mozilla/dom/StructuredCloneTags.h"
|
#include "mozilla/dom/StructuredCloneTags.h"
|
||||||
#include "mozilla/dom/TabChild.h"
|
|
||||||
#include "mozilla/dom/ipc/Blob.h"
|
#include "mozilla/dom/ipc/Blob.h"
|
||||||
#include "mozilla/dom/quota/FileStreams.h"
|
#include "mozilla/dom/quota/FileStreams.h"
|
||||||
#include "mozilla/Endian.h"
|
#include "mozilla/Endian.h"
|
||||||
@ -112,8 +111,7 @@ public:
|
|||||||
virtual nsresult Dispatch(nsIEventTarget* aDatabaseThread) MOZ_OVERRIDE;
|
virtual nsresult Dispatch(nsIEventTarget* aDatabaseThread) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) = 0;
|
||||||
nsIContentChild* aBlobCreator) = 0;
|
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
UnpackResponseFromParentProcess(const ResponseValue& aResponseValue) = 0;
|
UnpackResponseFromParentProcess(const ResponseValue& aResponseValue) = 0;
|
||||||
@ -186,8 +184,7 @@ public:
|
|||||||
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -231,8 +228,7 @@ public:
|
|||||||
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -267,8 +263,7 @@ public:
|
|||||||
JS::MutableHandle<JS::Value> aVal) MOZ_OVERRIDE;
|
JS::MutableHandle<JS::Value> aVal) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -291,8 +286,7 @@ public:
|
|||||||
MOZ_OVERRIDE;
|
MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -328,8 +322,7 @@ public:
|
|||||||
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -380,8 +373,7 @@ public:
|
|||||||
ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -488,8 +480,7 @@ public:
|
|||||||
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -531,8 +522,7 @@ public:
|
|||||||
ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -570,8 +560,7 @@ public:
|
|||||||
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
|
||||||
nsIContentChild* aBlobCreator) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual ChildProcessSendResult
|
virtual ChildProcessSendResult
|
||||||
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
|
||||||
@ -3051,22 +3040,7 @@ ObjectStoreHelper::Dispatch(nsIEventTarget* aDatabaseThread)
|
|||||||
NS_ASSERTION(objectStoreActor, "Must have an actor here!");
|
NS_ASSERTION(objectStoreActor, "Must have an actor here!");
|
||||||
|
|
||||||
ObjectStoreRequestParams params;
|
ObjectStoreRequestParams params;
|
||||||
|
nsresult rv = PackArgumentsForParentProcess(params);
|
||||||
// Our "parent" process may be either the root process or another content
|
|
||||||
// process if this indexedDB is managed by a PBrowser that is managed by a
|
|
||||||
// PContentBridge. We need to find which one it is so that we can create
|
|
||||||
// PBlobs that are managed by the right nsIContentChild.
|
|
||||||
IndexedDBChild* rootActor =
|
|
||||||
static_cast<IndexedDBChild*>(objectStoreActor->Manager()->
|
|
||||||
Manager()->Manager());
|
|
||||||
nsIContentChild* blobCreator;
|
|
||||||
if (rootActor->GetManagerContent()) {
|
|
||||||
blobCreator = rootActor->GetManagerContent();
|
|
||||||
} else {
|
|
||||||
blobCreator = rootActor->GetManagerTab()->Manager();
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult rv = PackArgumentsForParentProcess(params, blobCreator);
|
|
||||||
IDB_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
IDB_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
||||||
|
|
||||||
NoDispatchEventTarget target;
|
NoDispatchEventTarget target;
|
||||||
@ -3346,12 +3320,10 @@ AddHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
AddHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
AddHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
|
||||||
nsIContentChild* aBlobCreator)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("AddHelper", "PackArgumentsForParentProcess",
|
PROFILER_MAIN_THREAD_LABEL("AddHelper", "PackArgumentsForParentProcess",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -3369,7 +3341,8 @@ AddHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
|||||||
InfallibleTArray<PBlobChild*>& blobsChild = commonParams.blobsChild();
|
InfallibleTArray<PBlobChild*>& blobsChild = commonParams.blobsChild();
|
||||||
blobsChild.SetCapacity(fileCount);
|
blobsChild.SetCapacity(fileCount);
|
||||||
|
|
||||||
NS_ASSERTION(aBlobCreator, "This should never be null!");
|
ContentChild* contentChild = ContentChild::GetSingleton();
|
||||||
|
NS_ASSERTION(contentChild, "This should never be null!");
|
||||||
|
|
||||||
for (uint32_t index = 0; index < fileCount; index++) {
|
for (uint32_t index = 0; index < fileCount; index++) {
|
||||||
const StructuredCloneFile& file = files[index];
|
const StructuredCloneFile& file = files[index];
|
||||||
@ -3378,7 +3351,7 @@ AddHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
|||||||
NS_ASSERTION(!file.mFileInfo, "This is not yet supported!");
|
NS_ASSERTION(!file.mFileInfo, "This is not yet supported!");
|
||||||
|
|
||||||
BlobChild* actor =
|
BlobChild* actor =
|
||||||
aBlobCreator->GetOrCreateActorForBlob(file.mFile);
|
contentChild->GetOrCreateActorForBlob(file.mFile);
|
||||||
if (!actor) {
|
if (!actor) {
|
||||||
IDB_REPORT_INTERNAL_ERR();
|
IDB_REPORT_INTERNAL_ERR();
|
||||||
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
|
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
|
||||||
@ -3514,13 +3487,11 @@ GetHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
GetHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
GetHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
|
||||||
nsIContentChild* aBlobCreator)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(mKeyRange, "This should never be null!");
|
NS_ASSERTION(mKeyRange, "This should never be null!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("GetHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
PROFILER_MAIN_THREAD_LABEL("GetHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -3654,13 +3625,11 @@ DeleteHelper::GetSuccessResult(JSContext* aCx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
DeleteHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
DeleteHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
|
||||||
nsIContentChild* aBlobCreator)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(mKeyRange, "This should never be null!");
|
NS_ASSERTION(mKeyRange, "This should never be null!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("DeleteHelper", "PackArgumentsForParentProcess",
|
PROFILER_MAIN_THREAD_LABEL("DeleteHelper", "PackArgumentsForParentProcess",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -3739,12 +3708,10 @@ ClearHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
ClearHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
ClearHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
|
||||||
nsIContentChild* aBlobCreator)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("ClearHelper", "PackArgumentsForParentProcess",
|
PROFILER_MAIN_THREAD_LABEL("ClearHelper", "PackArgumentsForParentProcess",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -3975,12 +3942,11 @@ OpenCursorHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
OpenCursorHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
OpenCursorHelper::PackArgumentsForParentProcess(
|
||||||
nsIContentChild* aBlobCreator)
|
ObjectStoreRequestParams& aParams)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("OpenCursorHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
PROFILER_MAIN_THREAD_LABEL("OpenCursorHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -4299,12 +4265,11 @@ OpenKeyCursorHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
OpenKeyCursorHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
OpenKeyCursorHelper::PackArgumentsForParentProcess(
|
||||||
nsIContentChild* aBlobCreator)
|
ObjectStoreRequestParams& aParams)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
|
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
PROFILER_MAIN_THREAD_LABEL("OpenKeyCursorHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -4740,12 +4705,10 @@ GetAllHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
GetAllHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
GetAllHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
|
||||||
nsIContentChild* aBlobCreator)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("GetAllHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
PROFILER_MAIN_THREAD_LABEL("GetAllHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -4988,12 +4951,11 @@ GetAllKeysHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
GetAllKeysHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
GetAllKeysHelper::PackArgumentsForParentProcess(
|
||||||
nsIContentChild* aBlobCreator)
|
ObjectStoreRequestParams& aParams)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
|
MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
PROFILER_MAIN_THREAD_LABEL("GetAllKeysHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
@ -5141,12 +5103,10 @@ CountHelper::ReleaseMainThreadObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
CountHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams,
|
CountHelper::PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams)
|
||||||
nsIContentChild* aBlobCreator)
|
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||||
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
|
||||||
NS_ASSERTION(aBlobCreator, "Must have a valid creator!");
|
|
||||||
|
|
||||||
PROFILER_MAIN_THREAD_LABEL("CountHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
PROFILER_MAIN_THREAD_LABEL("CountHelper", "PackArgumentsForParentProcess [IDBObjectStore.cpp]",
|
||||||
js::ProfileEntry::Category::STORAGE);
|
js::ProfileEntry::Category::STORAGE);
|
||||||
|
@ -159,31 +159,12 @@ public:
|
|||||||
* IndexedDBChild
|
* IndexedDBChild
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
IndexedDBChild::IndexedDBChild(ContentChild* aContentChild,
|
IndexedDBChild::IndexedDBChild(const nsCString& aASCIIOrigin)
|
||||||
const nsCString& aASCIIOrigin)
|
: mFactory(nullptr), mASCIIOrigin(aASCIIOrigin)
|
||||||
: mFactory(nullptr)
|
|
||||||
, mManagerContent(aContentChild)
|
|
||||||
, mManagerTab(nullptr)
|
|
||||||
, mASCIIOrigin(aASCIIOrigin)
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
, mDisconnected(false)
|
, mDisconnected(false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aContentChild);
|
|
||||||
MOZ_COUNT_CTOR(IndexedDBChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
IndexedDBChild::IndexedDBChild(TabChild* aTabChild,
|
|
||||||
const nsCString& aASCIIOrigin)
|
|
||||||
: mFactory(nullptr)
|
|
||||||
, mManagerContent(nullptr)
|
|
||||||
, mManagerTab(aTabChild)
|
|
||||||
, mASCIIOrigin(aASCIIOrigin)
|
|
||||||
#ifdef DEBUG
|
|
||||||
, mDisconnected(false)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(aTabChild);
|
|
||||||
MOZ_COUNT_CTOR(IndexedDBChild);
|
MOZ_COUNT_CTOR(IndexedDBChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,13 +19,6 @@
|
|||||||
#include "mozilla/dom/indexedDB/PIndexedDBRequestChild.h"
|
#include "mozilla/dom/indexedDB/PIndexedDBRequestChild.h"
|
||||||
#include "mozilla/dom/indexedDB/PIndexedDBTransactionChild.h"
|
#include "mozilla/dom/indexedDB/PIndexedDBTransactionChild.h"
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
namespace dom {
|
|
||||||
class ContentChild;
|
|
||||||
class TabChild;
|
|
||||||
} // dom
|
|
||||||
} // mozilla
|
|
||||||
|
|
||||||
BEGIN_INDEXEDDB_NAMESPACE
|
BEGIN_INDEXEDDB_NAMESPACE
|
||||||
|
|
||||||
class AsyncConnectionHelper;
|
class AsyncConnectionHelper;
|
||||||
@ -43,9 +36,6 @@ class IDBTransactionListener;
|
|||||||
class IndexedDBChild : public PIndexedDBChild
|
class IndexedDBChild : public PIndexedDBChild
|
||||||
{
|
{
|
||||||
IDBFactory* mFactory;
|
IDBFactory* mFactory;
|
||||||
ContentChild* mManagerContent;
|
|
||||||
TabChild* mManagerTab;
|
|
||||||
|
|
||||||
nsCString mASCIIOrigin;
|
nsCString mASCIIOrigin;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -53,8 +43,7 @@ class IndexedDBChild : public PIndexedDBChild
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IndexedDBChild(ContentChild* aContentChild, const nsCString& aASCIIOrigin);
|
IndexedDBChild(const nsCString& aASCIIOrigin);
|
||||||
IndexedDBChild(TabChild* aTabChild, const nsCString& aASCIIOrigin);
|
|
||||||
virtual ~IndexedDBChild();
|
virtual ~IndexedDBChild();
|
||||||
|
|
||||||
const nsCString&
|
const nsCString&
|
||||||
@ -63,18 +52,6 @@ public:
|
|||||||
return mASCIIOrigin;
|
return mASCIIOrigin;
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentChild*
|
|
||||||
GetManagerContent() const
|
|
||||||
{
|
|
||||||
return mManagerContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
TabChild*
|
|
||||||
GetManagerTab() const
|
|
||||||
{
|
|
||||||
return mManagerTab;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SetFactory(IDBFactory* aFactory);
|
SetFactory(IDBFactory* aFactory);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user