mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 23:30:46 +00:00

OriginOperationBase currently uses manual dispatching of runnables controlled by a state machine which is not that easy to understand and requires many helper methods. Additionally, OriginOperationBase can be destroyed off the PBackground thread which makes it hard to hold PBackground only objects. Changes done in this patch: - changed OriginOperationBase to not inherit from Runnable - changed OriginOperationBase to be created and destroyed on the PBackground thread only - replaced the manual dispatching of runnables with a MozPromise chain - removed OriginOperationBase::Dispatch - changed pure virtual method OriginOperationBase::Open to return a MozPromise - changed FinalizeOriginEvictionOp to be always created on the PBackground thread only (as a consequence of similar changes done to OriginOperationBase) Differential Revision: https://phabricator.services.mozilla.com/D185641
37 lines
1.0 KiB
C
37 lines
1.0 KiB
C
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
|
|
#ifndef DOM_QUOTA_CONFIG_H_
|
|
#define DOM_QUOTA_CONFIG_H_
|
|
|
|
#ifdef DEBUG
|
|
# define QM_LOG_ERROR_TO_CONSOLE_ENABLED
|
|
#endif
|
|
|
|
#define QM_LOG_ERROR_TO_BROWSER_CONSOLE_ENABLED
|
|
|
|
#if defined(EARLY_BETA_OR_EARLIER) || defined(DEBUG)
|
|
# define QM_LOG_ERROR_TO_TELEMETRY_ENABLED
|
|
#endif
|
|
|
|
#if defined(QM_LOG_ERROR_TO_CONSOLE_ENABLED) || \
|
|
defined(QM_LOG_ERROR_TO_BROWSER_CONSOLE_ENABLED) || \
|
|
defined(QM_LOG_ERROR_TO_TELEMETRY_ENABLED)
|
|
# define QM_LOG_ERROR_ENABLED
|
|
#endif
|
|
|
|
#if defined(EARLY_BETA_OR_EARLIER) || defined(DEBUG)
|
|
# define QM_ERROR_STACKS_ENABLED
|
|
#endif
|
|
|
|
#define QM_SCOPED_LOG_EXTRA_INFO_ENABLED
|
|
|
|
#ifndef RELEASE_OR_BETA
|
|
# define QM_COLLECTING_OPERATION_TELEMETRY
|
|
#endif
|
|
|
|
#endif // DOM_QUOTA_CONFIG_H_
|