Bug 1524688: Part 54 - Convert ConsoleAPIStorage to static registration. r=baku

Differential Revision: https://phabricator.services.mozilla.com/D18464

--HG--
rename : dom/console/ConsoleAPIStorage.js => dom/console/ConsoleAPIStorage.jsm
extra : source : 0ad5465eace1f9294f87ae8c705db322d5cfe953
This commit is contained in:
Kris Maglione 2019-01-30 11:34:41 -08:00
parent 61c60113b7
commit 465465bbf9
6 changed files with 21 additions and 14 deletions

View File

@ -160,8 +160,6 @@
#endif
; JavaScript components
@RESPATH@/components/ConsoleAPI.manifest
@RESPATH@/components/ConsoleAPIStorage.js
@RESPATH@/components/BrowserElementParent.manifest
@RESPATH@/components/BrowserElementParent.js
@RESPATH@/browser/components/BrowserComponents.manifest

View File

@ -1,2 +0,0 @@
component {96cf7855-dfa9-4c6d-8276-f9705b4890f2} ConsoleAPIStorage.js
contract @mozilla.org/consoleAPI-storage;1 {96cf7855-dfa9-4c6d-8276-f9705b4890f2}

View File

@ -4,12 +4,8 @@
"use strict";
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
// This constant tells how many messages to process in a single timer execution.
const MESSAGES_IN_INTERVAL = 1500;
const STORAGE_MAX_EVENTS = 1000;
var _consoleStorage = new Map();
@ -142,4 +138,4 @@ ConsoleAPIStorageService.prototype = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ConsoleAPIStorageService]);
var EXPORTED_SYMBOLS = ["ConsoleAPIStorageService"];

View File

@ -0,0 +1,14 @@
# -*- 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': '{96cf7855-dfa9-4c6d-8276-f9705b4890f2}',
'contract_ids': ['@mozilla.org/consoleAPI-storage;1'],
'jsm': 'resource://gre/modules/ConsoleAPIStorage.jsm',
'constructor': 'ConsoleAPIStorageService',
},
]

View File

@ -34,9 +34,12 @@ UNIFIED_SOURCES += [
'ConsoleUtils.cpp',
]
EXTRA_COMPONENTS += [
'ConsoleAPI.manifest',
'ConsoleAPIStorage.js',
EXTRA_JS_MODULES += [
'ConsoleAPIStorage.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
LOCAL_INCLUDES += [

View File

@ -101,8 +101,6 @@
@BINPATH@/components/components.manifest
; JavaScript components
@BINPATH@/components/ConsoleAPI.manifest
@BINPATH@/components/ConsoleAPIStorage.js
#ifdef MOZ_ANDROID_GCM
@BINPATH@/components/Push.manifest
#endif