Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change require statements to match the new SDK module layout and upda…

…te the SDK to 1.13.2 (#167)
  • Loading branch information...
commit d1771c398c63cd1eb64af75adbf2f4b2a64bba25 1 parent eccd205
Szabolcs Hubai xabolcs authored whimboo committed
4 extension/lib/config.js
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');
/**
9 extension/lib/garbage-collector.js
View
@@ -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);
}
2  extension/lib/logger.js
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');
13 extension/lib/main.js
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")],
10 extension/lib/memory.js
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");
6 extension/test/test-garbage-collector.js
View
@@ -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));
}
2  extension/test/test-logger.js
View
@@ -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');

6 comments on commit d1771c3

Szabolcs Hubai
Collaborator

Hmmm SDK 1.14 is missing:

  • the commit message talks about 1.13.2
  • no addon-sdk changes

Please backout this and reland the PR,
or simply cherry-pick (+edit message) commit 399a6c7!

Henrik Skupin
Owner

Backout has happened with 495d417.

Can you please rebase your commits and set the correct commit message? I will land it then.

For the future I will always request to rebase commits after the review phase and before landing the patch. We faced too much trouble with --squash the last weeks. Thanks for noticing that!

Szabolcs Hubai
Collaborator

Can you please rebase your commits and set the correct commit message? I will land it then.

Commit 1268cc7 is for you in my branch-mozilla-pull-174!

BTW I'm playing with mozilla/memchaser's pulls with the help of git ls-remote mozilla from Tim Berglund.

Henrik Skupin
Owner

Please create a pull request for it on github. Thanks.

Szabolcs Hubai
Collaborator

Thanks.

Done! It's #175.

Szabolcs Hubai
Collaborator

FTR: this has been relanded as 1268cc7.

Please sign in to comment.
Something went wrong with that request. Please try again.