Bug 1387128 - Replace all lower case usages with capital P. r=jryans
$ sed -i 's/new promise(/new Promise(/' $(egrep -rl 'new promise' devtools)
MozReview-Commit-ID: 1EXfsNbawpX
--- a/devtools/client/scratchpad/test/head.js
+++ b/devtools/client/scratchpad/test/head.js
@@ -76,17 +76,17 @@ function openScratchpad(aReadyCallback,
* are supported:
* - tabContent
* A string providing the html content of the tab.
* @return Promise
*/
function openTabAndScratchpad(aOptions = {}) {
waitForExplicitFinish();
// eslint-disable-next-line new-cap
- return new promise(resolve => {
+ return new Promise(resolve => {
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
const {selectedBrowser} = gBrowser;
BrowserTestUtils.browserLoaded(selectedBrowser).then(function() {
openScratchpad((win, sp) => resolve([win, sp]), aOptions);
});
gBrowser.loadURI("data:text/html;charset=utf8," + (aOptions.tabContent || ""));
});
}
--- a/devtools/client/shared/widgets/VariablesViewController.jsm
+++ b/devtools/client/shared/widgets/VariablesViewController.jsm
@@ -505,17 +505,17 @@ VariablesViewController.prototype = {
});
},
_populateFromEntries: function(target, grip) {
const objGrip = grip.obj;
const objectClient = this._getObjectClient(objGrip);
// eslint-disable-next-line new-cap
- return new promise((resolve, reject) => {
+ return new Promise((resolve, reject) => {
objectClient.enumEntries((response) => {
if (response.error) {
// Older server might not support the enumEntries method
console.warn(response.error + ": " + response.message);
resolve();
} else {
const sliceGrip = {
type: "property-iterator",