Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Change require statements to match the new SDK module layout …

…and update the SDK to 1.13.2 (#167)"

This reverts commit d1771c3.
  • Loading branch information...
commit 495d41779a3b3b7afefcdb6e51e1bd39ca42b804 1 parent d1771c3
@whimboo whimboo authored
View
4 extension/lib/config.js
@@ -5,8 +5,8 @@
"use strict";
-const self = require('sdk/self');
-const xulapp = require('sdk/system/xul-app');
+const self = require('self');
+const xulapp = require('xul-app');
/**
View
9 extension/lib/garbage-collector.js
@@ -5,10 +5,9 @@
"use strict";
const { Cc, Ci, Cu } = require("chrome");
-const { EventEmitter } = require("sdk/deprecated/events");
-const prefs = require("sdk/preferences/service");
-const timers = require("sdk/timers");
-const unload = require("sdk/system/unload");
+const { EventEmitter } = require("api-utils/events");
+const prefs = require("api-utils/preferences-service");
+const unload = require("api-utils/unload");
const config = require("./config");
@@ -81,7 +80,7 @@ const reporter = EventEmitter.compose({
data['timestamp'] = Math.round(data['timestamp'] / 1000);
// Once the console listener can be removed, we can emit directly
- timers.setTimeout(function (aScope) {
+ require("timer").setTimeout(function (aScope) {
aScope._emit(type, data);
}, 0, this);
}
View
2  extension/lib/logger.js
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { components, Cc, Ci, Cu } = require("chrome");
-const unload = require("sdk/system/unload");
+const unload = require("api-utils/unload");
Cu.import('resource://gre/modules/NetUtil.jsm');
Cu.import('resource://gre/modules/Services.jsm');
View
13 extension/lib/main.js
@@ -5,12 +5,11 @@
"use strict";
const { Cc, Ci, Cu, CC } = require("chrome");
-const events = require("sdk/deprecated/events");
-const panel = require("sdk/panel");
-const prefs = require("sdk/preferences/service");
-const self = require("sdk/self");
-const simple_prefs = require("sdk/simple-prefs");
-const widgets = require("sdk/widget");
+const events = require("events");
+const prefs = require("api-utils/preferences-service");
+const self = require("self");
+const simple_prefs = require("simple-prefs");
+const widgets = require("widget");
const config = require("./config");
const garbage_collector = require("./garbage-collector");
@@ -41,7 +40,7 @@ exports.main = function (options, callbacks) {
// Create logger instance
var logger = new Logger({ dir: dir });
- var contextPanel = panel.Panel({
+ var contextPanel = require("panel").Panel({
width: 128,
height: 107,
contentURL: [self.data.url("panel/context.html")],
View
10 extension/lib/memory.js
@@ -5,11 +5,11 @@
"use strict";
const { Cc, Ci, Cu } = require("chrome");
-const { EventEmitter } = require("sdk/deprecated/events");
-const prefs = require("sdk/preferences/service");
-const self = require("sdk/self");
-const timer = require("sdk/timers");
-const unload = require("sdk/system/unload");
+const { EventEmitter } = require("api-utils/events");
+const prefs = require("api-utils/preferences-service");
+const self = require("self");
+const timer = require("api-utils/timer");
+const unload = require("api-utils/unload");
const config = require("./config");
View
6 extension/test/test-garbage-collector.js
@@ -1,9 +1,9 @@
-const prefs = require("sdk/preferences/service");
+const prefs = require("api-utils/preferences-service");
-const config = require("./config");
+const config = require('memchaser/config');
exports.test_javascript_memory_pref_enabled = function (test) {
// We have to require the garbage collector to initialize the module
- var gc = require("./garbage-collector");
+ var gc = require("garbage-collector");
test.assert(prefs.get(gc.reporter.pref_gc_notifications));
}
View
2  extension/test/test-logger.js
@@ -1,6 +1,6 @@
const { Cc, Ci, Cu } = require("chrome");
-const { Logger } = require("./logger");
+const { Logger } = require("memchaser/logger");
Cu.import('resource://gre/modules/Services.jsm');
Please sign in to comment.
Something went wrong with that request. Please try again.