gecko-dev/xpcom/base/components.conf
Toshihito Kikuchi 02f0a6ddd5 Bug 1701368 - Part5: Convert nsAvailableMemoryWatcher to an XPCOM object. r=gsvelto
This patch introduces an XPCOM object which is represented by the single instance of
`nsAvailableMemoryWatcherBase` so that `nsAvailableMemoryWatcher` can synchronously
access `TabUnloader`.

We currently implement a watcher class for Windows only.  For other platforms, what
we need to do is to define a class inherinting `nsAvailableMemoryWatcherBase` and
a simple factory method `CreateAvailableMemoryWatcher()` returning an instance of
that class.

Differential Revision: https://phabricator.services.mozilla.com/D118393
2021-07-06 22:30:59 +00:00

38 lines
1.5 KiB
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
Classes = [
{
'cid': '{cb6cdb94-e417-4601-b4a5-f991bf41453d}',
'contract_ids': ['@mozilla.org/xpcom/debug;1'],
'legacy_constructor': 'nsDebugImpl::Create',
'headers': ['nsDebugImpl.h'],
'processes': ProcessSelector.ALLOW_IN_GPU_RDD_AND_SOCKET_PROCESS,
},
{
'cid': '{30a04e40-38e7-11d4-8cf5-0060b0fc14a3}',
'contract_ids': ['@mozilla.org/xpcom/memory-service;1'],
'legacy_constructor': 'nsMemoryImpl::Create',
'headers': ['/xpcom/base/nsMemoryImpl.h'],
'processes': ProcessSelector.ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS,
},
{
'cid': '{67b3ac0c-d806-4d48-939e-6a819e6c248f}',
'contract_ids': ['@mozilla.org/message-loop;1'],
'legacy_constructor': 'nsMessageLoopConstructor',
'headers': ['/xpcom/base/nsMessageLoop.h'],
},
{
'cid': '{68bf4793-5204-45cf-9ee2-69adffbc2e38}',
'contract_ids': ['@mozilla.org/xpcom/memory-watcher;1'],
'singleton': True,
'type': 'mozilla::nsAvailableMemoryWatcherBase',
'headers': ['/xpcom/base/AvailableMemoryWatcher.h'],
'constructor': 'mozilla::nsAvailableMemoryWatcherBase::GetSingleton',
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
},
]