Bug 1137935 - remove all usage of sdk/event/core/ in devtools;r=ochameau

MozReview-Commit-ID: 2ab0Ol4Mq64

--HG--
extra : rebase_source : 22d0003b40e0fc49e309187ea3c943a6f5048db5
This commit is contained in:
Julian Descottes 2017-08-16 15:11:21 +02:00
parent 86f9684361
commit 19c4c8493a
57 changed files with 57 additions and 57 deletions

View File

@ -11,7 +11,7 @@
const TAB_URL = EXAMPLE_URL + "doc_promise-get-allocation-stack.html";
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
function test() {
Task.spawn(function* () {

View File

@ -12,7 +12,7 @@
const SOURCE_URL = "browser_dbg_promises-chrome-allocation-stack.js";
const PromisesFront = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
const STACK_DATA = [
{ functionDisplayName: "test/</<" },

View File

@ -11,7 +11,7 @@
const TAB_URL = EXAMPLE_URL + "doc_promise-get-fulfillment-stack.html";
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
const TEST_DATA = [
{

View File

@ -11,7 +11,7 @@
const TAB_URL = EXAMPLE_URL + "doc_promise-get-rejection-stack.html";
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
// The code in the document above leaves an uncaught rejection. This is only
// reported to the testing framework if the code is loaded in the main process.

View File

@ -5,7 +5,7 @@
"use strict";
const { on, off } = require("sdk/event/core");
const { on, off } = require("devtools/shared/event-emitter");
const { DebuggerClient } = require("devtools/shared/client/main");
function test() {

View File

@ -7,7 +7,7 @@
// on NodeActor. Custom form property is set when 'form' event is sent
// by NodeActor actor (see 'onNodeActorForm' method).
const Events = require("sdk/event/core");
const Events = require("devtools/shared/event-emitter");
const {ActorClassWithSpec, Actor, FrontClassWithSpec, Front, generateActorSpec} =
require("devtools/shared/protocol");

View File

@ -5,7 +5,7 @@
// Import as different name `coreEmit`, so we don't conflict
// with the global `window` listener itself.
const { emit: coreEmit } = require("sdk/event/core");
const { emit: coreEmit } = require("devtools/shared/event-emitter");
/**
* Representational wrapper around AudioNodeActors. Adding and destroying

View File

@ -487,7 +487,7 @@ Here's how you'd set it up in a spec:
Here's how the implementation would look:
const event = require("sdk/event/core");
const event = require("devtools/shared/event-emitter");
// In your protocol.ActorClassWithSpec definition:
giveGoodNews: function (news) {

View File

@ -30,7 +30,7 @@ const promise = require("promise");
const protocol = require("devtools/shared/protocol");
const {Actor} = protocol;
const {animationPlayerSpec, animationsSpec} = require("devtools/shared/specs/animation");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
// Types of animations.
const ANIMATION_TYPES = {

View File

@ -6,7 +6,7 @@
/* global XPCNativeWrapper */
const {Ci, Cu} = require("chrome");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const {serializeStack, parseStack} = require("toolkit/loader");

View File

@ -9,7 +9,7 @@ const { Cc, Ci } = require("chrome");
const Services = require("Services");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const { cssUsageSpec } = require("devtools/shared/specs/csscoverage");

View File

@ -14,7 +14,7 @@ const {Ci} = require("chrome");
const Services = require("Services");
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
const {Actor, ActorClassWithSpec} = require("devtools/shared/protocol");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const {eventLoopLagSpec} = require("devtools/shared/specs/eventlooplag");
exports.EventLoopLagActor = ActorClassWithSpec(eventLoopLagSpec, {

View File

@ -6,7 +6,7 @@
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { gcliSpec } = require("devtools/shared/specs/gcli");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const { createSystem } = require("gcli/system");
/**

View File

@ -8,7 +8,7 @@ const { Ci, Cu } = require("chrome");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
const EventEmitter = require("devtools/shared/old-event-emitter");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const Services = require("Services");
const { isWindowIncluded } = require("devtools/shared/layout/utils");

View File

@ -4,7 +4,7 @@
"use strict";
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const { getCurrentZoom, getWindowDimensions,
setIgnoreLayoutChanges } = require("devtools/shared/layout/utils");
const {

View File

@ -4,7 +4,7 @@
"use strict";
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const { getCurrentZoom,
setIgnoreLayoutChanges } = require("devtools/shared/layout/utils");
const {

View File

@ -7,7 +7,7 @@
const { Cc, Ci, Cu, Cr } = require("chrome");
const { getCurrentZoom, getWindowDimensions, getViewportDimensions,
getRootBindingParent, loadSheet } = require("devtools/shared/layout/utils");
const { on, emit } = require("sdk/event/core");
const { on, emit } = require("devtools/shared/event-emitter");
const lazyContainer = {};

View File

@ -58,7 +58,7 @@ const {LongStringActor} = require("devtools/server/actors/string");
const promise = require("promise");
const defer = require("devtools/shared/defer");
const {Task} = require("devtools/shared/task");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const {WalkerSearch} = require("devtools/server/actors/utils/walker-search");
const {PageStyleActor, getFontPreviewData} = require("devtools/server/actors/styles");
const {

View File

@ -8,7 +8,7 @@ const protocol = require("devtools/shared/protocol");
const { Memory } = require("devtools/server/performance/memory");
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { memorySpec } = require("devtools/shared/specs/memory");
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "StackFrameCache",
"devtools/server/actors/utils/stack", true);

View File

@ -13,7 +13,7 @@
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const performanceSpec = require("devtools/shared/specs/performance-entries");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
var PerformanceEntriesActor = ActorClassWithSpec(performanceSpec, {
listenerAdded: false,

View File

@ -9,7 +9,7 @@ const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { performanceSpec } = require("devtools/shared/specs/performance");
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "PerformanceRecorder",
"devtools/server/performance/recorder", true);

View File

@ -8,7 +8,7 @@ const { Profiler } = require("devtools/server/performance/profiler");
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { profilerSpec } = require("devtools/shared/specs/profiler");
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
/**
* This actor wraps the Profiler module at devtools/server/performance/profiler.js

View File

@ -9,7 +9,7 @@ const { promisesSpec } = require("devtools/shared/specs/promises");
const { expectState, ActorPool } = require("devtools/server/actors/common");
const { ObjectActor, createValueGrip } = require("devtools/server/actors/object");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
/**
* The Promises Actor provides support for getting the list of live promises and

View File

@ -27,7 +27,7 @@
const {Ci} = require("chrome");
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
const protocol = require("devtools/shared/protocol");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const EventEmitter = require("devtools/shared/old-event-emitter");
const {reflowSpec} = require("devtools/shared/specs/reflow");

View File

@ -28,7 +28,7 @@ loader.lazyGetter(this, "Debugger", () => {
});
loader.lazyRequireGetter(this, "CssLogic", "devtools/server/css-logic", true);
loader.lazyRequireGetter(this, "findCssSelector", "devtools/shared/inspector/css-logic", true);
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "mapURIToAddonID", "devtools/server/actors/utils/map-uri-to-addon-id");
loader.lazyRequireGetter(this, "BreakpointActor", "devtools/server/actors/breakpoint", true);
loader.lazyRequireGetter(this, "setBreakpointAtEntryPoints", "devtools/server/actors/breakpoint", true);

View File

@ -5,7 +5,7 @@
"use strict";
const {Cc, Ci, Cu, CC} = require("chrome");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const {LongStringActor} = require("devtools/server/actors/string");
const {DebuggerServer} = require("devtools/server/main");

View File

@ -7,7 +7,7 @@
const {Cc, Ci} = require("chrome");
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
const promise = require("promise");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const {fetch} = require("devtools/shared/DevToolsUtils");
const {oldStyleSheetSpec, styleEditorSpec} = require("devtools/shared/specs/styleeditor");

View File

@ -12,7 +12,7 @@ const {getDefinedGeometryProperties} = require("devtools/server/actors/highlight
const {parseNamedDeclarations} = require("devtools/shared/css/parsing-utils");
const {isCssPropertyKnown} = require("devtools/server/actors/css-properties");
const {Task} = require("devtools/shared/task");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
// This will also add the "stylesheet" actor type for protocol.js to recognize
const {UPDATE_PRESERVING_RULES, UPDATE_GENERAL} = require("devtools/server/actors/stylesheets");

View File

@ -10,7 +10,7 @@ const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
const promise = require("promise");
const defer = require("devtools/shared/defer");
const {Task} = require("devtools/shared/task");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const {LongStringActor} = require("devtools/server/actors/string");
const {fetch} = require("devtools/shared/DevToolsUtils");

View File

@ -33,7 +33,7 @@ loader.lazyImporter(this, "ExtensionContent", "resource://gre/modules/ExtensionC
// Assumptions on events module:
// events needs to be dispatched synchronously,
// by calling the listeners in the order or registration.
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "StyleSheetActor", "devtools/server/actors/stylesheets", true);

View File

@ -21,7 +21,7 @@ const { Option, RetVal } = protocol;
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { Timeline } = require("devtools/server/performance/timeline");
const { timelineSpec } = require("devtools/shared/specs/timeline");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
/**
* The timeline actor pops and forwards timeline markers registered in docshells.

View File

@ -7,7 +7,7 @@
const { Cu, Cc, Ci } = require("chrome");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const protocol = require("devtools/shared/protocol");
const { CallWatcherActor } = require("devtools/server/actors/call-watcher");
const { createValueGrip } = require("devtools/server/actors/object");

View File

@ -20,7 +20,7 @@ loader.lazyRequireGetter(this, "NetworkMonitor", "devtools/shared/webconsole/net
loader.lazyRequireGetter(this, "NetworkMonitorChild", "devtools/shared/webconsole/network-monitor", true);
loader.lazyRequireGetter(this, "ConsoleProgressListener", "devtools/shared/webconsole/network-monitor", true);
loader.lazyRequireGetter(this, "StackTraceCollector", "devtools/shared/webconsole/network-monitor", true);
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "ServerLoggingListener", "devtools/shared/webconsole/server-logger", true);
loader.lazyRequireGetter(this, "JSPropertyProvider", "devtools/shared/webconsole/js-property-provider", true);
loader.lazyRequireGetter(this, "Parser", "resource://devtools/shared/Parser.jsm", true);

View File

@ -6,7 +6,7 @@
/* global XPCNativeWrapper */
const {Cu} = require("chrome");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const defer = require("devtools/shared/defer");
const protocol = require("devtools/shared/protocol");
const { ContentObserver } = require("devtools/shared/content-observer");

View File

@ -17,7 +17,7 @@ const {
} = require("devtools/shared/specs/worker");
loader.lazyRequireGetter(this, "ChromeUtils");
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
XPCOMUtils.defineLazyServiceGetter(
this, "swm",

View File

@ -86,7 +86,7 @@ function loadSubScript(url) {
}
}
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
var gRegisteredModules = Object.create(null);

View File

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { on, off } = require("sdk/event/core");
const { on, off } = require("devtools/shared/event-emitter");
const { Class } = require("sdk/core/heritage");
/**

View File

@ -7,7 +7,7 @@
const URL1 = MAIN_DOMAIN + "navigate-first.html";
const URL2 = MAIN_DOMAIN + "navigate-second.html";
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
var client;
SpecialPowers.pushPrefEnv(

View File

@ -18,7 +18,7 @@ Bug 1137527 - Test receiving GC events from the memory actor.
window.onload = function () {
SimpleTest.waitForExplicitFinish();
let event = require("sdk/event/core");
let event = require("devtools/shared/event-emitter");
Task.spawn(function* () {
let { memory, client } = yield startServerAndGetSelectedTabMemory();

View File

@ -10,7 +10,7 @@
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
add_task(function* () {
let client = yield startTestDebuggerServer("promises-actor-test");

View File

@ -12,7 +12,7 @@ Cu.import("resource://testing-common/PromiseTestUtils.jsm", this);
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
add_task(function* () {
let client = yield startTestDebuggerServer("promises-actor-test");

View File

@ -9,7 +9,7 @@
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
add_task(function* () {
let client = yield startTestDebuggerServer("test-promises-dependentpromises");

View File

@ -9,7 +9,7 @@
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
add_task(function* () {
let client = yield startTestDebuggerServer("promises-object-test");

View File

@ -10,7 +10,7 @@
const { PromisesFront } = require("devtools/shared/fronts/promises");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
add_task(function* () {
let client = yield startTestDebuggerServer("test-promises-timetosettle");

View File

@ -11,7 +11,7 @@
const { PromisesFront } = require("devtools/shared/fronts/promises");
const { setTimeout } = Cu.import("resource://gre/modules/Timer.jsm", {});
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
add_task(function* () {
let client = yield startTestDebuggerServer("test-promises-timetosettle");

View File

@ -10,7 +10,7 @@
var protocol = require("devtools/shared/protocol");
var {preEvent, types, Arg, RetVal} = protocol;
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
function simpleHello() {
return {

View File

@ -9,7 +9,7 @@
*/
var protocol = require("devtools/shared/protocol");
var {RetVal, Arg} = protocol;
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
var {LongStringActor} = require("devtools/server/actors/string");
// The test implicitly relies on this.

View File

@ -9,7 +9,7 @@
var protocol = require("devtools/shared/protocol");
var {Arg, Option, RetVal} = protocol;
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
function simpleHello() {
return {

View File

@ -12,7 +12,7 @@ const { getStack, callFunctionWithAsyncStack } = require("devtools/shared/platfo
const promise = Cu.import("resource://devtools/shared/deprecated-sync-thenables.js", {}).Promise;
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "WebConsoleClient", "devtools/shared/webconsole/client", true);
loader.lazyRequireGetter(this, "DebuggerSocket", "devtools/shared/security/socket", true);
loader.lazyRequireGetter(this, "Authentication", "devtools/shared/security/auth");

View File

@ -6,7 +6,7 @@
const {Ci} = require("chrome");
const Services = require("Services");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
/**
* Handles adding an observer for the creation of content document globals,

View File

@ -23,7 +23,7 @@ const {
const promise = require("promise");
const defer = require("devtools/shared/defer");
const { Task } = require("devtools/shared/task");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
const nodeConstants = require("devtools/shared/dom-node-constants.js");
loader.lazyRequireGetter(this, "CommandUtils",
"devtools/client/shared/developer-toolbar", true);

View File

@ -11,7 +11,7 @@ const {
} = require("devtools/shared/protocol");
const { profilerSpec } = require("devtools/shared/specs/profiler");
loader.lazyRequireGetter(this, "events", "sdk/event/core");
loader.lazyRequireGetter(this, "events", "devtools/shared/event-emitter");
/**
* This can be used on older Profiler implementations, but the methods cannot

View File

@ -11,7 +11,7 @@ const {
} = require("devtools/shared/specs/styleeditor");
const promise = require("promise");
const defer = require("devtools/shared/defer");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
/**
* StyleSheetFront is the client-side counterpart to a StyleSheetActor.

View File

@ -16,7 +16,7 @@ const {
} = require("devtools/shared/specs/stylesheets");
const promise = require("promise");
const { Task } = require("devtools/shared/task");
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
/**
* The client-side counterpart for an OriginalSourceActor.

View File

@ -4,7 +4,7 @@
"use strict";
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "CommandState",
"devtools/shared/gcli/command-state", true);

View File

@ -4,7 +4,7 @@
"use strict";
const events = require("sdk/event/core");
const events = require("devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "CommandState",
"devtools/shared/gcli/command-state", true);

View File

@ -8,7 +8,7 @@ var promise = require("promise");
var defer = require("devtools/shared/defer");
var {Class} = require("sdk/core/heritage");
var {EventTarget} = require("sdk/event/target");
var events = require("sdk/event/core");
var events = require("devtools/shared/event-emitter");
var {getStack, callFunctionWithAsyncStack} = require("devtools/shared/platform/stack");
var {settleAll} = require("devtools/shared/DevToolsUtils");