Permalink
Browse files

Change require statements and update the SDK to 1.14 (#174)

  • Loading branch information...
1 parent 495d417 commit 1268cc7080b3dee2f1837afc2fcab9083424c7bb @xabolcs xabolcs committed Jun 20, 2013
Submodule addon-sdk updated 170 files
View
@@ -5,8 +5,8 @@
"use strict";
-const self = require('self');
-const xulapp = require('xul-app');
+const self = require('sdk/self');
+const xulapp = require('sdk/system/xul-app');
/**
@@ -5,9 +5,10 @@
"use strict";
const { Cc, Ci, Cu } = require("chrome");
-const { EventEmitter } = require("api-utils/events");
-const prefs = require("api-utils/preferences-service");
-const unload = require("api-utils/unload");
+const { EventEmitter } = require("sdk/deprecated/events");
+const prefs = require("sdk/preferences/service");
+const timers = require("sdk/timers");
+const unload = require("sdk/system/unload");
const config = require("./config");
@@ -80,7 +81,7 @@ const reporter = EventEmitter.compose({
data['timestamp'] = Math.round(data['timestamp'] / 1000);
// Once the console listener can be removed, we can emit directly
- require("timer").setTimeout(function (aScope) {
+ timers.setTimeout(function (aScope) {
aScope._emit(type, data);
}, 0, this);
}
View
@@ -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("api-utils/unload");
+const unload = require("sdk/system/unload");
Cu.import('resource://gre/modules/NetUtil.jsm');
Cu.import('resource://gre/modules/Services.jsm');
View
@@ -5,11 +5,12 @@
"use strict";
const { Cc, Ci, Cu, CC } = require("chrome");
-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 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 config = require("./config");
const garbage_collector = require("./garbage-collector");
@@ -40,7 +41,7 @@ exports.main = function (options, callbacks) {
// Create logger instance
var logger = new Logger({ dir: dir });
- var contextPanel = require("panel").Panel({
+ var contextPanel = panel.Panel({
width: 128,
height: 107,
contentURL: [self.data.url("panel/context.html")],
View
@@ -5,11 +5,11 @@
"use strict";
const { Cc, Ci, Cu } = require("chrome");
-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 { 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 config = require("./config");
@@ -1,9 +1,9 @@
-const prefs = require("api-utils/preferences-service");
+const prefs = require("sdk/preferences/service");
-const config = require('memchaser/config');
+const config = require("./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));
}
@@ -1,6 +1,6 @@
const { Cc, Ci, Cu } = require("chrome");
-const { Logger } = require("memchaser/logger");
+const { Logger } = require("./logger");
Cu.import('resource://gre/modules/Services.jsm');

0 comments on commit 1268cc7

Please sign in to comment.