Skip to content

Commit

Permalink
Merge m-c to inbound. a=merge
Browse files Browse the repository at this point in the history
CLOSED TREE
  • Loading branch information
rvandermeulen committed May 12, 2017
2 parents 8c715c9 + 1fc1050 commit 4e993e3
Show file tree
Hide file tree
Showing 2,315 changed files with 69,344 additions and 64,217 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@ lextab.py
/.tup

# Ignore Visual Studio Code workspace files.
.vscode/
.vscode/*
!.vscode/extensions.json
!.vscode/tasks.json
4 changes: 2 additions & 2 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ GPATH
^\.tup

# Ignore Visual Studio Code workspace files.
\.vscode/(?!extensions.json$)
\.vscode/(?!extensions\.json|tasks\.json)

subinclude:servo/.hgignore

# Ignore Infer output
^infer-out/
^infer-out/
129 changes: 129 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"command": "${workspaceRoot}/mach",
"isShellCommand": true,
"args": ["--log-no-times"],
"showOutput": "silent",
"echoCommand": true,
"suppressTaskName": false,
"tasks": [
{
"taskName": "clobber"
},
{
"taskName": "configure"
},
{
"taskName": "build",
"isBuildCommand": true,
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^.*?tools([^\\s]*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"taskName": "build binaries",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"taskName": "build faster",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"taskName": "run",
"args": ["-purgecaches"],
"showOutput": "always"
},
{
"taskName": "eslint",
"problemMatcher": ["$eslint-stylish"]
},
{
"taskName": "eslint fix",
"suppressTaskName": true,
"args": ["eslint", "--fix", "${file}"],
"problemMatcher": ["$eslint-stylish"]
},
{
"taskName": "test",
"args": ["${relativeFile}"],
"isTestCommand": true,
"showOutput": "always"
},
{
"taskName": "mochitest",
"args": ["${relativeFile}"],
"showOutput": "always",
"problemMatcher": {
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^.*\\s+(TEST-UNEXPECTED-FAIL|TEST-UNEXPECTED-PASS)\\s+\\|\\s+([^\\s]*)\\s+\\|\\s+(.*)$",
"severity": 1,
"file": 2,
"message": 3
}
}
},
{
"taskName": "reftest",
"args": ["${relativeFile}"],
"showOutput": "always",
"problemMatcher": {
"fileLocation": ["absolute"],
"pattern": {
"regexp": "^.*\\s+(TEST-UNEXPECTED-FAIL|TEST-UNEXPECTED-PASS)\\s+\\|\\s+file:\/\/([^\\s]*)\\s+==\\s+[^\\s]*\\s+\\|\\s+(.*)$",
"severity": 1,
"file": 2,
"message": 3
}
}
},
{
"taskName": "xpcshell-test",
"args": ["${relativeFile}", "--sequential"],
"showOutput": "always",
"problemMatcher": {
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^.*\\s+(FAIL|ERROR)\\s+\\[([^\\s]*)\\s+:\\s+(\\d+)\\]\\s+(.*)$",
"severity": 1,
"file": 2,
"location": 3,
"message": 4
}
}
}
]
}
2 changes: 2 additions & 0 deletions browser/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ module.exports = {

"no-mixed-spaces-and-tabs": "error",
"no-shadow": "error",

"mozilla/no-task": "error",
}
};
8 changes: 4 additions & 4 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1634,12 +1634,12 @@ pref("browser.crashReports.unsubmittedCheck.autoSubmit", false);

// Preferences for the form autofill system extension
#ifdef NIGHTLY_BUILD
pref("browser.formautofill.experimental", true);
pref("extensions.formautofill.experimental", true);
#else
pref("browser.formautofill.experimental", false);
pref("extensions.formautofill.experimental", false);
#endif
pref("browser.formautofill.enabled", true);
pref("browser.formautofill.loglevel", "Warn");
pref("extensions.formautofill.addresses.enabled", true);
pref("extensions.formautofill.loglevel", "Warn");

// Whether or not to restore a session with lazy-browser tabs.
pref("browser.sessionstore.restore_tabs_lazily", true);
Expand Down
56 changes: 28 additions & 28 deletions browser/base/content/browser-places.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ var StarUI = {

_overlayLoaded: false,
_overlayLoading: false,
showEditBookmarkPopup: Task.async(function* (aNode, aAnchorElement, aPosition, aIsNewBookmark) {
async showEditBookmarkPopup(aNode, aAnchorElement, aPosition, aIsNewBookmark) {
// Slow double-clicks (not true double-clicks) shouldn't
// cause the panel to flicker.
if (this.panel.state == "showing" ||
Expand All @@ -218,11 +218,11 @@ var StarUI = {
if (typeof(aNode) == "number") {
let itemId = aNode;
if (PlacesUIUtils.useAsyncTransactions) {
let guid = yield PlacesUtils.promiseItemGuid(itemId);
aNode = yield PlacesUIUtils.promiseNodeLike(guid);
let guid = await PlacesUtils.promiseItemGuid(itemId);
aNode = await PlacesUIUtils.promiseNodeLike(guid);
} else {
aNode = { itemId };
yield PlacesUIUtils.completeNodeLikeObjectForItemId(aNode);
await PlacesUIUtils.completeNodeLikeObjectForItemId(aNode);
}
}

Expand Down Expand Up @@ -252,9 +252,9 @@ var StarUI = {
this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition);
}
);
}),
},

_doShowEditBookmarkPanel: Task.async(function* (aNode, aAnchorElement, aPosition) {
async _doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition) {
if (this.panel.state != "closed")
return;

Expand Down Expand Up @@ -317,7 +317,7 @@ var StarUI = {
, focusedElement: "preferred"});

this.panel.openPopup(aAnchorElement, aPosition);
}),
},

panelShown:
function SU_panelShown(aEvent) {
Expand Down Expand Up @@ -357,9 +357,9 @@ var StarUI = {
return;
if (PlacesUIUtils.useAsyncTransactions) {
this._batchBlockingDeferred = PromiseUtils.defer();
PlacesTransactions.batch(function* () {
yield this._batchBlockingDeferred.promise;
}.bind(this));
PlacesTransactions.batch(async () => {
await this._batchBlockingDeferred.promise;
});
} else {
PlacesUtils.transactionManager.beginBatch(null);
}
Expand Down Expand Up @@ -392,9 +392,9 @@ var PlacesCommandHook = {
* @param [optional] aShowEditUI
* whether or not to show the edit-bookmark UI for the bookmark item
*/
bookmarkPage: Task.async(function* (aBrowser, aParent, aShowEditUI) {
async bookmarkPage(aBrowser, aParent, aShowEditUI) {
if (PlacesUIUtils.useAsyncTransactions) {
yield this._bookmarkPagePT(aBrowser, aParent, aShowEditUI);
await this._bookmarkPagePT(aBrowser, aParent, aShowEditUI);
return;
}

Expand All @@ -407,7 +407,7 @@ var PlacesCommandHook = {
var description;
var charset;

let docInfo = yield this._getPageDetails(aBrowser);
let docInfo = await this._getPageDetails(aBrowser);

try {
title = docInfo.isErrorPage ? PlacesUtils.history.getPageTitle(uri)
Expand Down Expand Up @@ -461,28 +461,28 @@ var PlacesCommandHook = {
} else {
StarUI.showEditBookmarkPopup(itemId, aBrowser, "overlap", isNewBookmark);
}
}),
},

// TODO: Replace bookmarkPage code with this function once legacy
// transactions are removed.
_bookmarkPagePT: Task.async(function* (aBrowser, aParentId, aShowEditUI) {
async _bookmarkPagePT(aBrowser, aParentId, aShowEditUI) {
let url = new URL(aBrowser.currentURI.spec);
let info = yield PlacesUtils.bookmarks.fetch({ url });
let info = await PlacesUtils.bookmarks.fetch({ url });
let isNewBookmark = !info;
if (!info) {
let parentGuid = aParentId !== undefined ?
yield PlacesUtils.promiseItemGuid(aParentId) :
await PlacesUtils.promiseItemGuid(aParentId) :
PlacesUtils.bookmarks.unfiledGuid;
info = { url, parentGuid };
// Bug 1148838 - Make this code work for full page plugins.
let description = null;
let charset = null;

let docInfo = yield this._getPageDetails(aBrowser);
let docInfo = await this._getPageDetails(aBrowser);

try {
info.title = docInfo.isErrorPage ?
(yield PlacesUtils.promisePlaceInfo(aBrowser.currentURI)).title :
(await PlacesUtils.promisePlaceInfo(aBrowser.currentURI)).title :
aBrowser.contentTitle;
info.title = info.title || url.href;
description = docInfo.description;
Expand All @@ -503,7 +503,7 @@ var PlacesCommandHook = {
, value: description }];
}

info.guid = yield PlacesTransactions.NewBookmark(info).transact();
info.guid = await PlacesTransactions.NewBookmark(info).transact();

// Set the character-set
if (charset && !PrivateBrowsingUtils.isBrowserPrivate(aBrowser))
Expand All @@ -517,7 +517,7 @@ var PlacesCommandHook = {
if (!aShowEditUI)
return;

let node = yield PlacesUIUtils.promiseNodeLikeFromFetchInfo(info);
let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(info);

// Try to dock the panel to:
// 1. the bookmarks menu button
Expand All @@ -536,7 +536,7 @@ var PlacesCommandHook = {
} else {
StarUI.showEditBookmarkPopup(node, aBrowser, "overlap", isNewBookmark);
}
}),
},

_getPageDetails(browser) {
return new Promise(resolve => {
Expand Down Expand Up @@ -569,8 +569,8 @@ var PlacesCommandHook = {
* @param [optional] aDescription
* The linked page description, if available
*/
bookmarkLink: Task.async(function* (aParentId, aURL, aTitle, aDescription = "") {
let node = yield PlacesUIUtils.fetchNodeLike({ url: aURL });
async bookmarkLink(aParentId, aURL, aTitle, aDescription = "") {
let node = await PlacesUIUtils.fetchNodeLike({ url: aURL });
if (node) {
PlacesUIUtils.showBookmarkDialog({ action: "edit"
, node
Expand All @@ -592,7 +592,7 @@ var PlacesCommandHook = {
, "loadInSidebar"
, "keyword" ]
}, window.top);
}),
},

/**
* List of nsIURI objects characterizing the tabs currently open in the
Expand Down Expand Up @@ -655,7 +655,7 @@ var PlacesCommandHook = {
* @subtitle subtitle
* A short description of the feed. Optional.
*/
addLiveBookmark: Task.async(function *(url, feedTitle, feedSubtitle) {
async addLiveBookmark(url, feedTitle, feedSubtitle) {
let toolbarIP = new InsertionPoint(PlacesUtils.toolbarFolderId,
PlacesUtils.bookmarks.DEFAULT_INDEX,
Components.interfaces.nsITreeView.DROP_ON);
Expand All @@ -664,7 +664,7 @@ var PlacesCommandHook = {
let title = feedTitle || gBrowser.contentTitle;
let description = feedSubtitle;
if (!description) {
description = (yield this._getPageDetails(gBrowser.selectedBrowser)).description;
description = (await this._getPageDetails(gBrowser.selectedBrowser)).description;
}

PlacesUIUtils.showBookmarkDialog({ action: "add"
Expand All @@ -678,7 +678,7 @@ var PlacesCommandHook = {
, "siteLocation"
, "description" ]
}, window);
}),
},

/**
* Opens the Places Organizer.
Expand Down
6 changes: 3 additions & 3 deletions browser/base/content/browser-trackingprotection.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var TrackingProtection = {
}
},

showIntroPanel: Task.async(function*() {
async showIntroPanel() {
let brandBundle = document.getElementById("bundle_brand");
let brandShortName = brandBundle.getString("brandShortName");

Expand Down Expand Up @@ -225,13 +225,13 @@ var TrackingProtection = {
},
];

let panelTarget = yield UITour.getTarget(window, "trackingProtection");
let panelTarget = await UITour.getTarget(window, "trackingProtection");
UITour.initForBrowser(gBrowser.selectedBrowser, window);
UITour.showInfo(window, panelTarget,
gNavigatorBundle.getString("trackingProtection.intro.title"),
gNavigatorBundle.getFormattedString("trackingProtection.intro.description2",
[brandShortName]),
undefined, buttons,
{ closeButtonCallback: () => this.dontShowIntroPanelAgain() });
}),
},
};
Loading

0 comments on commit 4e993e3

Please sign in to comment.