2010-06-23 23:46:08 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
#include "IDBRequest.h"
|
|
|
|
|
2012-01-03 19:27:39 +04:00
|
|
|
#include "nsIJSContextStack.h"
|
2010-06-23 23:46:08 +04:00
|
|
|
#include "nsIScriptContext.h"
|
|
|
|
|
|
|
|
#include "nsComponentManagerUtils.h"
|
2011-10-03 23:11:31 +04:00
|
|
|
#include "nsDOMClassInfoID.h"
|
2010-08-27 00:57:25 +04:00
|
|
|
#include "nsDOMJSUtils.h"
|
2011-10-03 23:11:31 +04:00
|
|
|
#include "nsContentUtils.h"
|
2010-11-11 02:26:03 +03:00
|
|
|
#include "nsEventDispatcher.h"
|
2010-08-27 00:57:25 +04:00
|
|
|
#include "nsPIDOMWindow.h"
|
2010-06-23 23:46:08 +04:00
|
|
|
#include "nsStringGlue.h"
|
|
|
|
#include "nsThreadUtils.h"
|
2012-01-03 19:27:39 +04:00
|
|
|
#include "nsWrapperCacheInlines.h"
|
2010-06-23 23:46:08 +04:00
|
|
|
|
2011-01-07 09:21:36 +03:00
|
|
|
#include "AsyncConnectionHelper.h"
|
2010-06-23 23:46:08 +04:00
|
|
|
#include "IDBEvents.h"
|
2010-11-11 02:26:03 +03:00
|
|
|
#include "IDBTransaction.h"
|
2012-04-12 01:55:21 +04:00
|
|
|
#include "DOMError.h"
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
USING_INDEXEDDB_NAMESPACE
|
|
|
|
|
2010-11-11 02:26:03 +03:00
|
|
|
IDBRequest::IDBRequest()
|
2011-01-07 09:21:36 +03:00
|
|
|
: mResultVal(JSVAL_VOID),
|
2012-01-24 14:03:37 +04:00
|
|
|
mHaveResultOrErrorCode(false),
|
|
|
|
mRooted(false)
|
2010-11-11 02:26:03 +03:00
|
|
|
{
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
2010-11-11 02:26:03 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
IDBRequest::~IDBRequest()
|
|
|
|
{
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
UnrootResultVal();
|
2010-11-11 02:26:03 +03:00
|
|
|
}
|
|
|
|
|
2010-09-10 02:15:38 +04:00
|
|
|
// static
|
2010-08-27 00:57:25 +04:00
|
|
|
already_AddRefed<IDBRequest>
|
2010-09-10 02:15:38 +04:00
|
|
|
IDBRequest::Create(nsISupports* aSource,
|
2012-01-24 14:03:37 +04:00
|
|
|
IDBWrapperCache* aOwnerCache,
|
2010-11-11 02:26:03 +03:00
|
|
|
IDBTransaction* aTransaction)
|
2010-06-23 23:46:08 +04:00
|
|
|
{
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
2010-08-27 00:57:25 +04:00
|
|
|
nsRefPtr<IDBRequest> request(new IDBRequest());
|
|
|
|
|
2010-09-10 02:15:38 +04:00
|
|
|
request->mSource = aSource;
|
2010-11-11 02:26:03 +03:00
|
|
|
request->mTransaction = aTransaction;
|
2012-03-13 04:56:07 +04:00
|
|
|
request->BindToOwner(aOwnerCache);
|
2012-02-27 20:52:19 +04:00
|
|
|
if (!request->SetScriptOwner(aOwnerCache->GetScriptOwner())) {
|
|
|
|
return nsnull;
|
|
|
|
}
|
2010-08-27 00:57:25 +04:00
|
|
|
|
|
|
|
return request.forget();
|
2010-06-23 23:46:08 +04:00
|
|
|
}
|
|
|
|
|
2011-01-07 09:21:36 +03:00
|
|
|
void
|
|
|
|
IDBRequest::Reset()
|
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
mResultVal = JSVAL_VOID;
|
|
|
|
mHaveResultOrErrorCode = false;
|
2012-04-12 01:55:21 +04:00
|
|
|
mError = nsnull;
|
2012-01-24 14:03:37 +04:00
|
|
|
UnrootResultVal();
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
2011-01-27 04:53:02 +03:00
|
|
|
nsresult
|
2011-10-20 20:10:56 +04:00
|
|
|
IDBRequest::NotifyHelperCompleted(HelperBase* aHelper)
|
2011-01-07 09:21:36 +03:00
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
2011-01-27 04:53:02 +03:00
|
|
|
NS_ASSERTION(!mHaveResultOrErrorCode, "Already called!");
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_ASSERTION(!PreservingWrapper(), "Already rooted?!");
|
2011-01-27 04:53:02 +03:00
|
|
|
NS_ASSERTION(JSVAL_IS_VOID(mResultVal), "Should be undefined!");
|
|
|
|
|
|
|
|
// See if our window is still valid. If not then we're going to pretend that
|
|
|
|
// we never completed.
|
|
|
|
if (NS_FAILED(CheckInnerWindowCorrectness())) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
mHaveResultOrErrorCode = true;
|
|
|
|
|
|
|
|
nsresult rv = aHelper->GetResultCode();
|
|
|
|
|
|
|
|
// If the request failed then set the error code and return.
|
|
|
|
if (NS_FAILED(rv)) {
|
2012-04-12 01:55:21 +04:00
|
|
|
mError = DOMError::CreateForNSResult(rv);
|
2011-01-27 04:53:02 +03:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Otherwise we need to get the result from the helper.
|
2012-01-24 14:03:37 +04:00
|
|
|
JSContext* cx;
|
2012-02-27 20:52:19 +04:00
|
|
|
if (GetScriptOwner()) {
|
2012-01-23 20:18:14 +04:00
|
|
|
nsIThreadJSContextStack* cxStack = nsContentUtils::ThreadJSContextStack();
|
|
|
|
NS_ASSERTION(cxStack, "Failed to get thread context stack!");
|
|
|
|
|
2012-05-05 13:00:05 +04:00
|
|
|
cx = cxStack->GetSafeJSContext();
|
|
|
|
if (!cx) {
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_WARNING("Failed to get safe JSContext!");
|
|
|
|
rv = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
|
2012-04-12 01:55:21 +04:00
|
|
|
mError = DOMError::CreateForNSResult(rv);
|
2012-01-24 14:03:37 +04:00
|
|
|
return rv;
|
|
|
|
}
|
2012-01-23 20:18:14 +04:00
|
|
|
}
|
2012-01-24 14:03:37 +04:00
|
|
|
else {
|
2012-03-13 04:56:07 +04:00
|
|
|
nsIScriptContext* sc = GetContextForEventHandlers(&rv);
|
|
|
|
NS_ENSURE_STATE(sc);
|
|
|
|
cx = sc->GetNativeContext();
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_ASSERTION(cx, "Failed to get a context!");
|
|
|
|
}
|
|
|
|
|
|
|
|
JSObject* global = GetParentObject();
|
|
|
|
NS_ASSERTION(global, "This should never be null!");
|
2011-01-27 04:53:02 +03:00
|
|
|
|
|
|
|
JSAutoRequest ar(cx);
|
|
|
|
JSAutoEnterCompartment ac;
|
2012-01-24 14:03:37 +04:00
|
|
|
if (ac.enter(cx, global)) {
|
2011-01-27 04:53:02 +03:00
|
|
|
RootResultVal();
|
|
|
|
|
|
|
|
rv = aHelper->GetSuccessResult(cx, &mResultVal);
|
2012-01-24 14:03:37 +04:00
|
|
|
if (NS_FAILED(rv)) {
|
2011-01-27 04:53:02 +03:00
|
|
|
NS_WARNING("GetSuccessResult failed!");
|
|
|
|
}
|
|
|
|
}
|
2012-01-24 14:03:37 +04:00
|
|
|
else {
|
|
|
|
NS_WARNING("Failed to enter correct compartment!");
|
|
|
|
rv = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
|
|
|
|
}
|
2011-01-07 09:21:36 +03:00
|
|
|
|
2011-01-27 04:53:02 +03:00
|
|
|
if (NS_SUCCEEDED(rv)) {
|
2012-04-12 01:55:21 +04:00
|
|
|
mError = nsnull;
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
else {
|
2012-04-12 01:55:21 +04:00
|
|
|
mError = DOMError::CreateForNSResult(rv);
|
2011-01-27 04:53:02 +03:00
|
|
|
mResultVal = JSVAL_VOID;
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
2011-01-27 04:53:02 +03:00
|
|
|
|
|
|
|
return rv;
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
2012-04-12 01:55:21 +04:00
|
|
|
void
|
|
|
|
IDBRequest::SetError(nsresult rv)
|
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_FAILED(rv), "Er, what?");
|
|
|
|
NS_ASSERTION(!mError, "Already have an error?");
|
|
|
|
|
|
|
|
mError = DOMError::CreateForNSResult(rv);
|
|
|
|
}
|
|
|
|
|
2011-01-07 09:21:36 +03:00
|
|
|
void
|
2012-01-24 14:03:37 +04:00
|
|
|
IDBRequest::RootResultValInternal()
|
2011-01-07 09:21:36 +03:00
|
|
|
{
|
2012-01-23 20:18:14 +04:00
|
|
|
NS_HOLD_JS_OBJECTS(this, IDBRequest);
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-01-24 14:03:37 +04:00
|
|
|
IDBRequest::UnrootResultValInternal()
|
2011-01-07 09:21:36 +03:00
|
|
|
{
|
2012-01-23 20:18:14 +04:00
|
|
|
NS_DROP_JS_OBJECTS(this, IDBRequest);
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
NS_IMETHODIMP
|
2012-03-13 08:44:45 +04:00
|
|
|
IDBRequest::GetReadyState(nsAString& aReadyState)
|
2010-06-23 23:46:08 +04:00
|
|
|
{
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
2012-03-13 08:44:45 +04:00
|
|
|
if (mHaveResultOrErrorCode) {
|
|
|
|
aReadyState.AssignLiteral("done");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
aReadyState.AssignLiteral("pending");
|
|
|
|
}
|
2011-10-20 20:10:56 +04:00
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2010-12-10 05:14:09 +03:00
|
|
|
NS_IMETHODIMP
|
|
|
|
IDBRequest::GetSource(nsISupports** aSource)
|
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
|
|
|
nsCOMPtr<nsISupports> source(mSource);
|
|
|
|
source.forget(aSource);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_IMETHODIMP
|
|
|
|
IDBRequest::GetTransaction(nsIIDBTransaction** aTransaction)
|
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
|
|
|
nsCOMPtr<nsIIDBTransaction> transaction(mTransaction);
|
|
|
|
transaction.forget(aTransaction);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2011-01-27 04:53:02 +03:00
|
|
|
IDBRequest::GetResult(jsval* aResult)
|
2011-01-07 09:21:36 +03:00
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
|
|
|
if (!mHaveResultOrErrorCode) {
|
2011-01-27 04:53:02 +03:00
|
|
|
// XXX Need a real error code here.
|
|
|
|
return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
*aResult = mResultVal;
|
2011-01-27 04:53:02 +03:00
|
|
|
return NS_OK;
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-04-12 01:55:21 +04:00
|
|
|
IDBRequest::GetError(nsIDOMDOMError** aError)
|
2011-01-07 09:21:36 +03:00
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
2011-01-27 04:53:02 +03:00
|
|
|
if (!mHaveResultOrErrorCode) {
|
2011-01-07 09:21:36 +03:00
|
|
|
// XXX Need a real error code here.
|
|
|
|
return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
|
|
|
|
}
|
|
|
|
|
2012-04-12 01:55:21 +04:00
|
|
|
NS_IF_ADDREF(*aError = mError);
|
2011-01-07 09:21:36 +03:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(IDBRequest)
|
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBRequest, IDBWrapperCache)
|
|
|
|
// Don't need NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS because
|
|
|
|
// nsDOMEventTargetHelper does it for us.
|
|
|
|
NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(success)
|
|
|
|
NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(error)
|
2010-09-14 02:32:56 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mSource)
|
2011-05-25 12:46:51 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR_AMBIGUOUS(mTransaction,
|
|
|
|
nsPIDOMEventTarget)
|
2010-06-23 23:46:08 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IDBRequest, IDBWrapperCache)
|
|
|
|
tmp->mResultVal = JSVAL_VOID;
|
|
|
|
tmp->UnrootResultVal();
|
|
|
|
NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(success)
|
|
|
|
NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(error)
|
2010-09-14 02:32:56 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mSource)
|
2011-05-25 12:46:51 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mTransaction)
|
2010-06-23 23:46:08 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IDBRequest, IDBWrapperCache)
|
|
|
|
// Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because
|
|
|
|
// nsDOMEventTargetHelper does it for us.
|
2011-01-07 09:21:36 +03:00
|
|
|
if (JSVAL_IS_GCTHING(tmp->mResultVal)) {
|
|
|
|
void *gcThing = JSVAL_TO_GCTHING(tmp->mResultVal);
|
2011-02-02 18:30:03 +03:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_CALLBACK(gcThing, "mResultVal")
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
|
|
|
|
2010-06-23 23:46:08 +04:00
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IDBRequest)
|
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIIDBRequest)
|
|
|
|
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBRequest)
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_INTERFACE_MAP_END_INHERITING(IDBWrapperCache)
|
2010-06-23 23:46:08 +04:00
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_IMPL_ADDREF_INHERITED(IDBRequest, IDBWrapperCache)
|
|
|
|
NS_IMPL_RELEASE_INHERITED(IDBRequest, IDBWrapperCache)
|
2010-06-23 23:46:08 +04:00
|
|
|
|
|
|
|
DOMCI_DATA(IDBRequest, IDBRequest)
|
2010-10-19 21:58:52 +04:00
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_IMPL_EVENT_HANDLER(IDBRequest, success);
|
|
|
|
NS_IMPL_EVENT_HANDLER(IDBRequest, error);
|
|
|
|
|
2010-11-11 02:26:03 +03:00
|
|
|
nsresult
|
|
|
|
IDBRequest::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
|
|
|
{
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
2011-10-17 18:59:28 +04:00
|
|
|
aVisitor.mCanHandle = true;
|
2010-11-11 02:26:03 +03:00
|
|
|
aVisitor.mParentTarget = mTransaction;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
IDBOpenDBRequest::~IDBOpenDBRequest()
|
2011-01-07 09:21:36 +03:00
|
|
|
{
|
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
|
|
|
|
2012-01-24 14:03:37 +04:00
|
|
|
UnrootResultVal();
|
2011-01-07 09:21:36 +03:00
|
|
|
}
|
|
|
|
|
2010-10-19 21:58:52 +04:00
|
|
|
// static
|
2011-10-20 20:10:56 +04:00
|
|
|
already_AddRefed<IDBOpenDBRequest>
|
2012-03-13 04:56:07 +04:00
|
|
|
IDBOpenDBRequest::Create(nsPIDOMWindow* aOwner,
|
2012-01-24 14:03:37 +04:00
|
|
|
JSObject* aScriptOwner)
|
2010-10-19 21:58:52 +04:00
|
|
|
{
|
2011-01-07 09:21:36 +03:00
|
|
|
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
2011-10-20 20:10:56 +04:00
|
|
|
nsRefPtr<IDBOpenDBRequest> request(new IDBOpenDBRequest());
|
2010-10-19 21:58:52 +04:00
|
|
|
|
2012-03-13 04:56:07 +04:00
|
|
|
request->BindToOwner(aOwner);
|
2012-02-27 20:52:19 +04:00
|
|
|
if (!request->SetScriptOwner(aScriptOwner)) {
|
|
|
|
return nsnull;
|
|
|
|
}
|
2010-10-19 21:58:52 +04:00
|
|
|
|
|
|
|
return request.forget();
|
|
|
|
}
|
|
|
|
|
2011-01-07 09:21:36 +03:00
|
|
|
void
|
2011-10-20 20:10:56 +04:00
|
|
|
IDBOpenDBRequest::SetTransaction(IDBTransaction* aTransaction)
|
|
|
|
{
|
|
|
|
mTransaction = aTransaction;
|
|
|
|
}
|
|
|
|
|
2012-01-23 20:18:14 +04:00
|
|
|
void
|
2012-01-24 14:03:37 +04:00
|
|
|
IDBOpenDBRequest::RootResultValInternal()
|
2012-01-23 20:18:14 +04:00
|
|
|
{
|
|
|
|
NS_HOLD_JS_OBJECTS(this, IDBOpenDBRequest);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-01-24 14:03:37 +04:00
|
|
|
IDBOpenDBRequest::UnrootResultValInternal()
|
2012-01-23 20:18:14 +04:00
|
|
|
{
|
|
|
|
NS_DROP_JS_OBJECTS(this, IDBOpenDBRequest);
|
|
|
|
}
|
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(IDBOpenDBRequest)
|
2010-10-19 21:58:52 +04:00
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBOpenDBRequest,
|
2010-10-19 21:58:52 +04:00
|
|
|
IDBRequest)
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(upgradeneeded)
|
|
|
|
NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(blocked)
|
2010-10-19 21:58:52 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IDBOpenDBRequest,
|
2010-10-19 21:58:52 +04:00
|
|
|
IDBRequest)
|
2012-01-24 14:03:37 +04:00
|
|
|
NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(upgradeneeded)
|
|
|
|
NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(blocked)
|
2010-10-19 21:58:52 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IDBOpenDBRequest)
|
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIIDBOpenDBRequest)
|
|
|
|
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBOpenDBRequest)
|
2010-10-19 21:58:52 +04:00
|
|
|
NS_INTERFACE_MAP_END_INHERITING(IDBRequest)
|
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
NS_IMPL_ADDREF_INHERITED(IDBOpenDBRequest, IDBRequest)
|
|
|
|
NS_IMPL_RELEASE_INHERITED(IDBOpenDBRequest, IDBRequest)
|
2010-10-19 21:58:52 +04:00
|
|
|
|
2011-10-20 20:10:56 +04:00
|
|
|
DOMCI_DATA(IDBOpenDBRequest, IDBOpenDBRequest)
|
2012-01-24 14:03:37 +04:00
|
|
|
|
|
|
|
NS_IMPL_EVENT_HANDLER(IDBOpenDBRequest, blocked);
|
|
|
|
NS_IMPL_EVENT_HANDLER(IDBOpenDBRequest, upgradeneeded);
|