2013-06-05 09:30:54 -07:00
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*
|
|
|
|
* General utilities used throughout devtools.
|
|
|
|
*
|
|
|
|
* To support chrome debugging, the debugger server needs to have all its
|
|
|
|
* code in one global, so it must use loadSubScript directly. Everyone else,
|
|
|
|
* though, prefers a JSM.
|
|
|
|
*/
|
|
|
|
|
|
|
|
this.EXPORTED_SYMBOLS = [ "DevToolsUtils" ];
|
|
|
|
|
|
|
|
Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
|
|
|
|
.getService(Components.interfaces.mozIJSSubScriptLoader)
|
|
|
|
.loadSubScript("resource://gre/modules/devtools/DevToolsUtils.js", this);
|
|
|
|
|
|
|
|
this.DevToolsUtils = {
|
|
|
|
safeErrorString: safeErrorString,
|
|
|
|
reportException: reportException,
|
2013-10-01 14:25:19 -07:00
|
|
|
makeInfallible: makeInfallible,
|
2013-12-18 14:17:27 -08:00
|
|
|
zip: zip,
|
2013-10-15 09:49:15 -07:00
|
|
|
yieldingEach: yieldingEach,
|
2013-10-24 01:47:10 -07:00
|
|
|
reportingDisabled: false , // Used by tests.
|
2013-12-03 05:32:41 -08:00
|
|
|
defineLazyPrototypeGetter: defineLazyPrototypeGetter,
|
|
|
|
getProperty: getProperty,
|
|
|
|
hasSafeGetter: hasSafeGetter,
|
2013-12-19 05:04:59 -08:00
|
|
|
isSafeJSObject: isSafeJSObject,
|
2013-06-05 09:30:54 -07:00
|
|
|
};
|