mentat/release-browser/wrapper.prefix
Richard Newman 2577e0d4a7 Produce different output for Firefox and Firefox add-ons.
Firefox itself doesn't need `require("chrome")` to get access to Cu,
and shouldn't touch the Add-on SDK at all.
2016-11-16 21:04:14 -08:00

29 lines
791 B
Text

/* 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/. */
this.EXPORTED_SYMBOLS = ["Datomish"];
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
// So we can polyfill setImmediate.
Cu.import("resource://gre/modules/Services.jsm");
var setImmediate = function (callback) {
let args = new Array(arguments.length - 1);
for (let i = 0; i < args.length; i++) {
args[i] = arguments[i + 1];
}
callback = callback.bind(callback, args);
Services.tm.currentThread.dispatch(callback, Ci.nsIThread.DISPATCH_NORMAL);
}
var console = {
log: function (s) {
dump(s);
}
};
this.Datomish = (function () {