зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271399 - Add shim for protocol.js to support old add-ons. r=ednapiranha
MozReview-Commit-ID: J5UGN5IBDUz --HG-- rename : devtools/server/shims/dbg-server.jsm => devtools/server/shims/toolkit/dbg-server.jsm rename : devtools/server/shims/moz.build => devtools/server/shims/toolkit/moz.build
This commit is contained in:
Родитель
dda668b9b8
Коммит
e4725f7b79
|
@ -4,14 +4,15 @@
|
|||
# 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/.
|
||||
|
||||
DIRS += [
|
||||
'toolkit',
|
||||
]
|
||||
|
||||
# Unlike most DevTools build files, this file does not use DevToolsModules
|
||||
# because these files are here for add-on compatibility, and so they must be
|
||||
# installed to previously defined locations.
|
||||
|
||||
# These shims for legacy paths expect to be installed as if they were part of
|
||||
# /toolkit modules. Disable any DIST_SUBDIR from parent files here.
|
||||
DIST_SUBDIR = ''
|
||||
|
||||
EXTRA_JS_MODULES.devtools += [
|
||||
'dbg-server.jsm',
|
||||
# Extra compatibility layer for old path after relocation in bug 1270173
|
||||
FINAL_TARGET_FILES.chrome.devtools.modules.devtools.server += [
|
||||
'protocol.js',
|
||||
]
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* This file only exists to support add-ons which import this module at a
|
||||
* specific path.
|
||||
*/
|
||||
|
||||
const { Cu } = require("chrome");
|
||||
const Services = require("Services");
|
||||
|
||||
const WARNING_PREF = "devtools.migration.warnings";
|
||||
if (Services.prefs.getBoolPref(WARNING_PREF)) {
|
||||
const { Deprecated } = Cu.import("resource://gre/modules/Deprecated.jsm", {});
|
||||
Deprecated.warning("This path to protocol.js is deprecated. Please use " +
|
||||
"require(\"devtools/shared/protocol\") to load this " +
|
||||
"module.",
|
||||
"https://bugzil.la/1270173");
|
||||
}
|
||||
|
||||
module.exports = require("devtools/shared/protocol");
|
|
@ -0,0 +1,17 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; 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/.
|
||||
|
||||
# Unlike most DevTools build files, this file does not use DevToolsModules
|
||||
# because these files are here for add-on compatibility, and so they must be
|
||||
# installed to previously defined locations.
|
||||
|
||||
# These shims for legacy paths expect to be installed as if they were part of
|
||||
# /toolkit modules. Disable any DIST_SUBDIR from parent files here.
|
||||
DIST_SUBDIR = ''
|
||||
|
||||
EXTRA_JS_MODULES.devtools += [
|
||||
'dbg-server.jsm',
|
||||
]
|
Загрузка…
Ссылка в новой задаче