Bug 1293760 - change export in Services shim; r?bgrins
MozReview-Commit-ID: 5Tc6VanQxt3
--- a/devtools/client/shared/shim/Services.js
+++ b/devtools/client/shared/shim/Services.js
@@ -586,13 +586,13 @@ const Services = {
* @param {String} name the name of the preference
* @param {Any} value the default value of the preference
*/
function pref(name, value) {
let thePref = Services.prefs._findOrCreatePref(name, value, true, value);
thePref.setDefault(value);
}
-exports.Services = Services;
+module.exports = Services;
// This is exported to silence eslint and, at some point, perhaps to
// provide it when loading devtools.js in order to install the default
// preferences.
exports.pref = pref;
--- a/devtools/client/shared/shim/test/test_service_appinfo.html
+++ b/devtools/client/shared/shim/test/test_service_appinfo.html
@@ -7,17 +7,18 @@ https://bugzilla.mozilla.org/show_bug.cg
<title>Test for Bug 1265802 - replace Services.appinfo</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript;version=1.8">
"use strict";
- var exports = {};
+ var exports = {}
+ var module = {exports};
</script>
<script type="application/javascript;version=1.8"
src="resource://devtools/client/shared/shim/Services.js"></script>
</head>
<body>
<script type="application/javascript;version=1.8">
"use strict";
--- a/devtools/client/shared/shim/test/test_service_focus.html
+++ b/devtools/client/shared/shim/test/test_service_focus.html
@@ -7,17 +7,18 @@ https://bugzilla.mozilla.org/show_bug.cg
<title>Test for Bug 1278473 - replace Services.focus</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript;version=1.8">
"use strict";
- var exports = {};
+ var exports = {}
+ var module = {exports};
</script>
<script type="application/javascript;version=1.8"
src="resource://devtools/client/shared/shim/Services.js"></script>
</head>
<body>
<span>
<span id="start" testvalue="0" tabindex="0"> </span>
--- a/devtools/client/shared/shim/test/test_service_prefs.html
+++ b/devtools/client/shared/shim/test/test_service_prefs.html
@@ -7,17 +7,18 @@ https://bugzilla.mozilla.org/show_bug.cg
<title>Test for Bug 1265808 - replace Services.prefs</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript;version=1.8">
"use strict";
-var exports = {};
+var exports = {}
+var module = {exports};
// Add some starter prefs.
localStorage.setItem("devtools.branch1.somebool", JSON.stringify({
// bool
type: 128,
defaultValue: false,
hasUserValue: false,
userValue: false