зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland a=merge on a CLOSED TREE
This commit is contained in:
Коммит
691e26b1b6
|
@ -13,32 +13,32 @@ if (Utils.MozBuildApp === "mobile/android") {
|
|||
ChromeUtils.import("resource://gre/modules/Messaging.jsm");
|
||||
}
|
||||
|
||||
// const ACCESSFU_DISABLE = 0;
|
||||
const ACCESSFU_ENABLE = 1;
|
||||
const ACCESSFU_AUTO = 2;
|
||||
|
||||
const SCREENREADER_SETTING = "accessibility.screenreader";
|
||||
const QUICKNAV_MODES_PREF = "accessibility.accessfu.quicknav_modes";
|
||||
const QUICKNAV_INDEX_PREF = "accessibility.accessfu.quicknav_index";
|
||||
|
||||
const GECKOVIEW_MESSAGE = {
|
||||
ACTIVATE: "GeckoView:AccessibilityActivate",
|
||||
VIEW_FOCUSED: "GeckoView:AccessibilityViewFocused",
|
||||
LONG_PRESS: "GeckoView:AccessibilityLongPress",
|
||||
BY_GRANULARITY: "GeckoView:AccessibilityByGranularity",
|
||||
NEXT: "GeckoView:AccessibilityNext",
|
||||
PREVIOUS: "GeckoView:AccessibilityPrevious",
|
||||
SCROLL_BACKWARD: "GeckoView:AccessibilityScrollBackward",
|
||||
SCROLL_FORWARD: "GeckoView:AccessibilityScrollForward",
|
||||
};
|
||||
|
||||
var AccessFu = {
|
||||
/**
|
||||
* Initialize chrome-layer accessibility functionality.
|
||||
* If accessibility is enabled on the platform, then a special accessibility
|
||||
* mode is started.
|
||||
*/
|
||||
attach: function attach(aWindow) {
|
||||
attach: function attach(aWindow, aInTest = false) {
|
||||
Utils.init(aWindow);
|
||||
|
||||
if (Utils.MozBuildApp === "mobile/android") {
|
||||
EventDispatcher.instance.dispatch("Accessibility:Ready");
|
||||
EventDispatcher.instance.registerListener(this, "Accessibility:Settings");
|
||||
if (!aInTest) {
|
||||
this._enable();
|
||||
}
|
||||
|
||||
this._activatePref = new PrefCache(
|
||||
"accessibility.accessfu.activate", this._enableOrDisable.bind(this));
|
||||
|
||||
this._enableOrDisable();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -49,10 +49,7 @@ var AccessFu = {
|
|||
if (this._enabled) {
|
||||
this._disable();
|
||||
}
|
||||
if (Utils.MozBuildApp === "mobile/android") {
|
||||
EventDispatcher.instance.unregisterListener(this, "Accessibility:Settings");
|
||||
}
|
||||
delete this._activatePref;
|
||||
|
||||
Utils.uninit();
|
||||
},
|
||||
|
||||
|
@ -117,16 +114,8 @@ var AccessFu = {
|
|||
PointerAdapter.start();
|
||||
|
||||
if (Utils.MozBuildApp === "mobile/android") {
|
||||
EventDispatcher.instance.registerListener(this, [
|
||||
"Accessibility:ActivateObject",
|
||||
"Accessibility:Focus",
|
||||
"Accessibility:LongPress",
|
||||
"Accessibility:MoveByGranularity",
|
||||
"Accessibility:NextObject",
|
||||
"Accessibility:PreviousObject",
|
||||
"Accessibility:ScrollBackward",
|
||||
"Accessibility:ScrollForward",
|
||||
]);
|
||||
Utils.win.WindowEventDispatcher.registerListener(this,
|
||||
Object.values(GECKOVIEW_MESSAGE));
|
||||
}
|
||||
|
||||
Services.obs.addObserver(this, "remote-browser-shown");
|
||||
|
@ -172,16 +161,8 @@ var AccessFu = {
|
|||
Services.obs.removeObserver(this, "inprocess-browser-shown");
|
||||
|
||||
if (Utils.MozBuildApp === "mobile/android") {
|
||||
EventDispatcher.instance.unregisterListener(this, [
|
||||
"Accessibility:ActivateObject",
|
||||
"Accessibility:Focus",
|
||||
"Accessibility:LongPress",
|
||||
"Accessibility:MoveByGranularity",
|
||||
"Accessibility:NextObject",
|
||||
"Accessibility:PreviousObject",
|
||||
"Accessibility:ScrollBackward",
|
||||
"Accessibility:ScrollForward",
|
||||
]);
|
||||
Utils.win.WindowEventDispatcher.unregisterListener(this,
|
||||
Object.values(GECKOVIEW_MESSAGE));
|
||||
}
|
||||
|
||||
delete this._quicknavModesPref;
|
||||
|
@ -195,23 +176,6 @@ var AccessFu = {
|
|||
Logger.info("AccessFu:Disabled");
|
||||
},
|
||||
|
||||
_enableOrDisable: function _enableOrDisable() {
|
||||
try {
|
||||
if (!this._activatePref) {
|
||||
return;
|
||||
}
|
||||
let activatePref = this._activatePref.value;
|
||||
if (activatePref == ACCESSFU_ENABLE ||
|
||||
this._systemPref && activatePref == ACCESSFU_AUTO) {
|
||||
this._enable();
|
||||
} else {
|
||||
this._disable();
|
||||
}
|
||||
} catch (x) {
|
||||
dump("Error " + x.message + " " + x.fileName + ":" + x.lineNumber);
|
||||
}
|
||||
},
|
||||
|
||||
receiveMessage: function receiveMessage(aMessage) {
|
||||
Logger.debug(() => {
|
||||
return ["Recieved", aMessage.name, JSON.stringify(aMessage.json)];
|
||||
|
@ -296,40 +260,43 @@ var AccessFu = {
|
|||
|
||||
onEvent(event, data, callback) {
|
||||
switch (event) {
|
||||
case "Accessibility:Settings":
|
||||
this._systemPref = data.enabled;
|
||||
this._enableOrDisable();
|
||||
case GECKOVIEW_MESSAGE.SETTINGS:
|
||||
if (data.enabled) {
|
||||
this._enable();
|
||||
} else {
|
||||
this._disable();
|
||||
}
|
||||
break;
|
||||
case "Accessibility:NextObject":
|
||||
case "Accessibility:PreviousObject": {
|
||||
case GECKOVIEW_MESSAGE.NEXT:
|
||||
case GECKOVIEW_MESSAGE.PREVIOUS: {
|
||||
let rule = "Simple";
|
||||
if (data && data.rule && data.rule.length) {
|
||||
rule = data.rule.substr(0, 1).toUpperCase() +
|
||||
data.rule.substr(1).toLowerCase();
|
||||
}
|
||||
let method = event.replace(/Accessibility:(\w+)Object/, "move$1");
|
||||
let method = event.replace(/GeckoView:Accessibility(\w+)/, "move$1");
|
||||
this.Input.moveCursor(method, rule, "gesture");
|
||||
break;
|
||||
}
|
||||
case "Accessibility:ActivateObject":
|
||||
case GECKOVIEW_MESSAGE.ACTIVATE:
|
||||
this.Input.activateCurrent(data);
|
||||
break;
|
||||
case "Accessibility:LongPress":
|
||||
case GECKOVIEW_MESSAGE.LONG_PRESS:
|
||||
this.Input.sendContextMenuMessage();
|
||||
break;
|
||||
case "Accessibility:ScrollForward":
|
||||
case GECKOVIEW_MESSAGE.SCROLL_FORWARD:
|
||||
this.Input.androidScroll("forward");
|
||||
break;
|
||||
case "Accessibility:ScrollBackward":
|
||||
case GECKOVIEW_MESSAGE.SCROLL_BACKWARD:
|
||||
this.Input.androidScroll("backward");
|
||||
break;
|
||||
case "Accessibility:Focus":
|
||||
case GECKOVIEW_MESSAGE.VIEW_FOCUSED:
|
||||
this._focused = data.gainFocus;
|
||||
if (this._focused) {
|
||||
this.autoMove({ forcePresent: true, noOpIfOnScreen: true });
|
||||
}
|
||||
break;
|
||||
case "Accessibility:MoveByGranularity":
|
||||
case GECKOVIEW_MESSAGE.BY_GRANULARITY:
|
||||
this.Input.moveByGranularity(data);
|
||||
break;
|
||||
}
|
||||
|
@ -384,14 +351,7 @@ var AccessFu = {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// A settings change, it does not have an event type
|
||||
if (aEvent.settingName == SCREENREADER_SETTING) {
|
||||
this._systemPref = aEvent.settingValue;
|
||||
this._enableOrDisable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -585,7 +545,7 @@ var Output = {
|
|||
const ANDROID_VIEW_TEXT_SELECTION_CHANGED = 0x2000;
|
||||
|
||||
for (let androidEvent of aDetails) {
|
||||
androidEvent.type = "Accessibility:Event";
|
||||
androidEvent.type = "GeckoView:AccessibilityEvent";
|
||||
if (androidEvent.bounds) {
|
||||
androidEvent.bounds = AccessFu.adjustContentBounds(
|
||||
androidEvent.bounds, aBrowser);
|
||||
|
|
|
@ -141,7 +141,8 @@ var Utils = { // jshint ignore:line
|
|||
|
||||
get CurrentBrowser() {
|
||||
if (!this.BrowserApp) {
|
||||
return null;
|
||||
// Get the first content browser element when no 'BrowserApp' exists.
|
||||
return this.win.document.querySelector("browser[type=content]");
|
||||
}
|
||||
if (this.MozBuildApp == "b2g") {
|
||||
return this.BrowserApp.contentBrowser;
|
||||
|
|
|
@ -141,7 +141,11 @@ var AccessFuTest = {
|
|||
// Start AccessFu and put it in stand-by.
|
||||
ChromeUtils.import("resource://gre/modules/accessibility/AccessFu.jsm");
|
||||
|
||||
AccessFu.attach(getMainChromeWindow(window));
|
||||
let chromeWin = getMainChromeWindow(window);
|
||||
chromeWin.WindowEventDispatcher = {
|
||||
dispatch: () => {},
|
||||
sendRequest: () => {}
|
||||
};
|
||||
|
||||
AccessFu.readyCallback = function readyCallback() {
|
||||
// Enable logging to the console service.
|
||||
|
@ -149,6 +153,8 @@ var AccessFuTest = {
|
|||
Logger.logLevel = Logger.DEBUG;
|
||||
};
|
||||
|
||||
AccessFu.attach(chromeWin, true);
|
||||
|
||||
var prefs = [["accessibility.accessfu.notify_output", 1]];
|
||||
prefs.push.apply(prefs, aAdditionalPrefs);
|
||||
|
||||
|
|
|
@ -13,14 +13,6 @@
|
|||
src="./jsatcommon.js"></script>
|
||||
<script type="application/javascript">
|
||||
|
||||
function prefStart() {
|
||||
AccessFuTest.once_log("AccessFu:Enabled", () =>
|
||||
ok(AccessFu._enabled, "AccessFu was enabled again."));
|
||||
AccessFuTest.once_log("EventManager.start", AccessFuTest.nextTest);
|
||||
// Start AccessFu via pref.
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.accessfu.activate", 1]]});
|
||||
}
|
||||
|
||||
// Listen for 'EventManager.stop' and enable AccessFu again.
|
||||
function settingsStart() {
|
||||
isnot(AccessFu._enabled, true, "AccessFu was disabled.");
|
||||
|
@ -47,19 +39,7 @@
|
|||
AccessFu._disable();
|
||||
}
|
||||
|
||||
// Listen for initial 'EventManager.start' and disable AccessFu.
|
||||
function prefStop() {
|
||||
ok(AccessFu._enabled, "AccessFu was started via preference.");
|
||||
AccessFuTest.once_log("AccessFu:Disabled", () =>
|
||||
isnot(AccessFu._enabled, true, "AccessFu was disabled."));
|
||||
AccessFuTest.once_log("EventManager.stop", AccessFuTest.nextTest);
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.accessfu.activate", 0]]});
|
||||
}
|
||||
|
||||
function doTest() {
|
||||
AccessFuTest.addFunc(prefStart);
|
||||
AccessFuTest.addFunc(prefStop);
|
||||
AccessFuTest.addFunc(settingsStart);
|
||||
AccessFuTest.addFunc(settingsStop);
|
||||
AccessFuTest.waitForExplicitFinish();
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
<script type="application/javascript">
|
||||
|
||||
function startAccessFu() {
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.accessfu.activate", 1]]});
|
||||
AccessFuTest.once_log("EventManager.start", AccessFuTest.nextTest);
|
||||
AccessFu._enable();
|
||||
}
|
||||
|
||||
function stopAccessFu() {
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.accessfu.activate", 0]]});
|
||||
AccessFuTest.once_log("EventManager.stop", () => AccessFuTest.finish());
|
||||
AccessFu._disable();
|
||||
}
|
||||
|
||||
function hide(id) {
|
||||
|
|
|
@ -13,10 +13,9 @@
|
|||
src="./jsatcommon.js"></script>
|
||||
<script type="application/javascript">
|
||||
|
||||
function prefStart() {
|
||||
// Start AccessFu via pref.
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.accessfu.activate", 1]]});
|
||||
function startAccessFu() {
|
||||
AccessFuTest.once_log("EventManager.start", AccessFuTest.nextTest);
|
||||
AccessFu._enable();
|
||||
}
|
||||
|
||||
function nextMode(aCurrentMode, aNextMode) {
|
||||
|
@ -69,15 +68,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Listen for initial 'EventManager.start' and disable AccessFu.
|
||||
function prefStop() {
|
||||
ok(AccessFu._enabled, "AccessFu was started via preference.");
|
||||
function stopAccessFu() {
|
||||
ok(AccessFu._enabled, "AccessFu is enabled.");
|
||||
AccessFuTest.once_log("EventManager.stop", () => AccessFuTest.finish());
|
||||
SpecialPowers.pushPrefEnv({"set": [["accessibility.accessfu.activate", 0]]});
|
||||
AccessFu._disable();
|
||||
}
|
||||
|
||||
function doTest() {
|
||||
AccessFuTest.addFunc(prefStart);
|
||||
AccessFuTest.addFunc(startAccessFu);
|
||||
AccessFuTest.addFunc(nextMode("Link", "Heading"));
|
||||
AccessFuTest.addFunc(nextMode("Heading", "FormElement"));
|
||||
AccessFuTest.addFunc(nextMode("FormElement", "Link"));
|
||||
|
@ -86,7 +84,7 @@
|
|||
AccessFuTest.addFunc(prevMode("Link", "FormElement"));
|
||||
AccessFuTest.addFunc(setMode(1, "Heading"));
|
||||
AccessFuTest.addFunc(reconfigureModes);
|
||||
AccessFuTest.addFunc(prefStop);
|
||||
AccessFuTest.addFunc(stopAccessFu);
|
||||
AccessFuTest.waitForExplicitFinish();
|
||||
AccessFuTest.runTests([ // Will call SimpleTest.finish();
|
||||
["accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement"]]);
|
||||
|
|
|
@ -384,8 +384,7 @@ var gSync = {
|
|||
|
||||
const clients = this.remoteClients;
|
||||
for (let client of clients) {
|
||||
const type = client.formfactor && client.formfactor.includes("tablet") ?
|
||||
"tablet" : client.type;
|
||||
const type = Weave.Service.clientsEngine.getClientType(client.id);
|
||||
addTargetDevice(client.id, client.name, type, new Date(client.serverLastModified * 1000));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ add_task(async function setup() {
|
|||
await promiseSyncReady();
|
||||
// gSync.init() is called in a requestIdleCallback. Force its initialization.
|
||||
gSync.init();
|
||||
sinon.stub(Weave.Service.clientsEngine, "getClientType").returns("desktop");
|
||||
await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:mozilla");
|
||||
});
|
||||
|
||||
|
@ -193,6 +194,7 @@ add_task(async function test_page_contextmenu_fxa_disabled() {
|
|||
// However, browser_contextmenu.js contains tests that verify its presence.
|
||||
|
||||
add_task(async function teardown() {
|
||||
Weave.Service.clientsEngine.getClientType.restore();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
||||
|
|
|
@ -269,6 +269,7 @@ add_task(async function sendToDevice_syncNotReady_configured() {
|
|||
syncReady.get(() => true);
|
||||
lastSync.get(() => Date.now());
|
||||
sandbox.stub(gSync, "remoteClients").get(() => mockRemoteClients);
|
||||
sandbox.stub(Weave.Service.clientsEngine, "getClientType").callsFake(id => mockRemoteClients.find(c => c.id == id).type);
|
||||
});
|
||||
|
||||
let onShowingSubview = BrowserPageActions.sendToDevice.onShowingSubview;
|
||||
|
@ -405,6 +406,7 @@ add_task(async function sendToDevice_noDevices() {
|
|||
sandbox.stub(UIState, "get").returns({ status: UIState.STATUS_SIGNED_IN });
|
||||
sandbox.stub(gSync, "isSendableURI").returns(true);
|
||||
sandbox.stub(gSync, "remoteClients").get(() => []);
|
||||
sandbox.stub(Weave.Service.clientsEngine, "getClientType").callsFake(id => mockRemoteClients.find(c => c.id == id).type);
|
||||
|
||||
let cleanUp = () => {
|
||||
sandbox.restore();
|
||||
|
@ -470,6 +472,7 @@ add_task(async function sendToDevice_devices() {
|
|||
sandbox.stub(UIState, "get").returns({ status: UIState.STATUS_SIGNED_IN });
|
||||
sandbox.stub(gSync, "isSendableURI").returns(true);
|
||||
sandbox.stub(gSync, "remoteClients").get(() => mockRemoteClients);
|
||||
sandbox.stub(Weave.Service.clientsEngine, "getClientType").callsFake(id => mockRemoteClients.find(c => c.id == id).type);
|
||||
|
||||
let cleanUp = () => {
|
||||
sandbox.restore();
|
||||
|
@ -534,6 +537,7 @@ add_task(async function sendToDevice_inUrlbar() {
|
|||
sandbox.stub(UIState, "get").returns({ status: UIState.STATUS_SIGNED_IN });
|
||||
sandbox.stub(gSync, "isSendableURI").returns(true);
|
||||
sandbox.stub(gSync, "remoteClients").get(() => mockRemoteClients);
|
||||
sandbox.stub(Weave.Service.clientsEngine, "getClientType").callsFake(id => mockRemoteClients.find(c => c.id == id).type);
|
||||
|
||||
let cleanUp = () => {
|
||||
sandbox.restore();
|
||||
|
|
|
@ -67,6 +67,10 @@ ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
|||
// The window becomes visible after OnStopRequest, so make this happen now.
|
||||
win.stop();
|
||||
|
||||
let { TelemetryTimestamps } =
|
||||
ChromeUtils.import("resource://gre/modules/TelemetryTimestamps.jsm", {});
|
||||
TelemetryTimestamps.add("blankWindowShown");
|
||||
|
||||
// Used in nsBrowserContentHandler.js to close unwanted blank windows.
|
||||
docElt.setAttribute("windowtype", "navigator:blank");
|
||||
})();
|
||||
|
|
|
@ -231,14 +231,10 @@ TabListView.prototype = {
|
|||
} else {
|
||||
itemNode.classList.remove("selected");
|
||||
}
|
||||
if (item.isMobile) {
|
||||
itemNode.classList.add("device-image-mobile");
|
||||
} else {
|
||||
itemNode.classList.add("device-image-desktop");
|
||||
}
|
||||
if (item.focused) {
|
||||
itemNode.focus();
|
||||
}
|
||||
itemNode.setAttribute("clientType", item.clientType);
|
||||
itemNode.dataset.id = item.id;
|
||||
itemNode.querySelector(".item-title").textContent = item.name;
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@ const FIXTURE = [
|
|||
"type": "client",
|
||||
"lastModified": 1492201200,
|
||||
"name": "zcarter's Nightly on MacBook-Pro-25",
|
||||
"isMobile": false,
|
||||
"clientType": "desktop",
|
||||
"tabs": [
|
||||
{
|
||||
"type": "tab",
|
||||
|
@ -23,7 +23,7 @@ const FIXTURE = [
|
|||
"type": "client",
|
||||
"lastModified": 1492201200,
|
||||
"name": "laptop",
|
||||
"isMobile": false,
|
||||
"clientType": "desktop",
|
||||
"tabs": [
|
||||
{
|
||||
"type": "tab",
|
||||
|
@ -57,7 +57,7 @@ const FIXTURE = [
|
|||
"type": "client",
|
||||
"lastModified": 1492201200,
|
||||
"name": "desktop",
|
||||
"isMobile": false,
|
||||
"clientType": "desktop",
|
||||
"tabs": []
|
||||
}
|
||||
];
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
%include ../../shared/customizableui/panelUI.inc.css
|
||||
|
||||
#BMB_bookmarksPopup > menuitem[type="checkbox"] {
|
||||
-moz-appearance: none !important; /* important, to override toolkit rule */
|
||||
}
|
||||
|
||||
#BMB_bookmarksPopup menupopup {
|
||||
-moz-appearance: none;
|
||||
background: var(--arrowpanel-background);
|
||||
|
|
|
@ -49,8 +49,6 @@ browser.jar:
|
|||
skin/classic/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
|
||||
skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg)
|
||||
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
|
||||
skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png)
|
||||
|
||||
[extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar:
|
||||
|
|
|
@ -58,8 +58,6 @@ browser.jar:
|
|||
skin/classic/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
|
||||
skin/classic/browser/tabbrowser/tabDragIndicator@2x.png (tabbrowser/tabDragIndicator@2x.png)
|
||||
skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg)
|
||||
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
|
||||
skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png)
|
||||
|
||||
[extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}] chrome.jar:
|
||||
|
|
|
@ -1015,7 +1015,7 @@ menuitem.subviewbutton@menuStateHover@,
|
|||
background-color: var(--arrowpanel-dimmed);
|
||||
}
|
||||
|
||||
panelview .toolbarbutton-1:-moz-any(@buttonStateActive@,[checked=true]),
|
||||
panelview .toolbarbutton-1@buttonStateActive@,
|
||||
toolbarbutton.subviewbutton@buttonStateActive@,
|
||||
menu.subviewbutton@menuStateActive@,
|
||||
menuitem.subviewbutton@menuStateActive@,
|
||||
|
@ -1295,10 +1295,6 @@ toolbarpaletteitem[place="menu-panel"] > .subviewbutton-nav::after {
|
|||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
menuitem[checked="true"].subviewbutton > .menu-iconic-left {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#PanelUI-panicView > .panel-subview-body,
|
||||
#PanelUI-panicView {
|
||||
overflow: visible;
|
||||
|
|
До Ширина: | Высота: | Размер: 540 B После Ширина: | Высота: | Размер: 540 B |
|
@ -128,7 +128,7 @@
|
|||
skin/classic/browser/check-animation.svg (../shared/icons/check-animation.svg)
|
||||
skin/classic/browser/customize.svg (../shared/icons/customize.svg)
|
||||
skin/classic/browser/developer.svg (../shared/icons/developer.svg)
|
||||
skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg)
|
||||
skin/classic/browser/device-phone.svg (../shared/icons/device-phone.svg)
|
||||
skin/classic/browser/device-tablet.svg (../shared/icons/device-tablet.svg)
|
||||
skin/classic/browser/device-desktop.svg (../shared/icons/device-desktop.svg)
|
||||
skin/classic/browser/edit-copy.svg (../shared/icons/edit-copy.svg)
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
}
|
||||
|
||||
#PanelUI-remotetabs-view-managedevices {
|
||||
list-style-image: url("chrome://browser/skin/device-mobile.svg");
|
||||
list-style-image: url("chrome://browser/skin/device-phone.svg");
|
||||
}
|
||||
|
||||
#appMenuViewHistorySidebar,
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M15,14H1a1,1,0,0,1-1-1V12.526H16V13A1,1,0,0,1,15,14ZM1,4A1,1,0,0,1,2,3H14a1,1,0,0,1,1,1v8H1V4Zm1,7H14V4H2v7Z"/>
|
||||
<rect fill="context-fill" fill-opacity="0.15" x="2" y="4" width="12" height="7"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 535 B |
|
@ -1,8 +0,0 @@
|
|||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M12,16H4a1,1,0,0,1-1-1V1A1,1,0,0,1,4,0h8a1,1,0,0,1,1,1V15A1,1,0,0,1,12,16Zm-4-.684a0.785,0.785,0,1,0-.785-0.785A0.785,0.785,0,0,0,8,15.316ZM12,2H4V13h8V2Z"/>
|
||||
<rect fill="context-fill" fill-opacity="0.15" x="4" y="2" width="8" height="11"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 581 B |
|
@ -88,24 +88,25 @@ body {
|
|||
padding-inline-start: 20px;
|
||||
}
|
||||
|
||||
.item.client.device-image-desktop > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://browser/skin/sync-desktopIcon.svg");
|
||||
.item.client[clientType] > .item-title-container > .item-icon-container {
|
||||
-moz-context-properties: fill;
|
||||
fill: #4d4d4d;
|
||||
}
|
||||
|
||||
.item.client.device-image-desktop.selected:focus > .item-title-container > .item-icon-container {
|
||||
.item.client[clientType].selected:focus > .item-title-container > .item-icon-container {
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.item.client.device-image-mobile > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://browser/skin/sync-mobileIcon.svg");
|
||||
-moz-context-properties: fill;
|
||||
fill: #4d4d4d;
|
||||
.item.client[clientType=phone] > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://browser/skin/device-phone.svg");
|
||||
}
|
||||
|
||||
.item.client.device-image-mobile.selected:focus > .item-title-container > .item-icon-container {
|
||||
fill: white;
|
||||
.item.client[clientType=tablet] > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://browser/skin/device-tablet.svg");
|
||||
}
|
||||
|
||||
.item.client[clientType=desktop] > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://browser/skin/device-desktop.svg");
|
||||
}
|
||||
|
||||
.item.tab > .item-title-container > .item-icon-container {
|
||||
|
|
|
@ -151,8 +151,8 @@
|
|||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.pageAction-sendToDevice-device[clientType=mobile] {
|
||||
list-style-image: url("chrome://browser/skin/device-mobile.svg");
|
||||
.pageAction-sendToDevice-device[clientType=phone] {
|
||||
list-style-image: url("chrome://browser/skin/device-phone.svg");
|
||||
}
|
||||
|
||||
.pageAction-sendToDevice-device[clientType=tablet] {
|
||||
|
|
|
@ -37,9 +37,7 @@
|
|||
}
|
||||
|
||||
/* Disabled empty item looks too small otherwise, because it has no icon. */
|
||||
menuitem.subviewbutton[disabled]:not(.menuitem-iconic),
|
||||
/* Same for checkbox menu items, whose icons lose size due to -moz-appearance: none: */
|
||||
menuitem[type="checkbox"].subviewbutton {
|
||||
menuitem.subviewbutton[disabled]:not(.menuitem-iconic) {
|
||||
/* This is 16px for an icon + 3px for its margins + 1px for its padding +
|
||||
* 2px for its border, see above */
|
||||
min-height: 22px;
|
||||
|
|
|
@ -16,8 +16,6 @@ browser.jar:
|
|||
* skin/classic/browser/searchbar.css
|
||||
skin/classic/browser/setDesktopBackground.css
|
||||
skin/classic/browser/slowStartup-16.png
|
||||
skin/classic/browser/sync-desktopIcon.svg (../shared/sync-desktopIcon.svg)
|
||||
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
|
||||
skin/classic/browser/webRTC-indicator.css (../shared/webRTC-indicator.css)
|
||||
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
|
||||
skin/classic/browser/customizableui/menu-arrow.svg (customizableui/menu-arrow.svg)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
This is the debugger.html project output.
|
||||
See https://github.com/devtools-html/debugger.html
|
||||
|
||||
Version 35.0
|
||||
Version 36.0
|
||||
|
||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-34...release-35
|
||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-35...release-36
|
||||
|
||||
Packages:
|
||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
||||
|
|
|
@ -578,14 +578,16 @@ menuseparator {
|
|||
.folder,
|
||||
.domain,
|
||||
.source-icon,
|
||||
.file {
|
||||
.file,
|
||||
.extension {
|
||||
background-color: var(--theme-comment);
|
||||
}
|
||||
|
||||
.worker,
|
||||
.file,
|
||||
.folder,
|
||||
.source-icon {
|
||||
.source-icon,
|
||||
.extension {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
@ -612,6 +614,12 @@ img.source-icon {
|
|||
height: 15px;
|
||||
}
|
||||
|
||||
img.extension {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin-inline-start: 2px;
|
||||
}
|
||||
|
||||
img.result-item-icon {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
|
@ -645,6 +653,10 @@ img.typescript {
|
|||
mask: url("chrome://devtools/skin/images/debugger/typescript.svg") no-repeat;
|
||||
}
|
||||
|
||||
img.extension {
|
||||
mask: url("chrome://devtools/skin/images/debugger/extension.svg") no-repeat;
|
||||
}
|
||||
|
||||
img.file {
|
||||
mask: url("chrome://devtools/skin/images/debugger/file.svg") no-repeat;
|
||||
width: 13px;
|
||||
|
@ -654,7 +666,8 @@ img.file {
|
|||
img.domain,
|
||||
img.folder,
|
||||
img.file,
|
||||
img.source-icon {
|
||||
img.source-icon,
|
||||
img.extension {
|
||||
mask-size: 100%;
|
||||
margin-inline-end: 5px;
|
||||
display: inline-block;
|
||||
|
@ -2981,7 +2994,6 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
|||
}
|
||||
|
||||
.input-expression::placeholder {
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
color: var(--theme-comment);
|
||||
}
|
||||
|
@ -2998,6 +3010,7 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
|||
}
|
||||
.expression-input-container {
|
||||
display: flex;
|
||||
border: 1px solid var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.expression-container {
|
||||
|
@ -3427,7 +3440,8 @@ img.reverseStepIn,
|
|||
img.reverseStepOut,
|
||||
img.replay-previous,
|
||||
img.replay-next,
|
||||
img.resume {
|
||||
img.resume,
|
||||
img.shortcuts {
|
||||
background-color: var(--theme-body-color);
|
||||
}
|
||||
|
||||
|
@ -3504,6 +3518,10 @@ img.resume {
|
|||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.command-bar img.shortcuts {
|
||||
mask: url("chrome://devtools/skin/images/help.svg") no-repeat;
|
||||
}
|
||||
|
||||
.command-bar .replay-inactive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
@ -3933,6 +3951,7 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||
margin-inline-start: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: default;
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.source-tab:first-child {
|
||||
|
|
|
@ -3640,7 +3640,7 @@ function update(state = initialSourcesState(), action) {
|
|||
case "BLACKBOX":
|
||||
if (action.status === "done") {
|
||||
const url = action.source.url;
|
||||
const isBlackBoxed = action.value.isBlackBoxed;
|
||||
const { isBlackBoxed } = action.value;
|
||||
updateBlackBoxList(url, isBlackBoxed);
|
||||
return state.setIn(["sources", action.source.id, "isBlackBoxed"], isBlackBoxed);
|
||||
}
|
||||
|
@ -6035,13 +6035,11 @@ function enableBreakpoint(location) {
|
|||
return;
|
||||
}
|
||||
|
||||
const action = {
|
||||
return dispatch({
|
||||
type: "ENABLE_BREAKPOINT",
|
||||
breakpoint,
|
||||
[_promise.PROMISE]: (0, _addBreakpoint2.default)(getState, client, sourceMaps, breakpoint)
|
||||
};
|
||||
|
||||
return dispatch(action);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -6062,12 +6060,10 @@ function disableBreakpoint(location) {
|
|||
await client.removeBreakpoint(bp.generatedLocation);
|
||||
const newBreakpoint = _extends({}, bp, { disabled: true });
|
||||
|
||||
const action = {
|
||||
return dispatch({
|
||||
type: "DISABLE_BREAKPOINT",
|
||||
breakpoint: newBreakpoint
|
||||
};
|
||||
|
||||
return dispatch(action);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -6386,7 +6382,7 @@ function clearExpressionError() {
|
|||
|
||||
function updateExpression(input, expression) {
|
||||
return async ({ dispatch, getState }) => {
|
||||
if (!input || input == expression.input) {
|
||||
if (!input) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -9743,6 +9739,7 @@ exports.resizeToggleButton = resizeToggleButton;
|
|||
* 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/>. */
|
||||
|
||||
|
||||
/* Checks to see if the root element is available and
|
||||
* if the element is visible. We check the width of the element
|
||||
* because it is more reliable than either checking a focus state or
|
||||
|
@ -12699,6 +12696,11 @@ async function fetchSources() {
|
|||
*/
|
||||
async function checkServerSupportsListWorkers() {
|
||||
const root = await tabTarget.root;
|
||||
// root is not available on all debug targets.
|
||||
if (!root) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const deviceFront = await (0, _frontsDevice.getDeviceFront)(debuggerClient, root);
|
||||
const description = await deviceFront.getDescription();
|
||||
|
||||
|
@ -15203,9 +15205,11 @@ const svg = {
|
|||
coffeescript: __webpack_require__(2250),
|
||||
dojo: __webpack_require__(806),
|
||||
domain: __webpack_require__(353),
|
||||
extension: __webpack_require__(3632),
|
||||
file: __webpack_require__(354),
|
||||
folder: __webpack_require__(355),
|
||||
globe: __webpack_require__(356),
|
||||
help: __webpack_require__(3633),
|
||||
home: __webpack_require__(3604),
|
||||
javascript: __webpack_require__(2251),
|
||||
jquery: __webpack_require__(999),
|
||||
|
@ -16917,7 +16921,8 @@ class SourcesTree extends _react.Component {
|
|||
renderItemName(name) {
|
||||
const hosts = {
|
||||
"ng://": "Angular",
|
||||
"webpack://": "Webpack"
|
||||
"webpack://": "Webpack",
|
||||
"moz-extension://": L10N.getStr("extensionsText")
|
||||
};
|
||||
|
||||
return hosts[name] || name;
|
||||
|
@ -17065,9 +17070,10 @@ var _initialiseProps = function () {
|
|||
|
||||
if (item.path === "webpack://") {
|
||||
return _react2.default.createElement(_Svg2.default, { name: "webpack" });
|
||||
}
|
||||
if (item.path === "/Angular") {
|
||||
} else if (item.path === "ng://") {
|
||||
return _react2.default.createElement(_Svg2.default, { name: "angular" });
|
||||
} else if (item.path === "moz-extension://") {
|
||||
return _react2.default.createElement("img", { className: "extension" });
|
||||
}
|
||||
|
||||
if (depth === 0 && projectRoot === "") {
|
||||
|
@ -22810,6 +22816,18 @@ function debugBtn(onClick, type, className, tooltip) {
|
|||
}
|
||||
|
||||
class SecondaryPanes extends _react.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.onExpressionAdded = () => {
|
||||
this.setState({ showExpressionsInput: false });
|
||||
};
|
||||
|
||||
this.state = {
|
||||
showExpressionsInput: false
|
||||
};
|
||||
}
|
||||
|
||||
renderBreakpointsToggle() {
|
||||
const {
|
||||
toggleAllBreakpoints,
|
||||
|
@ -22850,7 +22868,10 @@ class SecondaryPanes extends _react.Component {
|
|||
return [debugBtn(evt => {
|
||||
evt.stopPropagation();
|
||||
this.props.evaluateExpressions();
|
||||
}, "refresh", "refresh", L10N.getStr("watchExpressions.refreshButton"))];
|
||||
}, "refresh", "refresh", L10N.getStr("watchExpressions.refreshButton")), debugBtn(evt => {
|
||||
evt.stopPropagation();
|
||||
this.setState({ showExpressionsInput: true });
|
||||
}, "plus", "plus", L10N.getStr("expressions.placeholder"))];
|
||||
}
|
||||
|
||||
getScopeItem() {
|
||||
|
@ -22884,7 +22905,10 @@ class SecondaryPanes extends _react.Component {
|
|||
header: L10N.getStr("watchExpressions.header"),
|
||||
className: "watch-expressions-pane",
|
||||
buttons: this.watchExpressionHeaderButtons(),
|
||||
component: _react2.default.createElement(_Expressions2.default, null),
|
||||
component: _react2.default.createElement(_Expressions2.default, {
|
||||
showInput: this.state.showExpressionsInput,
|
||||
onExpressionAdded: this.onExpressionAdded
|
||||
}),
|
||||
opened: _prefs.prefs.expressionsVisible,
|
||||
onToggle: opened => {
|
||||
_prefs.prefs.expressionsVisible = opened;
|
||||
|
@ -23101,9 +23125,9 @@ var _reselect = __webpack_require__(993);
|
|||
|
||||
var _lodash = __webpack_require__(2);
|
||||
|
||||
var _BreakpointItem = __webpack_require__(3630);
|
||||
var _Breakpoint = __webpack_require__(3634);
|
||||
|
||||
var _BreakpointItem2 = _interopRequireDefault(_BreakpointItem);
|
||||
var _Breakpoint2 = _interopRequireDefault(_Breakpoint);
|
||||
|
||||
var _actions = __webpack_require__(1354);
|
||||
|
||||
|
@ -23169,7 +23193,7 @@ class Breakpoints extends _react.Component {
|
|||
}
|
||||
|
||||
renderBreakpoint(breakpoint) {
|
||||
return _react2.default.createElement(_BreakpointItem2.default, {
|
||||
return _react2.default.createElement(_Breakpoint2.default, {
|
||||
key: breakpoint.locationId,
|
||||
breakpoint: breakpoint,
|
||||
onClick: () => this.selectBreakpoint(breakpoint),
|
||||
|
@ -23293,11 +23317,16 @@ class Expressions extends _react.Component {
|
|||
}
|
||||
};
|
||||
|
||||
this.hideInput = () => {
|
||||
this.props.onExpressionAdded();
|
||||
};
|
||||
|
||||
this.handleExistingSubmit = async (e, expression) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
this.props.updateExpression(this.state.inputValue, expression);
|
||||
this.hideInput();
|
||||
};
|
||||
|
||||
this.handleNewSubmit = async e => {
|
||||
|
@ -23312,6 +23341,10 @@ class Expressions extends _react.Component {
|
|||
editIndex: -1,
|
||||
inputValue: this.props.expressionError ? inputValue : ""
|
||||
});
|
||||
|
||||
if (!this.props.expressionError) {
|
||||
this.hideInput();
|
||||
}
|
||||
};
|
||||
|
||||
this.renderExpression = (expression, index) => {
|
||||
|
@ -23364,7 +23397,11 @@ class Expressions extends _react.Component {
|
|||
);
|
||||
};
|
||||
|
||||
this.state = { editing: false, editIndex: -1, inputValue: "" };
|
||||
this.state = {
|
||||
editing: false,
|
||||
editIndex: -1,
|
||||
inputValue: ""
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -23382,8 +23419,9 @@ class Expressions extends _react.Component {
|
|||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
const { editing, inputValue } = this.state;
|
||||
const { expressions, expressionError } = this.props;
|
||||
return expressions !== nextProps.expressions || expressionError !== nextProps.expressionError || editing !== nextState.editing || inputValue !== nextState.inputValue;
|
||||
const { expressions, expressionError, showInput } = this.props;
|
||||
|
||||
return expressions !== nextProps.expressions || expressionError !== nextProps.expressionError || editing !== nextState.editing || inputValue !== nextState.inputValue || nextProps.showInput !== showInput;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
|
@ -23408,6 +23446,11 @@ class Expressions extends _react.Component {
|
|||
deleteExpression(expression);
|
||||
}
|
||||
|
||||
onBlur() {
|
||||
this.clear();
|
||||
this.hideInput();
|
||||
}
|
||||
|
||||
renderNewExpressionInput() {
|
||||
const { expressionError } = this.props;
|
||||
const { editing, inputValue } = this.state;
|
||||
|
@ -23424,8 +23467,9 @@ class Expressions extends _react.Component {
|
|||
type: "text",
|
||||
placeholder: placeholder,
|
||||
onChange: this.handleChange,
|
||||
onBlur: this.clear,
|
||||
onBlur: this.hideInput,
|
||||
onKeyDown: this.handleKeyDown,
|
||||
autoFocus: "true",
|
||||
value: !editing ? inputValue : ""
|
||||
}),
|
||||
_react2.default.createElement("input", { type: "submit", style: { display: "none" } })
|
||||
|
@ -23461,12 +23505,13 @@ class Expressions extends _react.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { expressions } = this.props;
|
||||
const { expressions, showInput } = this.props;
|
||||
|
||||
return _react2.default.createElement(
|
||||
"ul",
|
||||
{ className: "pane expressions-list" },
|
||||
expressions.map(this.renderExpression),
|
||||
this.renderNewExpressionInput()
|
||||
showInput && this.renderNewExpressionInput()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -24001,7 +24046,9 @@ class EventListeners extends _react.Component {
|
|||
|
||||
removeBreakpoint(event, breakpoint) {
|
||||
event.stopPropagation();
|
||||
this.props.removeBreakpoint(breakpoint.location);
|
||||
if (breakpoint) {
|
||||
this.props.removeBreakpoint(breakpoint.location);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -24200,6 +24247,7 @@ exports.default = Accordion;
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.debugBtn = debugBtn;
|
||||
|
||||
var _propTypes = __webpack_require__(20);
|
||||
|
||||
|
@ -24526,10 +24574,6 @@ Object.defineProperty(exports, "__esModule", {
|
|||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* 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/>. */
|
||||
|
||||
var _react = __webpack_require__(0);
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
|
@ -24538,29 +24582,19 @@ var _classnames = __webpack_require__(175);
|
|||
|
||||
var _classnames2 = _interopRequireDefault(_classnames);
|
||||
|
||||
var _CommandBar = __webpack_require__(1608);
|
||||
|
||||
__webpack_require__(1295);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function debugBtn(onClick, type, className, tooltip, disabled = false) {
|
||||
const props = {
|
||||
onClick,
|
||||
key: type,
|
||||
"aria-label": tooltip,
|
||||
title: tooltip,
|
||||
disabled
|
||||
};
|
||||
|
||||
return _react2.default.createElement(
|
||||
"button",
|
||||
_extends({ className: (0, _classnames2.default)(type, className) }, props),
|
||||
"?"
|
||||
);
|
||||
}
|
||||
/* 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/>. */
|
||||
|
||||
class UtilsBar extends _react.Component {
|
||||
renderUtilButtons() {
|
||||
return [debugBtn(this.props.toggleShortcutsModal, "shortcut", "active", L10N.getStr("shortcuts.buttonName"), false)];
|
||||
return [(0, _CommandBar.debugBtn)(this.props.toggleShortcutsModal, "shortcuts", "active", L10N.getStr("shortcuts.buttonName"), false)];
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -25923,6 +25957,8 @@ var _locColumn = __webpack_require__(2349);
|
|||
|
||||
var _findGeneratedBindingFromPosition = __webpack_require__(2358);
|
||||
|
||||
var _firefox = __webpack_require__(1500);
|
||||
|
||||
var _prefs = __webpack_require__(226);
|
||||
|
||||
var _log = __webpack_require__(2359);
|
||||
|
@ -26164,11 +26200,13 @@ function buildGeneratedBindingList(scopes, generatedAstScopes, thisBinding) {
|
|||
// the normal binding data we are working with.
|
||||
const frameThisOwner = generatedAstScopes.find(generated => "this" in generated.bindings);
|
||||
|
||||
let globalScope = null;
|
||||
const clientScopes = [];
|
||||
for (let s = scopes; s; s = s.parent) {
|
||||
const bindings = s.bindings ? Object.assign({}, ...s.bindings.arguments, s.bindings.variables) : {};
|
||||
|
||||
clientScopes.push(bindings);
|
||||
globalScope = s;
|
||||
}
|
||||
|
||||
const generatedMainScopes = generatedAstScopes.slice(0, -2);
|
||||
|
@ -26194,7 +26232,7 @@ function buildGeneratedBindingList(scopes, generatedAstScopes, thisBinding) {
|
|||
acc.push({
|
||||
name,
|
||||
loc,
|
||||
desc: bindings[name] || null
|
||||
desc: () => Promise.resolve(bindings[name] || null)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -26208,15 +26246,29 @@ function buildGeneratedBindingList(scopes, generatedAstScopes, thisBinding) {
|
|||
for (const generated of generatedGlobalScopes) {
|
||||
for (const name of Object.keys(generated.bindings)) {
|
||||
const { refs } = generated.bindings[name];
|
||||
for (const loc of refs) {
|
||||
const bindings = clientGlobalScopes.find(b => (0, _lodash.has)(b, name));
|
||||
const bindings = clientGlobalScopes.find(b => (0, _lodash.has)(b, name));
|
||||
|
||||
for (const loc of refs) {
|
||||
if (bindings) {
|
||||
generatedBindings.push({
|
||||
name,
|
||||
loc,
|
||||
desc: bindings[name]
|
||||
desc: () => Promise.resolve(bindings[name])
|
||||
});
|
||||
} else {
|
||||
const globalGrip = globalScope && globalScope.object;
|
||||
if (globalGrip) {
|
||||
// Should always exist, just checking to keep Flow happy.
|
||||
|
||||
generatedBindings.push({
|
||||
name,
|
||||
loc,
|
||||
desc: async () => {
|
||||
const objectClient = (0, _firefox.createObjectClient)(globalGrip);
|
||||
return (await objectClient.getProperty(name)).descriptor;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31367,7 +31419,9 @@ function createPrettySource(sourceId) {
|
|||
const prettySource = {
|
||||
url,
|
||||
id,
|
||||
isBlackBoxed: false,
|
||||
isPrettyPrinted: true,
|
||||
isWasm: false,
|
||||
contentType: "text/javascript",
|
||||
loadedState: "loading"
|
||||
};
|
||||
|
@ -31906,8 +31960,7 @@ function selectSourceURL(url, options = {}) {
|
|||
dispatch({
|
||||
type: "SELECT_SOURCE_URL",
|
||||
url: url,
|
||||
tabIndex: options.tabIndex,
|
||||
location: options.location
|
||||
line: options.location ? options.location.line : null
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -34910,7 +34963,7 @@ async function mapBindingReferenceToDescriptor(binding, mapped) {
|
|||
if (mapped.start.line === binding.loc.start.line && (0, _locColumn.locColumn)(mapped.start) >= (0, _locColumn.locColumn)(binding.loc.start) - 1 && (0, _locColumn.locColumn)(mapped.start) <= (0, _locColumn.locColumn)(binding.loc.end)) {
|
||||
return {
|
||||
name: binding.name,
|
||||
desc: binding.desc,
|
||||
desc: await binding.desc(),
|
||||
expression: binding.name
|
||||
};
|
||||
}
|
||||
|
@ -34932,7 +34985,7 @@ async function mapImportDeclarationToDescriptor(binding, mapped) {
|
|||
return null;
|
||||
}
|
||||
|
||||
const desc = await readDescriptorProperty(binding.desc, mapped.importName,
|
||||
const desc = await readDescriptorProperty((await binding.desc()), mapped.importName,
|
||||
// If the value was optimized out or otherwise unavailable, we skip it
|
||||
// entirely because there is a good chance that this means that this
|
||||
// isn't the right binding. This allows us to catch cases like
|
||||
|
@ -34994,7 +35047,7 @@ async function mapImportReferenceToDescriptor(binding, mapped) {
|
|||
}
|
||||
|
||||
let expression = binding.name;
|
||||
let desc = binding.desc;
|
||||
let desc = await binding.desc();
|
||||
|
||||
if (binding.loc.type === "ref") {
|
||||
const { meta } = binding.loc;
|
||||
|
@ -35062,12 +35115,31 @@ async function readDescriptorProperty(desc, property, requireValidObject = false
|
|||
}
|
||||
|
||||
function mappingContains(mapped, item) {
|
||||
return (item.start.line > mapped.start.line || item.start.line === mapped.start.line && (0, _locColumn.locColumn)(item.start) >= (0, _locColumn.locColumn)(mapped.start)) && (item.end.line < mapped.end.line || item.end.line === mapped.end.line && (0, _locColumn.locColumn)(item.end) <= (0, _locColumn.locColumn)(mapped.end));
|
||||
return positionCmp(item.start, mapped.start) >= 0 && positionCmp(item.end, mapped.end) <= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* * === 0 - Positions are equal.
|
||||
* * < 0 - first position before second position
|
||||
* * > 0 - first position after second position
|
||||
*/
|
||||
function positionCmp(p1, p2) {
|
||||
if (p1.line === p2.line) {
|
||||
const l1 = (0, _locColumn.locColumn)(p1);
|
||||
const l2 = (0, _locColumn.locColumn)(p2);
|
||||
|
||||
if (l1 === l2) {
|
||||
return 0;
|
||||
}
|
||||
return l1 < l2 ? -1 : 1;
|
||||
}
|
||||
|
||||
return p1.line < p2.line ? -1 : 1;
|
||||
}
|
||||
|
||||
async function getGeneratedLocationRange(pos, source, sourceMaps) {
|
||||
const start = await sourceMaps.getGeneratedLocation(pos.start, source);
|
||||
const end = await sourceMaps.getGeneratedLocation(pos.end, source);
|
||||
const start = await getGeneratedLocation(sourceMaps, pos.start, source);
|
||||
const end = await getGeneratedLocation(sourceMaps, pos.end, source);
|
||||
|
||||
// Since the map takes the closest location, sometimes mapping a
|
||||
// binding's location can point at the start of a binding listed after
|
||||
|
@ -35080,6 +35152,21 @@ async function getGeneratedLocationRange(pos, source, sourceMaps) {
|
|||
return { start, end };
|
||||
}
|
||||
|
||||
async function getGeneratedLocation(sourceMaps, pos, source) {
|
||||
const all = await sourceMaps.getAllGeneratedLocations(pos, source);
|
||||
if (all.length > 0) {
|
||||
// Grab the earliest mapping since generally if there are multiple
|
||||
// mappings, the later mappings are for random punctuation marks.
|
||||
return all.reduce((acc, p) => {
|
||||
return !acc || positionCmp(p, acc) < 0 ? p : acc;
|
||||
});
|
||||
}
|
||||
|
||||
// Fall back to the standard logic to take the mapping closest to the
|
||||
// target location.
|
||||
return await sourceMaps.getGeneratedLocation(pos, source);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2359:
|
||||
|
@ -39125,7 +39212,28 @@ module.exports = "<!-- This Source Code Form is subject to the terms of the Mozi
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3630:
|
||||
/***/ 3631:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<!-- 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/. --><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 28\"><path fill=\"context-fill\" d=\"M15 11h-1V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v6H1a1 1 0 0 0 0 2h14a1 1 0 1 0 0-2z\"></path></svg>"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3632:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<!-- 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/. --><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"context-fill\" d=\"M14.5 8c-.971 0-1 1-1.75 1a.765.765 0 0 1-.75-.75V5a1 1 0 0 0-1-1H7.75A.765.765 0 0 1 7 3.25c0-.75 1-.779 1-1.75C8 .635 7.1 0 6 0S4 .635 4 1.5c0 .971 1 1 1 1.75a.765.765 0 0 1-.75.75H1a1 1 0 0 0-1 1v2.25A.765.765 0 0 0 .75 8c.75 0 .779-1 1.75-1C3.365 7 4 7.9 4 9s-.635 2-1.5 2c-.971 0-1-1-1.75-1a.765.765 0 0 0-.75.75V15a1 1 0 0 0 1 1h3.25a.765.765 0 0 0 .75-.75c0-.75-1-.779-1-1.75 0-.865.9-1.5 2-1.5s2 .635 2 1.5c0 .971-1 1-1 1.75a.765.765 0 0 0 .75.75H11a1 1 0 0 0 1-1v-3.25a.765.765 0 0 1 .75-.75c.75 0 .779 1 1.75 1 .865 0 1.5-.9 1.5-2s-.635-2-1.5-2z\"></path></svg>"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3633:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<!-- 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/. --><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"context-fill\" d=\"M8 1a7 7 0 1 0 7 7 7.008 7.008 0 0 0-7-7zm0 13a6 6 0 1 1 6-6 6.007 6.007 0 0 1-6 6zM8 3.125A2.7 2.7 0 0 0 5.125 6a.875.875 0 0 0 1.75 0c0-1 .6-1.125 1.125-1.125a1.105 1.105 0 0 1 1.13.744.894.894 0 0 1-.53 1.016A2.738 2.738 0 0 0 7.125 9v.337a.875.875 0 0 0 1.75 0v-.37a1.041 1.041 0 0 1 .609-.824A2.637 2.637 0 0 0 10.82 5.16 2.838 2.838 0 0 0 8 3.125zm0 7.625A1.25 1.25 0 1 0 9.25 12 1.25 1.25 0 0 0 8 10.75z\"></path></svg>"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3634:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -39169,11 +39277,12 @@ function getBreakpointLocation(source, line, column) {
|
|||
return bpLocation;
|
||||
}
|
||||
|
||||
class BreakpointItem extends _react.Component {
|
||||
class Breakpoint extends _react.Component {
|
||||
|
||||
componentDidMount() {
|
||||
this.setupEditor();
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
this.setupEditor();
|
||||
}
|
||||
|
@ -39191,13 +39300,17 @@ class BreakpointItem extends _react.Component {
|
|||
return !prevBreakpoint || prevBreakpoint.text != nextBreakpoint.text || prevBreakpoint.disabled != nextBreakpoint.disabled || prevBreakpoint.condition != nextBreakpoint.condition || prevBreakpoint.hidden != nextBreakpoint.hidden || prevBreakpoint.isCurrentlyPaused != nextBreakpoint.isCurrentlyPaused;
|
||||
}
|
||||
|
||||
setupEditor() {
|
||||
getBreakpointText() {
|
||||
const { breakpoint } = this.props;
|
||||
return breakpoint.condition || breakpoint.text;
|
||||
}
|
||||
|
||||
setupEditor() {
|
||||
if (this.editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.editor = (0, _breakpoint.createEditor)(breakpoint.text);
|
||||
this.editor = (0, _breakpoint.createEditor)(this.getBreakpointText());
|
||||
|
||||
// disables the default search shortcuts
|
||||
// $FlowIgnore
|
||||
|
@ -39215,18 +39328,52 @@ class BreakpointItem extends _react.Component {
|
|||
}
|
||||
}
|
||||
|
||||
renderCheckbox() {
|
||||
const { onChange, breakpoint } = this.props;
|
||||
const { disabled } = breakpoint;
|
||||
|
||||
return _react2.default.createElement("input", {
|
||||
type: "checkbox",
|
||||
className: "breakpoint-checkbox",
|
||||
checked: !disabled,
|
||||
onChange: onChange,
|
||||
onClick: ev => ev.stopPropagation()
|
||||
});
|
||||
}
|
||||
|
||||
renderText() {
|
||||
const text = this.getBreakpointText();
|
||||
|
||||
return _react2.default.createElement(
|
||||
"label",
|
||||
{ className: "breakpoint-label", title: text },
|
||||
text
|
||||
);
|
||||
}
|
||||
|
||||
renderLineClose() {
|
||||
const { breakpoint, onCloseClick } = this.props;
|
||||
const { line, column } = breakpoint.location;
|
||||
|
||||
return _react2.default.createElement(
|
||||
"div",
|
||||
{ className: "breakpoint-line-close" },
|
||||
_react2.default.createElement(
|
||||
"div",
|
||||
{ className: "breakpoint-line" },
|
||||
getBreakpointLocation(breakpoint.source, line, column)
|
||||
),
|
||||
_react2.default.createElement(_Close2.default, {
|
||||
handleClick: onCloseClick,
|
||||
tooltip: L10N.getStr("breakpoints.removeBreakpointTooltip")
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
breakpoint,
|
||||
onClick,
|
||||
onChange,
|
||||
onContextMenu,
|
||||
onCloseClick
|
||||
} = this.props;
|
||||
const { breakpoint, onClick, onContextMenu } = this.props;
|
||||
|
||||
const locationId = breakpoint.locationId;
|
||||
const line = breakpoint.location.line;
|
||||
const column = breakpoint.location.column;
|
||||
const isCurrentlyPaused = breakpoint.isCurrentlyPaused;
|
||||
const isDisabled = breakpoint.disabled;
|
||||
const isConditional = !!breakpoint.condition;
|
||||
|
@ -39244,43 +39391,14 @@ class BreakpointItem extends _react.Component {
|
|||
onClick: onClick,
|
||||
onContextMenu: onContextMenu
|
||||
},
|
||||
_react2.default.createElement("input", {
|
||||
type: "checkbox",
|
||||
className: "breakpoint-checkbox",
|
||||
checked: !isDisabled,
|
||||
onChange: onChange,
|
||||
onClick: ev => ev.stopPropagation()
|
||||
}),
|
||||
_react2.default.createElement(
|
||||
"label",
|
||||
{ className: "breakpoint-label", title: breakpoint.text },
|
||||
breakpoint.text
|
||||
),
|
||||
_react2.default.createElement(
|
||||
"div",
|
||||
{ className: "breakpoint-line-close" },
|
||||
_react2.default.createElement(
|
||||
"div",
|
||||
{ className: "breakpoint-line" },
|
||||
getBreakpointLocation(breakpoint.source, line, column)
|
||||
),
|
||||
_react2.default.createElement(_Close2.default, {
|
||||
handleClick: onCloseClick,
|
||||
tooltip: L10N.getStr("breakpoints.removeBreakpointTooltip")
|
||||
})
|
||||
)
|
||||
this.renderCheckbox(),
|
||||
this.renderText(),
|
||||
this.renderLineClose()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = BreakpointItem;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3631:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<!-- 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/. --><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 28\"><path fill=\"context-fill\" d=\"M15 11h-1V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v6H1a1 1 0 0 0 0 2h14a1 1 0 1 0 0-2z\"></path></svg>"
|
||||
exports.default = Breakpoint;
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
|
|
@ -55,6 +55,13 @@ support-files =
|
|||
examples/babel/fixtures/webpack-modules-es6/output.js.map
|
||||
examples/babel/fixtures/webpack-standalone/output.js
|
||||
examples/babel/fixtures/webpack-standalone/output.js.map
|
||||
examples/ember/quickstart/dist/index.html
|
||||
examples/ember/quickstart/dist/assets/quickstart.css
|
||||
examples/ember/quickstart/dist/assets/quickstart.js
|
||||
examples/ember/quickstart/dist/assets/quickstart.map
|
||||
examples/ember/quickstart/dist/assets/vendor.css
|
||||
examples/ember/quickstart/dist/assets/vendor.js
|
||||
examples/ember/quickstart/dist/assets/vendor.map
|
||||
examples/sourcemaps/bundle.js
|
||||
examples/sourcemaps/bundle.js.map
|
||||
examples/sourcemaps2/main.min.js
|
||||
|
@ -160,6 +167,7 @@ skip-if = (os == "win" && ccov) # Bug 1424154
|
|||
[browser_dbg-editor-gutter.js]
|
||||
[browser_dbg-editor-select.js]
|
||||
[browser_dbg-editor-highlight.js]
|
||||
[browser_dbg-ember-quickstart.js]
|
||||
[browser_dbg-expressions.js]
|
||||
[browser_dbg-expressions-error.js]
|
||||
[browser_dbg-iframes.js]
|
||||
|
|
|
@ -1,49 +1,11 @@
|
|||
|
||||
async function evalInConsoleAtPoint(dbg, fixture, { line, column }, statements) {
|
||||
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
|
||||
|
||||
const filename = `fixtures/${fixture}/input.js`;
|
||||
await waitForSources(dbg, filename);
|
||||
|
||||
ok(true, "Original sources exist");
|
||||
const source = findSource(dbg, filename);
|
||||
|
||||
await selectSource(dbg, source);
|
||||
|
||||
// Test that breakpoint is not off by a line.
|
||||
await addBreakpoint(dbg, source, line);
|
||||
|
||||
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
|
||||
ok(
|
||||
getBreakpoint(getState(), { sourceId: source.id, line, column }),
|
||||
"Breakpoint has correct line"
|
||||
);
|
||||
|
||||
const fnName = fixture.replace(/-([a-z])/g, (s, c) => c.toUpperCase());
|
||||
|
||||
const invokeResult = invokeInTab(fnName);
|
||||
|
||||
let invokeFailed = await Promise.race([
|
||||
waitForPaused(dbg),
|
||||
invokeResult.then(() => new Promise(() => {}), () => true)
|
||||
]);
|
||||
|
||||
if (invokeFailed) {
|
||||
return invokeResult;
|
||||
}
|
||||
|
||||
assertPausedLocation(dbg);
|
||||
|
||||
await assertConsoleEval(dbg, statements);
|
||||
|
||||
await removeBreakpoint(dbg, source.id, line, column);
|
||||
|
||||
is(getBreakpoints(getState()).size, 0, "Breakpoint reverted");
|
||||
|
||||
await resume(dbg);
|
||||
|
||||
// If the invoke errored later somehow, capture here so the error is reported nicely.
|
||||
await invokeResult;
|
||||
await invokeWithBreakpoint(dbg, fnName, filename, { line, column }, async () => {
|
||||
await assertConsoleEval(dbg, statements);
|
||||
});
|
||||
|
||||
ok(true, `Ran tests for ${fixture} at line ${line} column ${column}`);
|
||||
}
|
||||
|
|
|
@ -31,50 +31,12 @@ async function assertPreviews(dbg, previews) {
|
|||
}
|
||||
|
||||
async function breakpointPreviews(dbg, fixture, { line, column }, previews) {
|
||||
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
|
||||
|
||||
const filename = `fixtures/${fixture}/input.js`;
|
||||
await waitForSources(dbg, filename);
|
||||
|
||||
ok(true, "Original sources exist");
|
||||
const source = findSource(dbg, filename);
|
||||
|
||||
await selectSource(dbg, source);
|
||||
|
||||
// Test that breakpoint is not off by a line.
|
||||
await addBreakpoint(dbg, source, line);
|
||||
|
||||
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
|
||||
ok(
|
||||
getBreakpoint(getState(), { sourceId: source.id, line, column }),
|
||||
"Breakpoint has correct line"
|
||||
);
|
||||
|
||||
const fnName = fixture.replace(/-([a-z])/g, (s, c) => c.toUpperCase());
|
||||
|
||||
const invokeResult = invokeInTab(fnName);
|
||||
|
||||
let invokeFailed = await Promise.race([
|
||||
waitForPaused(dbg),
|
||||
invokeResult.then(() => new Promise(() => {}), () => true)
|
||||
]);
|
||||
|
||||
if (invokeFailed) {
|
||||
return invokeResult;
|
||||
}
|
||||
|
||||
assertPausedLocation(dbg);
|
||||
|
||||
await assertPreviews(dbg, previews);
|
||||
|
||||
await removeBreakpoint(dbg, source.id, line, column);
|
||||
|
||||
is(getBreakpoints(getState()).size, 0, "Breakpoint reverted");
|
||||
|
||||
await resume(dbg);
|
||||
|
||||
// If the invoke errored later somehow, capture here so the error is reported nicely.
|
||||
await invokeResult;
|
||||
await invokeWithBreakpoint(dbg, fnName, filename, { line, column }, async () => {
|
||||
await assertPreviews(dbg, previews);
|
||||
});
|
||||
|
||||
ok(true, `Ran tests for ${fixture} at line ${line} column ${column}`);
|
||||
}
|
||||
|
|
|
@ -7,87 +7,16 @@ requestLongerTimeout(6);
|
|||
// Tests loading sourcemapped sources for Babel's compile output.
|
||||
|
||||
async function breakpointScopes(dbg, fixture, { line, column }, scopes) {
|
||||
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
|
||||
|
||||
const filename = `fixtures/${fixture}/input.js`;
|
||||
await waitForSources(dbg, filename);
|
||||
|
||||
ok(true, "Original sources exist");
|
||||
const source = findSource(dbg, filename);
|
||||
|
||||
await selectSource(dbg, source);
|
||||
|
||||
// Test that breakpoint is not off by a line.
|
||||
await addBreakpoint(dbg, source, line);
|
||||
|
||||
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
|
||||
ok(
|
||||
getBreakpoint(getState(), { sourceId: source.id, line, column }),
|
||||
"Breakpoint has correct line"
|
||||
);
|
||||
|
||||
const fnName = fixture.replace(/-([a-z])/g, (s, c) => c.toUpperCase());
|
||||
|
||||
const invokeResult = invokeInTab(fnName);
|
||||
|
||||
let invokeFailed = await Promise.race([
|
||||
waitForPaused(dbg),
|
||||
invokeResult.then(() => new Promise(() => {}), () => true)
|
||||
]);
|
||||
|
||||
if (invokeFailed) {
|
||||
return invokeResult;
|
||||
}
|
||||
|
||||
assertPausedLocation(dbg);
|
||||
|
||||
await assertScopes(dbg, scopes);
|
||||
|
||||
await removeBreakpoint(dbg, source.id, line, column);
|
||||
|
||||
is(getBreakpoints(getState()).size, 0, "Breakpoint reverted");
|
||||
|
||||
await resume(dbg);
|
||||
|
||||
// If the invoke errored later somehow, capture here so the error is reported nicely.
|
||||
await invokeResult;
|
||||
await invokeWithBreakpoint(dbg, fnName, filename, { line, column }, async () => {
|
||||
await assertScopes(dbg, scopes);
|
||||
});
|
||||
|
||||
ok(true, `Ran tests for ${fixture} at line ${line} column ${column}`);
|
||||
}
|
||||
|
||||
async function expandAllScopes(dbg) {
|
||||
const scopes = await waitForElement(dbg, "scopes");
|
||||
const scopeElements = scopes.querySelectorAll(
|
||||
`.tree-node[aria-level="1"][data-expandable="true"]:not([aria-expanded="true"])`
|
||||
);
|
||||
const indices = Array.from(scopeElements, el => {
|
||||
return Array.prototype.indexOf.call(el.parentNode.childNodes, el);
|
||||
}).reverse();
|
||||
|
||||
for (const index of indices) {
|
||||
await toggleScopeNode(dbg, index + 1);
|
||||
}
|
||||
}
|
||||
|
||||
async function assertScopes(dbg, items) {
|
||||
await expandAllScopes(dbg);
|
||||
|
||||
for (const [i, val] of items.entries()) {
|
||||
if (Array.isArray(val)) {
|
||||
is(getScopeLabel(dbg, i + 1), val[0]);
|
||||
is(
|
||||
getScopeValue(dbg, i + 1),
|
||||
val[1],
|
||||
`"${val[0]}" has the expected "${val[1]}" value`
|
||||
);
|
||||
} else {
|
||||
is(getScopeLabel(dbg, i + 1), val);
|
||||
}
|
||||
}
|
||||
|
||||
is(getScopeLabel(dbg, items.length + 1), "Window");
|
||||
}
|
||||
|
||||
add_task(async function() {
|
||||
await pushPref("devtools.debugger.features.map-scopes", true);
|
||||
|
||||
|
|
|
@ -5,52 +5,12 @@
|
|||
requestLongerTimeout(4);
|
||||
|
||||
async function breakpointSteps(dbg, fixture, { line, column }, steps) {
|
||||
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
|
||||
|
||||
const filename = `fixtures/${fixture}/input.js`;
|
||||
await waitForSources(dbg, filename);
|
||||
|
||||
ok(true, "Original sources exist");
|
||||
const source = findSource(dbg, filename);
|
||||
|
||||
await selectSource(dbg, source);
|
||||
|
||||
// Test that breakpoint is not off by a line.
|
||||
await addBreakpoint(dbg, source, line);
|
||||
|
||||
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
|
||||
|
||||
ok(
|
||||
getBreakpoint(getState(), { sourceId: source.id, line, column }),
|
||||
"Breakpoint has correct line"
|
||||
);
|
||||
|
||||
const fnName = fixture.replace(/-([a-z])/g, (s, c) => c.toUpperCase());
|
||||
|
||||
const invokeResult = invokeInTab(fnName);
|
||||
|
||||
let invokeFailed = await Promise.race([
|
||||
waitForPaused(dbg),
|
||||
invokeResult.then(() => new Promise(() => {}), () => true)
|
||||
]);
|
||||
|
||||
if (invokeFailed) {
|
||||
return invokeResult;
|
||||
}
|
||||
|
||||
assertPausedLocation(dbg);
|
||||
|
||||
await removeBreakpoint(dbg, source.id, line, column);
|
||||
|
||||
is(getBreakpoints(getState()).size, 0, "Breakpoint reverted");
|
||||
|
||||
await runSteps(dbg, source, steps);
|
||||
|
||||
await resume(dbg);
|
||||
|
||||
// If the invoke errored later somehow, capture here so the error is
|
||||
// reported nicely.
|
||||
await invokeResult;
|
||||
await invokeWithBreakpoint(dbg, fnName, filename, { line, column }, async source => {
|
||||
await runSteps(dbg, source, steps);
|
||||
});
|
||||
|
||||
ok(true, `Ran tests for ${fixture} at line ${line} column ${column}`);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
add_task(async function() {
|
||||
await pushPref("devtools.debugger.features.map-scopes", true);
|
||||
|
||||
const dbg = await initDebugger("ember/quickstart/dist/");
|
||||
|
||||
await invokeWithBreakpoint(dbg, "mapTestFunction", "quickstart/router.js", { line: 13, column: 2 }, async () => {
|
||||
await assertScopes(dbg, [
|
||||
"Module",
|
||||
["config", "{\u2026}"],
|
||||
"EmberRouter:Class()",
|
||||
"Router:Class()",
|
||||
]);
|
||||
});
|
||||
});
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
const expressionSelectors = {
|
||||
plusIcon: ".watch-expressions-pane button.plus",
|
||||
input: "input.input-expression"
|
||||
};
|
||||
|
||||
|
@ -22,6 +23,7 @@ function getValue(dbg, index) {
|
|||
}
|
||||
|
||||
async function addExpression(dbg, input) {
|
||||
findElementWithSelector(dbg, expressionSelectors.plusIcon).click();
|
||||
const evaluation = waitForDispatch(dbg, "EVALUATE_EXPRESSION");
|
||||
findElementWithSelector(dbg, expressionSelectors.input).focus();
|
||||
type(dbg, input);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
const expressionSelectors = {
|
||||
plusIcon: ".watch-expressions-pane button.plus",
|
||||
input: "input.input-expression"
|
||||
};
|
||||
|
||||
|
@ -33,6 +34,7 @@ function assertEmptyValue(dbg, index) {
|
|||
|
||||
async function addExpression(dbg, input) {
|
||||
info("Adding an expression");
|
||||
findElementWithSelector(dbg, expressionSelectors.plusIcon).click();
|
||||
findElementWithSelector(dbg, expressionSelectors.input).focus();
|
||||
type(dbg, input);
|
||||
pressKey(dbg, "Enter");
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# EditorConfig helps developers define and maintain consistent
|
||||
# coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.hbs]
|
||||
insert_final_newline = false
|
||||
|
||||
[*.{diff,md}]
|
||||
trim_trailing_whitespace = false
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
/**
|
||||
Ember CLI sends analytics information by default. The data is completely
|
||||
anonymous, but there are times when you might want to disable this behavior.
|
||||
|
||||
Setting `disableAnalytics` to true will prevent any data from being sent.
|
||||
*/
|
||||
"disableAnalytics": false
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
ecmaVersion: 2017,
|
||||
sourceType: 'module'
|
||||
},
|
||||
plugins: [
|
||||
'ember'
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:ember/recommended'
|
||||
],
|
||||
env: {
|
||||
browser: true
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
overrides: [
|
||||
// node files
|
||||
{
|
||||
files: [
|
||||
'testem.js',
|
||||
'ember-cli-build.js',
|
||||
'config/**/*.js',
|
||||
'lib/*/index.js'
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'script',
|
||||
ecmaVersion: 2015
|
||||
},
|
||||
env: {
|
||||
browser: false,
|
||||
node: true
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
23
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/.gitignore
поставляемый
Normal file
23
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/.gitignore
поставляемый
Normal file
|
@ -0,0 +1,23 @@
|
|||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
# /dist # not ignored because we want to load the static files
|
||||
/tmp
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/bower_components
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage/*
|
||||
/libpeerconnection.log
|
||||
npm-debug.log*
|
||||
yarn-error.log
|
||||
testem.log
|
||||
|
||||
# ember-try
|
||||
.node_modules.ember-try/
|
||||
bower.json.ember-try
|
||||
package.json.ember-try
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
|
||||
env:
|
||||
global:
|
||||
# See https://git.io/vdao3 for details.
|
||||
- JOBS=1
|
||||
|
||||
before_install:
|
||||
- npm config set spin false
|
||||
|
||||
script:
|
||||
- npm run lint:js
|
||||
- npm test
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"ignore_dirs": ["tmp", "dist"]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
### Building
|
||||
|
||||
* `ember build`
|
|
@ -0,0 +1,14 @@
|
|||
import Application from '@ember/application';
|
||||
import Resolver from './resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from './config/environment';
|
||||
|
||||
const App = Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver
|
||||
});
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
|
||||
export default App;
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Quickstart</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
|
||||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/quickstart.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/quickstart.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,3 @@
|
|||
import Resolver from 'ember-resolver';
|
||||
|
||||
export default Resolver;
|
|
@ -0,0 +1,16 @@
|
|||
import EmberRouter from '@ember/routing/router';
|
||||
import config from './config/environment';
|
||||
|
||||
const Router = EmberRouter.extend({
|
||||
location: config.locationType,
|
||||
rootURL: config.rootURL
|
||||
});
|
||||
|
||||
Router.map(function() {
|
||||
});
|
||||
|
||||
window.mapTestFunction = () => {
|
||||
window.console.log("pause here", config, Router);
|
||||
};
|
||||
|
||||
export default Router;
|
|
@ -0,0 +1,5 @@
|
|||
{{!-- The following component displays Ember's default welcome message. --}}
|
||||
{{welcome-page}}
|
||||
{{!-- Feel free to remove this! --}}
|
||||
|
||||
{{outlet}}
|
|
@ -0,0 +1,58 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function(environment) {
|
||||
let ENV = {
|
||||
modulePrefix: 'quickstart',
|
||||
environment,
|
||||
locationType: 'auto',
|
||||
EmberENV: {
|
||||
FEATURES: {
|
||||
// Here you can enable experimental features on an ember canary build
|
||||
// e.g. 'with-controller': true
|
||||
},
|
||||
EXTEND_PROTOTYPES: {
|
||||
// Prevent Ember Data from overriding Date.parse.
|
||||
Date: false
|
||||
}
|
||||
},
|
||||
|
||||
APP: {
|
||||
// Here you can pass flags/options to your application instance
|
||||
// when it is created
|
||||
},
|
||||
|
||||
// NOTE(logan): Hard-code the URL for the debugger example to allow it to
|
||||
// function properly. The default "/" root makes assets fail to load.
|
||||
rootURL: "/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/",
|
||||
|
||||
// If using "http://localhost:8000/integration/examples/ember/quickstart/dist/" to
|
||||
// access this test example, uncomment this line and re-run "yarn build".
|
||||
// rootURL: "/integration/examples/ember/quickstart/dist/",
|
||||
};
|
||||
|
||||
if (environment === 'development') {
|
||||
// ENV.APP.LOG_RESOLVER = true;
|
||||
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
||||
// ENV.APP.LOG_TRANSITIONS = true;
|
||||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
// Testem prefers this...
|
||||
ENV.locationType = 'none';
|
||||
|
||||
// keep test console output quieter
|
||||
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
||||
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
||||
|
||||
ENV.APP.rootElement = '#ember-testing';
|
||||
ENV.APP.autoboot = false;
|
||||
}
|
||||
|
||||
if (environment === 'production') {
|
||||
// here you can enable a production-specific feature
|
||||
}
|
||||
|
||||
return ENV;
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
const browsers = [
|
||||
'last 1 Chrome versions',
|
||||
'last 1 Firefox versions',
|
||||
'last 1 Safari versions'
|
||||
];
|
||||
|
||||
const isCI = !!process.env.CI;
|
||||
const isProduction = process.env.EMBER_ENV === 'production';
|
||||
|
||||
if (isCI || isProduction) {
|
||||
browsers.push('ie 11');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
browsers
|
||||
};
|
0
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css
поставляемый
Normal file
0
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css
поставляемый
Normal file
277
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js
поставляемый
Normal file
277
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js
поставляемый
Normal file
|
@ -0,0 +1,277 @@
|
|||
"use strict";
|
||||
|
||||
|
||||
|
||||
define('quickstart/app', ['exports', 'quickstart/resolver', 'ember-load-initializers', 'quickstart/config/environment'], function (exports, _resolver, _emberLoadInitializers, _environment) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
|
||||
const App = Ember.Application.extend({
|
||||
modulePrefix: _environment.default.modulePrefix,
|
||||
podModulePrefix: _environment.default.podModulePrefix,
|
||||
Resolver: _resolver.default
|
||||
});
|
||||
|
||||
(0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix);
|
||||
|
||||
exports.default = App;
|
||||
});
|
||||
|
||||
define('quickstart/components/welcome-page', ['exports', 'ember-welcome-page/components/welcome-page'], function (exports, _welcomePage) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'default', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _welcomePage.default;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
define('quickstart/helpers/app-version', ['exports', 'quickstart/config/environment', 'ember-cli-app-version/utils/regexp'], function (exports, _environment, _regexp) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.appVersion = appVersion;
|
||||
|
||||
|
||||
const {
|
||||
APP: {
|
||||
version
|
||||
}
|
||||
} = _environment.default;
|
||||
|
||||
function appVersion(_, hash = {}) {
|
||||
if (hash.hideSha) {
|
||||
return version.match(_regexp.versionRegExp)[0];
|
||||
}
|
||||
|
||||
if (hash.hideVersion) {
|
||||
return version.match(_regexp.shaRegExp)[0];
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
exports.default = Ember.Helper.helper(appVersion);
|
||||
});
|
||||
|
||||
define('quickstart/helpers/pluralize', ['exports', 'ember-inflector/lib/helpers/pluralize'], function (exports, _pluralize) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _pluralize.default;
|
||||
});
|
||||
|
||||
define('quickstart/helpers/singularize', ['exports', 'ember-inflector/lib/helpers/singularize'], function (exports, _singularize) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _singularize.default;
|
||||
});
|
||||
|
||||
define('quickstart/initializers/app-version', ['exports', 'ember-cli-app-version/initializer-factory', 'quickstart/config/environment'], function (exports, _initializerFactory, _environment) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
|
||||
let name, version;
|
||||
if (_environment.default.APP) {
|
||||
name = _environment.default.APP.name;
|
||||
version = _environment.default.APP.version;
|
||||
}
|
||||
|
||||
exports.default = {
|
||||
name: 'App Version',
|
||||
initialize: (0, _initializerFactory.default)(name, version)
|
||||
};
|
||||
});
|
||||
|
||||
define('quickstart/initializers/container-debug-adapter', ['exports', 'ember-resolver/resolvers/classic/container-debug-adapter'], function (exports, _containerDebugAdapter) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = {
|
||||
name: 'container-debug-adapter',
|
||||
|
||||
initialize() {
|
||||
let app = arguments[1] || arguments[0];
|
||||
|
||||
app.register('container-debug-adapter:main', _containerDebugAdapter.default);
|
||||
app.inject('container-debug-adapter:main', 'namespace', 'application:main');
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
define('quickstart/initializers/ember-data', ['exports', 'ember-data/setup-container', 'ember-data'], function (exports, _setupContainer) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = {
|
||||
name: 'ember-data',
|
||||
initialize: _setupContainer.default
|
||||
};
|
||||
});
|
||||
|
||||
define('quickstart/initializers/export-application-global', ['exports', 'quickstart/config/environment'], function (exports, _environment) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.initialize = initialize;
|
||||
function initialize() {
|
||||
var application = arguments[1] || arguments[0];
|
||||
if (_environment.default.exportApplicationGlobal !== false) {
|
||||
var theGlobal;
|
||||
if (typeof window !== 'undefined') {
|
||||
theGlobal = window;
|
||||
} else if (typeof global !== 'undefined') {
|
||||
theGlobal = global;
|
||||
} else if (typeof self !== 'undefined') {
|
||||
theGlobal = self;
|
||||
} else {
|
||||
// no reasonable global, just bail
|
||||
return;
|
||||
}
|
||||
|
||||
var value = _environment.default.exportApplicationGlobal;
|
||||
var globalName;
|
||||
|
||||
if (typeof value === 'string') {
|
||||
globalName = value;
|
||||
} else {
|
||||
globalName = Ember.String.classify(_environment.default.modulePrefix);
|
||||
}
|
||||
|
||||
if (!theGlobal[globalName]) {
|
||||
theGlobal[globalName] = application;
|
||||
|
||||
application.reopen({
|
||||
willDestroy: function () {
|
||||
this._super.apply(this, arguments);
|
||||
delete theGlobal[globalName];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = {
|
||||
name: 'export-application-global',
|
||||
|
||||
initialize: initialize
|
||||
};
|
||||
});
|
||||
|
||||
define("quickstart/instance-initializers/ember-data", ["exports", "ember-data/initialize-store-service"], function (exports, _initializeStoreService) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = {
|
||||
name: "ember-data",
|
||||
initialize: _initializeStoreService.default
|
||||
};
|
||||
});
|
||||
|
||||
define('quickstart/resolver', ['exports', 'ember-resolver'], function (exports, _emberResolver) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _emberResolver.default;
|
||||
});
|
||||
|
||||
define('quickstart/router', ['exports', 'quickstart/config/environment'], function (exports, _environment) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
|
||||
const Router = Ember.Router.extend({
|
||||
location: _environment.default.locationType,
|
||||
rootURL: _environment.default.rootURL
|
||||
});
|
||||
|
||||
Router.map(function () {});
|
||||
|
||||
window.mapTestFunction = () => {
|
||||
window.console.log("pause here", _environment.default, Router);
|
||||
};
|
||||
|
||||
exports.default = Router;
|
||||
});
|
||||
|
||||
define('quickstart/services/ajax', ['exports', 'ember-ajax/services/ajax'], function (exports, _ajax) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'default', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _ajax.default;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
define("quickstart/templates/application", ["exports"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = Ember.HTMLBars.template({ "id": "d4rGKf2G", "block": "{\"symbols\":[],\"statements\":[[1,[18,\"welcome-page\"],false],[0,\"\\n\"],[0,\"\\n\"],[1,[18,\"outlet\"],false]],\"hasEval\":false}", "meta": { "moduleName": "quickstart/templates/application.hbs" } });
|
||||
});
|
||||
|
||||
|
||||
|
||||
define('quickstart/config/environment', [], function() {
|
||||
var prefix = 'quickstart';
|
||||
try {
|
||||
var metaName = prefix + '/config/environment';
|
||||
var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content');
|
||||
var config = JSON.parse(unescape(rawConfig));
|
||||
|
||||
var exports = { 'default': config };
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
return exports;
|
||||
}
|
||||
catch(err) {
|
||||
throw new Error('Could not read config from meta tag with name "' + metaName + '".');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (!runningTests) {
|
||||
require("quickstart/app")["default"].create({"name":"quickstart","version":"0.0.0+1dde1d7f"});
|
||||
}
|
||||
//# sourceMappingURL=quickstart.map
|
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.map
поставляемый
Normal file
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.map
поставляемый
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
471
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css
поставляемый
Normal file
471
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css
поставляемый
Normal file
|
@ -0,0 +1,471 @@
|
|||
/*!
|
||||
* QUnit 2.5.1
|
||||
* https://qunitjs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2018-02-28T01:37Z
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header (excluding toolbar) */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699A4;
|
||||
background-color: #0D3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: 400;
|
||||
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #C2CCD1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-filteredTest {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #366097;
|
||||
background-color: #F4FF77;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #FFF;
|
||||
background-color: #2B81AF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
|
||||
/** Toolbar */
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #5E740B;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=checkbox],
|
||||
#qunit-testrunner-toolbar input[type=radio] {
|
||||
margin: 3px;
|
||||
vertical-align: -2px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=text] {
|
||||
box-sizing: border-box;
|
||||
height: 1.6em;
|
||||
}
|
||||
|
||||
.qunit-url-config,
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
display: inline-block;
|
||||
line-height: 2.1em;
|
||||
}
|
||||
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
float: right;
|
||||
position: relative;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.qunit-url-config label {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search {
|
||||
box-sizing: border-box;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search-container:after {
|
||||
position: absolute;
|
||||
right: 0.3em;
|
||||
content: "\25bc";
|
||||
color: black;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown {
|
||||
/* align with #qunit-modulefilter-search */
|
||||
box-sizing: border-box;
|
||||
width: 400px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: 0.8em;
|
||||
|
||||
border: 1px solid #D3D3D3;
|
||||
border-top: none;
|
||||
border-radius: 0 0 .25em .25em;
|
||||
color: #000;
|
||||
background-color: #F5F5F5;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown .clickable.checked {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
background-color: #D2E0E6;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown .clickable:hover {
|
||||
color: #FFF;
|
||||
background-color: #0D3349;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-actions {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
|
||||
/* align with #qunit-modulefilter-dropdown-list */
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * {
|
||||
box-sizing: border-box;
|
||||
max-height: 2.8em;
|
||||
display: block;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button {
|
||||
float: right;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > :last-child {
|
||||
/* insert padding to align with checkbox margins */
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
border-top: 2px groove threedhighlight;
|
||||
padding: 0.4em 0 0;
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list li {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list .clickable {
|
||||
display: block;
|
||||
padding-left: 0.15em;
|
||||
}
|
||||
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 1em 0.4em 1em;
|
||||
border-bottom: 1px solid #FFF;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests > li {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li.running,
|
||||
#qunit-tests li.pass,
|
||||
#qunit-tests li.fail,
|
||||
#qunit-tests li.skipped,
|
||||
#qunit-tests li.aborted {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.running,
|
||||
#qunit-tests.hidepass li.pass:not(.todo) {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li.skipped strong {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #C2CCD1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests li p a {
|
||||
padding: 0.25em;
|
||||
color: #6B6464;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.qunit-assert-list {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #FFF;
|
||||
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-source {
|
||||
margin: 0.6em 0 0.3em;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 0.5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
color: #374E0C;
|
||||
background-color: #E0F2BE;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
color: #500;
|
||||
background-color: #FFCACA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: #000; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
padding: 5px;
|
||||
background-color: #FFF;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3C510C;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: #008000; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/*** Aborted tests */
|
||||
#qunit-tests .aborted { color: #000; background-color: orange; }
|
||||
/*** Skipped tests */
|
||||
|
||||
#qunit-tests .skipped {
|
||||
background-color: #EBECE9;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label,
|
||||
#qunit-tests .qunit-skipped-label {
|
||||
background-color: #F4FF77;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
color: #366097;
|
||||
line-height: 1.8em;
|
||||
padding: 0 0.5em;
|
||||
margin: -0.4em 0.4em -0.4em 0;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
color: #2B81AF;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid #FFF;
|
||||
}
|
||||
#qunit-testresult .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: 700;
|
||||
}
|
||||
#qunit-testresult-display {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 85%;
|
||||
float:left;
|
||||
}
|
||||
#qunit-testresult-controls {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 10%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
||||
|
||||
#ember-testing-container {
|
||||
position: relative;
|
||||
background: white;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 640px;
|
||||
height: 384px;
|
||||
overflow: auto;
|
||||
z-index: 98;
|
||||
border: 1px solid #ccc;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#ember-testing-container.full-screen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
z-index: 98;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#ember-testing {
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
transform: scale(0.5);
|
||||
transform-origin: top left;
|
||||
}
|
||||
|
||||
.full-screen #ember-testing {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: scale(1);
|
||||
}
|
12050
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js
поставляемый
Normal file
12050
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js
поставляемый
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.map
поставляемый
Normal file
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.map
поставляемый
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
62
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/tests.js
поставляемый
Normal file
62
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/tests.js
поставляемый
Normal file
|
@ -0,0 +1,62 @@
|
|||
'use strict';
|
||||
|
||||
define('quickstart/tests/app.lint-test', [], function () {
|
||||
'use strict';
|
||||
|
||||
QUnit.module('ESLint | app');
|
||||
|
||||
QUnit.test('app.js', function (assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(true, 'app.js should pass ESLint\n\n');
|
||||
});
|
||||
|
||||
QUnit.test('resolver.js', function (assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(true, 'resolver.js should pass ESLint\n\n');
|
||||
});
|
||||
|
||||
QUnit.test('router.js', function (assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(true, 'router.js should pass ESLint\n\n');
|
||||
});
|
||||
});
|
||||
define('quickstart/tests/test-helper', ['quickstart/app', 'quickstart/config/environment', '@ember/test-helpers', 'ember-qunit'], function (_app, _environment, _testHelpers, _emberQunit) {
|
||||
'use strict';
|
||||
|
||||
(0, _testHelpers.setApplication)(_app.default.create(_environment.default.APP));
|
||||
|
||||
(0, _emberQunit.start)();
|
||||
});
|
||||
|
||||
define('quickstart/tests/tests.lint-test', [], function () {
|
||||
'use strict';
|
||||
|
||||
QUnit.module('ESLint | tests');
|
||||
|
||||
QUnit.test('test-helper.js', function (assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(true, 'test-helper.js should pass ESLint\n\n');
|
||||
});
|
||||
});
|
||||
define('quickstart/config/environment', [], function() {
|
||||
var prefix = 'quickstart';
|
||||
try {
|
||||
var metaName = prefix + '/config/environment';
|
||||
var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content');
|
||||
var config = JSON.parse(unescape(rawConfig));
|
||||
|
||||
var exports = { 'default': config };
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
return exports;
|
||||
}
|
||||
catch(err) {
|
||||
throw new Error('Could not read config from meta tag with name "' + metaName + '".');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
require('quickstart/tests/test-helper');
|
||||
EmberENV.TESTS_FILE_LOADED = true;
|
||||
//# sourceMappingURL=tests.map
|
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/tests.map
поставляемый
Normal file
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/tests.map
поставляемый
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["vendor/ember-cli/tests-prefix.js","quickstart/tests/app.lint-test.js","quickstart/tests/test-helper.js","quickstart/tests/tests.lint-test.js","vendor/ember-cli/app-config.js","vendor/ember-cli/tests-suffix.js"],"sourcesContent":["'use strict';\n","define('quickstart/tests/app.lint-test', [], function () {\n 'use strict';\n\n QUnit.module('ESLint | app');\n\n QUnit.test('app.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'app.js should pass ESLint\\n\\n');\n });\n\n QUnit.test('resolver.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'resolver.js should pass ESLint\\n\\n');\n });\n\n QUnit.test('router.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'router.js should pass ESLint\\n\\n');\n });\n});","import Application from '../app';\nimport config from '../config/environment';\nimport { setApplication } from '@ember/test-helpers';\nimport { start } from 'ember-qunit';\n\nsetApplication(Application.create(config.APP));\n\nstart();\n","define('quickstart/tests/tests.lint-test', [], function () {\n 'use strict';\n\n QUnit.module('ESLint | tests');\n\n QUnit.test('test-helper.js', function (assert) {\n assert.expect(1);\n assert.ok(true, 'test-helper.js should pass ESLint\\n\\n');\n });\n});","define('quickstart/config/environment', [], function() {\n var prefix = 'quickstart';\ntry {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(unescape(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n});\n","require('quickstart/tests/test-helper');\nEmberENV.TESTS_FILE_LOADED = true;\n"],"names":["create","APP"],"mappings":"AAAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACbA,mCAAe,aAAYA,MAAZ,CAAmB,qBAAOC,GAA1B,CAAf;;AAEA;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;","file":"tests.js"}
|
97
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css
поставляемый
Normal file
97
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css
поставляемый
Normal file
|
@ -0,0 +1,97 @@
|
|||
#ember-welcome-page-id-selector {
|
||||
padding: 2em;
|
||||
box-shadow: 0 0 0px 10px #FFFBF5;
|
||||
font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.35em;
|
||||
background: #FFFBF5;
|
||||
color: #865931;
|
||||
height: 100vh;
|
||||
}
|
||||
#ember-welcome-page-id-selector img {
|
||||
max-width: 100%;
|
||||
}
|
||||
#ember-welcome-page-id-selector p {
|
||||
margin: 0 0 .75em;
|
||||
}
|
||||
#ember-welcome-page-id-selector h2 {
|
||||
color: #dd6a58;
|
||||
margin-top: 1em;
|
||||
font-size: 1.75em;
|
||||
line-height: 1.2
|
||||
}
|
||||
#ember-welcome-page-id-selector a:link,
|
||||
#ember-welcome-page-id-selector a:visited {
|
||||
color: #dd6a58;
|
||||
text-decoration: none;
|
||||
}
|
||||
#ember-welcome-page-id-selector a:hover,
|
||||
#ember-welcome-page-id-selector a:active {
|
||||
color: #c13c27;
|
||||
}
|
||||
#ember-welcome-page-id-selector .tomster {
|
||||
flex: 2;
|
||||
}
|
||||
#ember-welcome-page-id-selector .welcome {
|
||||
flex: 3;
|
||||
}
|
||||
#ember-welcome-page-id-selector .columns {
|
||||
display: flex;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
#ember-welcome-page-id-selector .welcome ol {
|
||||
list-style: disc;
|
||||
padding-left: 2em;
|
||||
margin-bottom: .75em;
|
||||
}
|
||||
#ember-welcome-page-id-selector .welcome > ol > li {
|
||||
padding-bottom: .5em;
|
||||
}
|
||||
#ember-welcome-page-id-selector .postscript {
|
||||
clear: both;
|
||||
text-align: center;
|
||||
padding-top: 3em;
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
line-height: 2;
|
||||
}
|
||||
#ember-welcome-page-id-selector .postscript code {
|
||||
background-color: #F8E7CF;
|
||||
border-radius: 3px;
|
||||
font-family: Menlo, Courier, monospace;
|
||||
font-size: 0.9em;
|
||||
padding: 0.2em 0.5em;
|
||||
margin: 0 0.1em;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
#ember-welcome-page-id-selector {
|
||||
padding: 1em;
|
||||
}
|
||||
#ember-welcome-page-id-selector .columns {
|
||||
flex-direction: column;
|
||||
}
|
||||
#ember-welcome-page-id-selector .welcome,
|
||||
#ember-welcome-page-id-selector .tomster {
|
||||
}
|
||||
#ember-welcome-page-id-selector .tomster img {
|
||||
width: 50%;
|
||||
margin: auto;
|
||||
display: block;
|
||||
}
|
||||
#ember-welcome-page-id-selector h2 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@media (max-width: 400px) {
|
||||
#ember-welcome-page-id-selector .tomster img {
|
||||
width: 60%;
|
||||
}
|
||||
#ember-welcome-page-id-selector .welcome,
|
||||
#ember-welcome-page-id-selector .tomster {
|
||||
width: 100%;
|
||||
float: none;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
86407
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js
поставляемый
Normal file
86407
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js
поставляемый
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.map
поставляемый
Normal file
1
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.map
поставляемый
Normal file
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Двоичные данные
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/ember-welcome-page/images/construction.png
поставляемый
Normal file
Двоичные данные
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/ember-welcome-page/images/construction.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 89 KiB |
26
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/index.html
поставляемый
Normal file
26
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/index.html
поставляемый
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Quickstart</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<meta name="quickstart/config/environment" content="%7B%22modulePrefix%22%3A%22quickstart%22%2C%22environment%22%3A%22development%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22quickstart%22%2C%22version%22%3A%220.0.0+1dde1d7f%22%7D%2C%22rootURL%22%3A%22/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/%22%2C%22exportApplicationGlobal%22%3Atrue%7D" />
|
||||
|
||||
<link integrity="" rel="stylesheet" href="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css">
|
||||
<link integrity="" rel="stylesheet" href="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<script src="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js"></script>
|
||||
<script src="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
3
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/robots.txt
поставляемый
Normal file
3
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/robots.txt
поставляемый
Normal file
|
@ -0,0 +1,3 @@
|
|||
# http://www.robotstxt.org
|
||||
User-agent: *
|
||||
Disallow:
|
19
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/testem.js
поставляемый
Normal file
19
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/testem.js
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* This is dummy file that exists for the sole purpose
|
||||
* of allowing tests to run directly in the browser as
|
||||
* well as by Testem.
|
||||
*
|
||||
* Testem is configured to run tests directly against
|
||||
* the test build of index.html, which requires a
|
||||
* snippet to load the testem.js file:
|
||||
* <script src="/testem.js"></script>
|
||||
* This has to go before the qunit framework and app
|
||||
* tests are loaded.
|
||||
*
|
||||
* Testem internally supplies this file. However, if you
|
||||
* run the tests directly in the browser (localhost:8000/tests),
|
||||
* this file does not exist.
|
||||
*
|
||||
* Hence the purpose of this fake file. This file is served
|
||||
* directly from the express server to satisify the script load.
|
||||
*/
|
39
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/tests/index.html
поставляемый
Normal file
39
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/tests/index.html
поставляемый
Normal file
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Quickstart Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<meta name="quickstart/config/environment" content="%7B%22modulePrefix%22%3A%22quickstart%22%2C%22environment%22%3A%22test%22%2C%22locationType%22%3A%22none%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22LOG_ACTIVE_GENERATION%22%3Afalse%2C%22LOG_VIEW_LOOKUPS%22%3Afalse%2C%22rootElement%22%3A%22%23ember-testing%22%2C%22autoboot%22%3Afalse%2C%22name%22%3A%22quickstart%22%2C%22version%22%3A%220.0.0+1dde1d7f%22%7D%2C%22rootURL%22%3A%22/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/%22%2C%22exportApplicationGlobal%22%3Atrue%7D" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.css">
|
||||
<link rel="stylesheet" href="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.css">
|
||||
<link rel="stylesheet" href="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div id="ember-testing-container">
|
||||
<div id="ember-testing"></div>
|
||||
</div>
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/vendor.js"></script>
|
||||
<script src="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/test-support.js"></script>
|
||||
<script src="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/quickstart.js"></script>
|
||||
<script src="/browser/devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/dist/assets/tests.js"></script>
|
||||
|
||||
|
||||
<script>Ember.assert('The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js".', EmberENV.TESTS_FILE_LOADED);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
|
||||
module.exports = function(defaults) {
|
||||
// debugger;
|
||||
let app = new EmberApp(defaults, {
|
||||
// Add options here
|
||||
sourcemaps: { enabled: true },
|
||||
babel: {
|
||||
sourceMaps: "inline",
|
||||
},
|
||||
'ember-babel-cli': {
|
||||
sourceMaps: "inline",
|
||||
}
|
||||
});
|
||||
|
||||
// Use `app.import` to add additional libraries to the generated
|
||||
// output files.
|
||||
//
|
||||
// If you need to use different assets in different
|
||||
// environments, specify an object as the first parameter. That
|
||||
// object's keys should be the environment name and the values
|
||||
// should be the asset to use in that environment.
|
||||
//
|
||||
// If the library that you are including contains AMD or ES6
|
||||
// modules that you would like to import into your application
|
||||
// please specify an object with the list of modules as keys
|
||||
// along with the exports of each module as its value.
|
||||
|
||||
return app.toTree();
|
||||
};
|
10513
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/package-lock.json
сгенерированный
Normal file
10513
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/package-lock.json
сгенерированный
Normal file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "quickstart",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"description": "Small description for quickstart goes here",
|
||||
"license": "MIT",
|
||||
"author": "",
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
"test": "tests"
|
||||
},
|
||||
"repository": "",
|
||||
"scripts": {
|
||||
"build": "ember build",
|
||||
"lint:js": "eslint ./*.js app config lib server tests",
|
||||
"start": "ember serve",
|
||||
"test": "ember test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"broccoli-asset-rev": "^2.4.5",
|
||||
"ember-ajax": "^3.0.0",
|
||||
"ember-cli": "~3.0.2",
|
||||
"ember-cli-app-version": "^3.0.0",
|
||||
"ember-cli-babel": "^6.6.0",
|
||||
"ember-cli-dependency-checker": "^2.0.0",
|
||||
"ember-cli-eslint": "^4.2.1",
|
||||
"ember-cli-htmlbars": "^2.0.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
|
||||
"ember-cli-inject-live-reload": "^1.4.1",
|
||||
"ember-cli-qunit": "^4.1.1",
|
||||
"ember-cli-shims": "^1.2.0",
|
||||
"ember-cli-sri": "^2.1.0",
|
||||
"ember-cli-uglify": "^2.0.0",
|
||||
"ember-data": "~3.0.0",
|
||||
"ember-export-application-global": "^2.0.0",
|
||||
"ember-load-initializers": "^1.0.0",
|
||||
"ember-maybe-import-regenerator": "^0.1.6",
|
||||
"ember-resolver": "^4.0.0",
|
||||
"ember-source": "~3.0.0",
|
||||
"ember-welcome-page": "^3.0.0",
|
||||
"eslint-plugin-ember": "^5.0.0",
|
||||
"loader.js": "^4.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^4.5 || 6.* || >= 7.*"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
# http://www.robotstxt.org
|
||||
User-agent: *
|
||||
Disallow:
|
|
@ -0,0 +1,24 @@
|
|||
module.exports = {
|
||||
test_page: 'tests/index.html?hidepassed',
|
||||
disable_watching: true,
|
||||
launch_in_ci: [
|
||||
'Chrome'
|
||||
],
|
||||
launch_in_dev: [
|
||||
'Chrome'
|
||||
],
|
||||
browser_args: {
|
||||
Chrome: {
|
||||
mode: 'ci',
|
||||
args: [
|
||||
// --no-sandbox is needed when running Chrome inside a container
|
||||
process.env.TRAVIS ? '--no-sandbox' : null,
|
||||
|
||||
'--disable-gpu',
|
||||
'--headless',
|
||||
'--remote-debugging-port=0',
|
||||
'--window-size=1440,900'
|
||||
].filter(Boolean)
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Quickstart Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
{{content-for "test-head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/quickstart.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
{{content-for "test-head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/quickstart.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
import Application from '../app';
|
||||
import config from '../config/environment';
|
||||
import { setApplication } from '@ember/test-helpers';
|
||||
import { start } from 'ember-qunit';
|
||||
|
||||
setApplication(Application.create(config.APP));
|
||||
|
||||
start();
|
0
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/vendor/.gitkeep
поставляемый
Normal file
0
devtools/client/debugger/new/test/mochitest/examples/ember/quickstart/vendor/.gitkeep
поставляемый
Normal file
|
@ -746,6 +746,91 @@ function disableBreakpoint(dbg, source, line, column) {
|
|||
return waitForDispatch(dbg, "DISABLE_BREAKPOINT");
|
||||
}
|
||||
|
||||
async function loadAndAddBreakpoint(dbg, filename, line, column) {
|
||||
const { selectors: { getBreakpoint, getBreakpoints }, getState } = dbg;
|
||||
|
||||
await waitForSources(dbg, filename);
|
||||
|
||||
ok(true, "Original sources exist");
|
||||
const source = findSource(dbg, filename);
|
||||
|
||||
await selectSource(dbg, source);
|
||||
|
||||
// Test that breakpoint is not off by a line.
|
||||
await addBreakpoint(dbg, source, line);
|
||||
|
||||
is(getBreakpoints(getState()).size, 1, "One breakpoint exists");
|
||||
ok(
|
||||
getBreakpoint(getState(), { sourceId: source.id, line, column }),
|
||||
"Breakpoint has correct line"
|
||||
);
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
async function invokeWithBreakpoint(dbg, fnName, filename, { line, column }, handler) {
|
||||
const { selectors: { getBreakpoints }, getState } = dbg;
|
||||
|
||||
const source = await loadAndAddBreakpoint(dbg, filename, line, column);
|
||||
|
||||
const invokeResult = invokeInTab(fnName);
|
||||
|
||||
let invokeFailed = await Promise.race([
|
||||
waitForPaused(dbg),
|
||||
invokeResult.then(() => new Promise(() => {}), () => true)
|
||||
]);
|
||||
|
||||
if (invokeFailed) {
|
||||
return invokeResult;
|
||||
}
|
||||
|
||||
assertPausedLocation(dbg);
|
||||
|
||||
await removeBreakpoint(dbg, source.id, line, column);
|
||||
|
||||
is(getBreakpoints(getState()).size, 0, "Breakpoint reverted");
|
||||
|
||||
await handler(source);
|
||||
|
||||
await resume(dbg);
|
||||
|
||||
// If the invoke errored later somehow, capture here so the error is reported nicely.
|
||||
await invokeResult;
|
||||
}
|
||||
|
||||
async function expandAllScopes(dbg) {
|
||||
const scopes = await waitForElement(dbg, "scopes");
|
||||
const scopeElements = scopes.querySelectorAll(
|
||||
`.tree-node[aria-level="1"][data-expandable="true"]:not([aria-expanded="true"])`
|
||||
);
|
||||
const indices = Array.from(scopeElements, el => {
|
||||
return Array.prototype.indexOf.call(el.parentNode.childNodes, el);
|
||||
}).reverse();
|
||||
|
||||
for (const index of indices) {
|
||||
await toggleScopeNode(dbg, index + 1);
|
||||
}
|
||||
}
|
||||
|
||||
async function assertScopes(dbg, items) {
|
||||
await expandAllScopes(dbg);
|
||||
|
||||
for (const [i, val] of items.entries()) {
|
||||
if (Array.isArray(val)) {
|
||||
is(getScopeLabel(dbg, i + 1), val[0]);
|
||||
is(
|
||||
getScopeValue(dbg, i + 1),
|
||||
val[1],
|
||||
`"${val[0]}" has the expected "${val[1]}" value`
|
||||
);
|
||||
} else {
|
||||
is(getScopeLabel(dbg, i + 1), val);
|
||||
}
|
||||
}
|
||||
|
||||
is(getScopeLabel(dbg, items.length + 1), "Window");
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a breakpoint from a source at line/col.
|
||||
*
|
||||
|
|
|
@ -272,6 +272,7 @@ devtools.jar:
|
|||
skin/images/debugger/close.svg (themes/images/debugger/close.svg)
|
||||
skin/images/debugger/coffeescript.svg (themes/images/debugger/coffeescript.svg)
|
||||
skin/images/debugger/domain.svg (themes/images/debugger/domain.svg)
|
||||
skin/images/debugger/extension.svg (themes/images/debugger/extension.svg)
|
||||
skin/images/debugger/file.svg (themes/images/debugger/file.svg)
|
||||
skin/images/debugger/folder.svg (themes/images/debugger/folder.svg)
|
||||
skin/images/debugger/forward.svg (themes/images/debugger/forward.svg)
|
||||
|
|
|
@ -655,6 +655,10 @@ addWatchExpressionText=Add watch expression
|
|||
# variables view popup.
|
||||
addWatchExpressionButton=Watch
|
||||
|
||||
# LOCALIZATION NOTE (extensionsText): The text that is displayed to represent
|
||||
# "moz-extension" directories in the source tree
|
||||
extensionsText=Extensions
|
||||
|
||||
# LOCALIZATION NOTE (emptyVariablesText): The text that is displayed in the
|
||||
# variables pane when there are no variables to display.
|
||||
emptyVariablesText=No variables to display
|
||||
|
|
|
@ -556,53 +556,81 @@ WorkerDispatcher.prototype = {
|
|||
this.worker = null;
|
||||
},
|
||||
|
||||
task(method) {
|
||||
return (...args) => {
|
||||
task(method, { queue = false } = {}) {
|
||||
const calls = [];
|
||||
const push = args => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const id = this.msgId++;
|
||||
this.worker.postMessage({ id, method, args });
|
||||
if (queue && calls.length === 0) {
|
||||
Promise.resolve().then(flush);
|
||||
}
|
||||
|
||||
const listener = ({ data: result }) => {
|
||||
if (result.id !== id) {
|
||||
return;
|
||||
}
|
||||
calls.push([args, resolve, reject]);
|
||||
|
||||
if (!this.worker) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.worker.removeEventListener("message", listener);
|
||||
if (result.error) {
|
||||
reject(result.error);
|
||||
} else {
|
||||
resolve(result.response);
|
||||
}
|
||||
};
|
||||
|
||||
this.worker.addEventListener("message", listener);
|
||||
if (!queue) {
|
||||
flush();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const flush = () => {
|
||||
const items = calls.slice();
|
||||
calls.length = 0;
|
||||
|
||||
const id = this.msgId++;
|
||||
this.worker.postMessage({ id, method, calls: items.map(item => item[0]) });
|
||||
|
||||
const listener = ({ data: result }) => {
|
||||
if (result.id !== id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.worker) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.worker.removeEventListener("message", listener);
|
||||
|
||||
result.results.forEach((resultData, i) => {
|
||||
const [, resolve, reject] = items[i];
|
||||
|
||||
if (resultData.error) {
|
||||
reject(resultData.error);
|
||||
} else {
|
||||
resolve(resultData.response);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.worker.addEventListener("message", listener);
|
||||
};
|
||||
|
||||
return (...args) => push(args);
|
||||
}
|
||||
};
|
||||
|
||||
function workerHandler(publicInterface) {
|
||||
return function (msg) {
|
||||
const { id, method, args } = msg.data;
|
||||
try {
|
||||
const response = publicInterface[method].apply(undefined, args);
|
||||
if (response instanceof Promise) {
|
||||
response.then(val => self.postMessage({ id, response: val }),
|
||||
// Error can't be sent via postMessage, so be sure to
|
||||
// convert to string.
|
||||
err => self.postMessage({ id, error: err.toString() }));
|
||||
} else {
|
||||
self.postMessage({ id, response });
|
||||
const { id, method, calls } = msg.data;
|
||||
|
||||
Promise.all(calls.map(args => {
|
||||
try {
|
||||
const response = publicInterface[method].apply(undefined, args);
|
||||
if (response instanceof Promise) {
|
||||
return response.then(val => ({ response: val }),
|
||||
// Error can't be sent via postMessage, so be sure to
|
||||
// convert to string.
|
||||
err => ({ error: err.toString() }));
|
||||
} else {
|
||||
return { response };
|
||||
}
|
||||
} catch (error) {
|
||||
// Error can't be sent via postMessage, so be sure to convert to
|
||||
// string.
|
||||
return { error: error.toString() };
|
||||
}
|
||||
} catch (error) {
|
||||
// Error can't be sent via postMessage, so be sure to convert to
|
||||
// string.
|
||||
self.postMessage({ id, error: error.toString() });
|
||||
}
|
||||
})).then(results => {
|
||||
self.postMessage({ id, results });
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -690,8 +718,9 @@ const { workerUtils: { WorkerDispatcher } } = __webpack_require__(1);
|
|||
const dispatcher = new WorkerDispatcher();
|
||||
|
||||
const getOriginalURLs = dispatcher.task("getOriginalURLs");
|
||||
const getGeneratedLocation = dispatcher.task("getGeneratedLocation");
|
||||
const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations");
|
||||
const getGeneratedRanges = dispatcher.task("getGeneratedRanges", { queue: true });
|
||||
const getGeneratedLocation = dispatcher.task("getGeneratedLocation", { queue: true });
|
||||
const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", { queue: true });
|
||||
const getOriginalLocation = dispatcher.task("getOriginalLocation");
|
||||
const getLocationScopes = dispatcher.task("getLocationScopes");
|
||||
const getOriginalSourceText = dispatcher.task("getOriginalSourceText");
|
||||
|
@ -706,6 +735,7 @@ module.exports = {
|
|||
isOriginalId,
|
||||
hasMappedSource,
|
||||
getOriginalURLs,
|
||||
getGeneratedRanges,
|
||||
getGeneratedLocation,
|
||||
getAllGeneratedLocations,
|
||||
getOriginalLocation,
|
||||
|
|
|
@ -1049,53 +1049,81 @@ WorkerDispatcher.prototype = {
|
|||
this.worker = null;
|
||||
},
|
||||
|
||||
task(method) {
|
||||
return (...args) => {
|
||||
task(method, { queue = false } = {}) {
|
||||
const calls = [];
|
||||
const push = args => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const id = this.msgId++;
|
||||
this.worker.postMessage({ id, method, args });
|
||||
if (queue && calls.length === 0) {
|
||||
Promise.resolve().then(flush);
|
||||
}
|
||||
|
||||
const listener = ({ data: result }) => {
|
||||
if (result.id !== id) {
|
||||
return;
|
||||
}
|
||||
calls.push([args, resolve, reject]);
|
||||
|
||||
if (!this.worker) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.worker.removeEventListener("message", listener);
|
||||
if (result.error) {
|
||||
reject(result.error);
|
||||
} else {
|
||||
resolve(result.response);
|
||||
}
|
||||
};
|
||||
|
||||
this.worker.addEventListener("message", listener);
|
||||
if (!queue) {
|
||||
flush();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const flush = () => {
|
||||
const items = calls.slice();
|
||||
calls.length = 0;
|
||||
|
||||
const id = this.msgId++;
|
||||
this.worker.postMessage({ id, method, calls: items.map(item => item[0]) });
|
||||
|
||||
const listener = ({ data: result }) => {
|
||||
if (result.id !== id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.worker) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.worker.removeEventListener("message", listener);
|
||||
|
||||
result.results.forEach((resultData, i) => {
|
||||
const [, resolve, reject] = items[i];
|
||||
|
||||
if (resultData.error) {
|
||||
reject(resultData.error);
|
||||
} else {
|
||||
resolve(resultData.response);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.worker.addEventListener("message", listener);
|
||||
};
|
||||
|
||||
return (...args) => push(args);
|
||||
}
|
||||
};
|
||||
|
||||
function workerHandler(publicInterface) {
|
||||
return function (msg) {
|
||||
const { id, method, args } = msg.data;
|
||||
try {
|
||||
const response = publicInterface[method].apply(undefined, args);
|
||||
if (response instanceof Promise) {
|
||||
response.then(val => self.postMessage({ id, response: val }),
|
||||
// Error can't be sent via postMessage, so be sure to
|
||||
// convert to string.
|
||||
err => self.postMessage({ id, error: err.toString() }));
|
||||
} else {
|
||||
self.postMessage({ id, response });
|
||||
const { id, method, calls } = msg.data;
|
||||
|
||||
Promise.all(calls.map(args => {
|
||||
try {
|
||||
const response = publicInterface[method].apply(undefined, args);
|
||||
if (response instanceof Promise) {
|
||||
return response.then(val => ({ response: val }),
|
||||
// Error can't be sent via postMessage, so be sure to
|
||||
// convert to string.
|
||||
err => ({ error: err.toString() }));
|
||||
} else {
|
||||
return { response };
|
||||
}
|
||||
} catch (error) {
|
||||
// Error can't be sent via postMessage, so be sure to convert to
|
||||
// string.
|
||||
return { error: error.toString() };
|
||||
}
|
||||
} catch (error) {
|
||||
// Error can't be sent via postMessage, so be sure to convert to
|
||||
// string.
|
||||
self.postMessage({ id, error: error.toString() });
|
||||
}
|
||||
})).then(results => {
|
||||
self.postMessage({ id, results });
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2025,6 +2053,7 @@ exports.WasmRemap = WasmRemap;
|
|||
|
||||
const {
|
||||
getOriginalURLs,
|
||||
getGeneratedRanges,
|
||||
getGeneratedLocation,
|
||||
getAllGeneratedLocations,
|
||||
getOriginalLocation,
|
||||
|
@ -2042,6 +2071,7 @@ const { workerUtils: { workerHandler } } = __webpack_require__(1);
|
|||
// easier to unit test.
|
||||
self.onmessage = workerHandler({
|
||||
getOriginalURLs,
|
||||
getGeneratedRanges,
|
||||
getGeneratedLocation,
|
||||
getAllGeneratedLocations,
|
||||
getOriginalLocation,
|
||||
|
@ -2067,8 +2097,65 @@ let getOriginalURLs = (() => {
|
|||
};
|
||||
})();
|
||||
|
||||
let getGeneratedLocation = (() => {
|
||||
/**
|
||||
* Given an original location, find the ranges on the generated file that
|
||||
* are mapped from the original range containing the location.
|
||||
*/
|
||||
let getGeneratedRanges = (() => {
|
||||
var _ref2 = _asyncToGenerator(function* (location, originalSource) {
|
||||
if (!isOriginalId(location.sourceId)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const generatedSourceId = originalToGeneratedId(location.sourceId);
|
||||
const map = yield getSourceMap(generatedSourceId);
|
||||
if (!map) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!COMPUTED_SPANS.has(map)) {
|
||||
COMPUTED_SPANS.add(map);
|
||||
map.computeColumnSpans();
|
||||
}
|
||||
|
||||
// We want to use 'allGeneratedPositionsFor' to get the _first_ generated
|
||||
// location, but it hard-codes SourceMapConsumer.LEAST_UPPER_BOUND as the
|
||||
// bias, making it search in the wrong direction for this usecase.
|
||||
// To work around this, we use 'generatedPositionFor' and then look up the
|
||||
// exact original location, making any bias value unnecessary, and then
|
||||
// use that location for the call to 'allGeneratedPositionsFor'.
|
||||
const genPos = map.generatedPositionFor({
|
||||
source: originalSource.url,
|
||||
line: location.line,
|
||||
column: location.column == null ? 0 : location.column,
|
||||
bias: SourceMapConsumer.GREATEST_LOWER_BOUND
|
||||
});
|
||||
if (genPos.line === null) return [];
|
||||
|
||||
const positions = map.allGeneratedPositionsFor(map.originalPositionFor({
|
||||
line: genPos.line,
|
||||
column: genPos.column
|
||||
}));
|
||||
|
||||
return positions.map(function (mapping) {
|
||||
return {
|
||||
line: mapping.line,
|
||||
columnStart: mapping.column,
|
||||
columnEnd: mapping.lastColumn
|
||||
};
|
||||
}).sort(function (a, b) {
|
||||
const line = a.line - b.line;
|
||||
return line === 0 ? a.column - b.column : line;
|
||||
});
|
||||
});
|
||||
|
||||
return function getGeneratedRanges(_x2, _x3) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let getGeneratedLocation = (() => {
|
||||
var _ref3 = _asyncToGenerator(function* (location, originalSource) {
|
||||
if (!isOriginalId(location.sourceId)) {
|
||||
return location;
|
||||
}
|
||||
|
@ -2093,13 +2180,13 @@ let getGeneratedLocation = (() => {
|
|||
};
|
||||
});
|
||||
|
||||
return function getGeneratedLocation(_x2, _x3) {
|
||||
return _ref2.apply(this, arguments);
|
||||
return function getGeneratedLocation(_x4, _x5) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let getAllGeneratedLocations = (() => {
|
||||
var _ref3 = _asyncToGenerator(function* (location, originalSource) {
|
||||
var _ref4 = _asyncToGenerator(function* (location, originalSource) {
|
||||
if (!isOriginalId(location.sourceId)) {
|
||||
return [];
|
||||
}
|
||||
|
@ -2113,8 +2200,7 @@ let getAllGeneratedLocations = (() => {
|
|||
const positions = map.allGeneratedPositionsFor({
|
||||
source: originalSource.url,
|
||||
line: location.line,
|
||||
column: location.column == null ? 0 : location.column,
|
||||
bias: SourceMapConsumer.LEAST_UPPER_BOUND
|
||||
column: location.column == null ? 0 : location.column
|
||||
});
|
||||
|
||||
return positions.map(function ({ line, column }) {
|
||||
|
@ -2126,13 +2212,13 @@ let getAllGeneratedLocations = (() => {
|
|||
});
|
||||
});
|
||||
|
||||
return function getAllGeneratedLocations(_x4, _x5) {
|
||||
return _ref3.apply(this, arguments);
|
||||
return function getAllGeneratedLocations(_x6, _x7) {
|
||||
return _ref4.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let getOriginalLocation = (() => {
|
||||
var _ref4 = _asyncToGenerator(function* (location) {
|
||||
var _ref5 = _asyncToGenerator(function* (location) {
|
||||
if (!isGeneratedId(location.sourceId)) {
|
||||
return location;
|
||||
}
|
||||
|
@ -2160,13 +2246,13 @@ let getOriginalLocation = (() => {
|
|||
};
|
||||
});
|
||||
|
||||
return function getOriginalLocation(_x6) {
|
||||
return _ref4.apply(this, arguments);
|
||||
return function getOriginalLocation(_x8) {
|
||||
return _ref5.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let getOriginalSourceText = (() => {
|
||||
var _ref5 = _asyncToGenerator(function* (originalSource) {
|
||||
var _ref6 = _asyncToGenerator(function* (originalSource) {
|
||||
assert(isOriginalId(originalSource.id), "Source is not an original source");
|
||||
|
||||
const generatedSourceId = originalToGeneratedId(originalSource.id);
|
||||
|
@ -2186,13 +2272,13 @@ let getOriginalSourceText = (() => {
|
|||
};
|
||||
});
|
||||
|
||||
return function getOriginalSourceText(_x7) {
|
||||
return _ref5.apply(this, arguments);
|
||||
return function getOriginalSourceText(_x9) {
|
||||
return _ref6.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let hasMappedSource = (() => {
|
||||
var _ref6 = _asyncToGenerator(function* (location) {
|
||||
var _ref7 = _asyncToGenerator(function* (location) {
|
||||
if (isOriginalId(location.sourceId)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -2201,8 +2287,8 @@ let hasMappedSource = (() => {
|
|||
return loc.sourceId !== location.sourceId;
|
||||
});
|
||||
|
||||
return function hasMappedSource(_x8) {
|
||||
return _ref6.apply(this, arguments);
|
||||
return function hasMappedSource(_x10) {
|
||||
return _ref7.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
|
@ -2237,6 +2323,8 @@ const {
|
|||
|
||||
const { WasmRemap } = __webpack_require__(14);
|
||||
|
||||
const COMPUTED_SPANS = new WeakSet();
|
||||
|
||||
function applySourceMap(generatedId, url, code, mappings) {
|
||||
const generator = new SourceMapGenerator({ file: url });
|
||||
mappings.forEach(mapping => generator.addMapping(mapping));
|
||||
|
@ -2248,6 +2336,7 @@ function applySourceMap(generatedId, url, code, mappings) {
|
|||
|
||||
module.exports = {
|
||||
getOriginalURLs,
|
||||
getGeneratedRanges,
|
||||
getGeneratedLocation,
|
||||
getAllGeneratedLocations,
|
||||
getOriginalLocation,
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" d="M14.5 8c-.971 0-1 1-1.75 1a.765.765 0 0 1-.75-.75V5a1 1 0 0 0-1-1H7.75A.765.765 0 0 1 7 3.25c0-.75 1-.779 1-1.75C8 .635 7.1 0 6 0S4 .635 4 1.5c0 .971 1 1 1 1.75a.765.765 0 0 1-.75.75H1a1 1 0 0 0-1 1v2.25A.765.765 0 0 0 .75 8c.75 0 .779-1 1.75-1C3.365 7 4 7.9 4 9s-.635 2-1.5 2c-.971 0-1-1-1.75-1a.765.765 0 0 0-.75.75V15a1 1 0 0 0 1 1h3.25a.765.765 0 0 0 .75-.75c0-.75-1-.779-1-1.75 0-.865.9-1.5 2-1.5s2 .635 2 1.5c0 .971-1 1-1 1.75a.765.765 0 0 0 .75.75H11a1 1 0 0 0 1-1v-3.25a.765.765 0 0 1 .75-.75c.75 0 .779 1 1.75 1 .865 0 1.5-.9 1.5-2s-.635-2-1.5-2z"></path>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 899 B |
|
@ -1572,36 +1572,19 @@ InitializeLegacyNetscapeObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal)
|
|||
}
|
||||
|
||||
static JS::CompartmentCreationOptions&
|
||||
SelectZoneGroup(nsGlobalWindowInner* aNewInner,
|
||||
JS::CompartmentCreationOptions& aOptions)
|
||||
SelectZone(nsGlobalWindowInner* aNewInner,
|
||||
JS::CompartmentCreationOptions& aOptions)
|
||||
{
|
||||
JS::CompartmentCreationOptions options;
|
||||
|
||||
if (aNewInner->GetOuterWindow()) {
|
||||
nsGlobalWindowOuter *top = aNewInner->GetTopInternal();
|
||||
|
||||
// If we have a top-level window, use its zone (and zone group).
|
||||
// If we have a top-level window, use its zone.
|
||||
if (top && top->GetGlobalJSObject()) {
|
||||
return aOptions.setExistingZone(top->GetGlobalJSObject());
|
||||
}
|
||||
}
|
||||
|
||||
// If we're in the parent process, don't bother with zone groups.
|
||||
if (XRE_IsParentProcess()) {
|
||||
return aOptions.setNewZoneInSystemZoneGroup();
|
||||
}
|
||||
|
||||
// Otherwise, find a zone group from the TabGroup. Typically we only have to
|
||||
// go through one iteration of this loop.
|
||||
RefPtr<TabGroup> tabGroup = aNewInner->TabGroup();
|
||||
for (nsPIDOMWindowOuter* outer : tabGroup->GetWindows()) {
|
||||
nsGlobalWindowOuter* window = nsGlobalWindowOuter::Cast(outer);
|
||||
if (JSObject* global = window->GetGlobalJSObject()) {
|
||||
return aOptions.setNewZoneInExistingZoneGroup(global);
|
||||
}
|
||||
}
|
||||
|
||||
return aOptions.setNewZoneInNewZoneGroup();
|
||||
return aOptions.setNewZone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1628,7 +1611,7 @@ CreateNativeGlobalForInner(JSContext* aCx,
|
|||
|
||||
JS::CompartmentOptions options;
|
||||
|
||||
SelectZoneGroup(aNewInner, options.creationOptions());
|
||||
SelectZone(aNewInner, options.creationOptions());
|
||||
|
||||
options.creationOptions().setSecureContext(aIsSecureContext);
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ IndirectBindingMap::put(JSContext* cx, HandleId name,
|
|||
// different zone to the final module. Lazily allocate the map so we don't
|
||||
// have to switch its zone when merging compartments.
|
||||
if (!map_) {
|
||||
MOZ_ASSERT(!cx->zone()->group()->createdForHelperThread());
|
||||
MOZ_ASSERT(!cx->zone()->createdForHelperThread());
|
||||
map_.emplace(cx->zone());
|
||||
if (!map_->init()) {
|
||||
map_.reset();
|
||||
|
|
|
@ -1612,8 +1612,7 @@ static size_t
|
|||
CountCompartments(JSContext* cx)
|
||||
{
|
||||
size_t count = 0;
|
||||
ZoneGroup* group = cx->compartment()->zone()->group();
|
||||
for (auto zone : group->zones())
|
||||
for (auto zone : cx->runtime()->gc.zones())
|
||||
count += zone->compartments().length();
|
||||
return count;
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ class ArenaLists
|
|||
ZoneGroupData<Arena*> savedEmptyArenas;
|
||||
|
||||
public:
|
||||
explicit ArenaLists(JSRuntime* rt, ZoneGroup* group);
|
||||
explicit ArenaLists(JSRuntime* rt, JS::Zone* zone);
|
||||
~ArenaLists();
|
||||
|
||||
const void* addressOfFreeList(AllocKind thingKind) const {
|
||||
|
|
152
js/src/gc/GC.cpp
152
js/src/gc/GC.cpp
|
@ -935,7 +935,6 @@ GCRuntime::releaseArena(Arena* arena, const AutoLockGC& lock)
|
|||
GCRuntime::GCRuntime(JSRuntime* rt) :
|
||||
rt(rt),
|
||||
systemZone(nullptr),
|
||||
systemZoneGroup(nullptr),
|
||||
atomsZone(nullptr),
|
||||
stats_(rt),
|
||||
marker(rt),
|
||||
|
@ -1272,7 +1271,7 @@ GCRuntime::finish()
|
|||
}
|
||||
}
|
||||
|
||||
groups().clear();
|
||||
zones().clear();
|
||||
|
||||
FreeChunkPool(fullChunks_.ref());
|
||||
FreeChunkPool(availableChunks_.ref());
|
||||
|
@ -2994,19 +2993,19 @@ GCRuntime::releaseHeldRelocatedArenasWithoutUnlocking(const AutoLockGC& lock)
|
|||
#endif
|
||||
}
|
||||
|
||||
ArenaLists::ArenaLists(JSRuntime* rt, ZoneGroup* group)
|
||||
ArenaLists::ArenaLists(JSRuntime* rt, Zone* zone)
|
||||
: runtime_(rt),
|
||||
freeLists_(group),
|
||||
arenaLists_(group),
|
||||
freeLists_(zone),
|
||||
arenaLists_(zone),
|
||||
backgroundFinalizeState_(),
|
||||
arenaListsToSweep_(),
|
||||
incrementalSweptArenaKind(group, AllocKind::LIMIT),
|
||||
incrementalSweptArenas(group),
|
||||
gcShapeArenasToUpdate(group, nullptr),
|
||||
gcAccessorShapeArenasToUpdate(group, nullptr),
|
||||
gcScriptArenasToUpdate(group, nullptr),
|
||||
gcObjectGroupArenasToUpdate(group, nullptr),
|
||||
savedEmptyArenas(group, nullptr)
|
||||
incrementalSweptArenaKind(zone, AllocKind::LIMIT),
|
||||
incrementalSweptArenas(zone),
|
||||
gcShapeArenasToUpdate(zone, nullptr),
|
||||
gcAccessorShapeArenasToUpdate(zone, nullptr),
|
||||
gcScriptArenasToUpdate(zone, nullptr),
|
||||
gcObjectGroupArenasToUpdate(zone, nullptr),
|
||||
savedEmptyArenas(zone, nullptr)
|
||||
{
|
||||
for (auto i : AllAllocKinds()) {
|
||||
freeLists()[i] = &placeholder;
|
||||
|
@ -3792,12 +3791,33 @@ Zone::sweepCompartments(FreeOp* fop, bool keepAtleastOne, bool destroyingRuntime
|
|||
}
|
||||
|
||||
void
|
||||
GCRuntime::sweepZones(FreeOp* fop, ZoneGroup* group, bool destroyingRuntime)
|
||||
GCRuntime::deleteEmptyZone(Zone* zone)
|
||||
{
|
||||
MOZ_ASSERT(!group->zones().empty());
|
||||
MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt));
|
||||
MOZ_ASSERT(zone->compartments().empty());
|
||||
for (auto& i : zones()) {
|
||||
if (i == zone) {
|
||||
zones().erase(&i);
|
||||
zone->destroy(rt->defaultFreeOp());
|
||||
return;
|
||||
}
|
||||
}
|
||||
MOZ_CRASH("Zone not found");
|
||||
}
|
||||
|
||||
Zone** read = group->zones().begin();
|
||||
Zone** end = group->zones().end();
|
||||
void
|
||||
GCRuntime::sweepZones(FreeOp* fop, bool destroyingRuntime)
|
||||
{
|
||||
MOZ_ASSERT_IF(destroyingRuntime, numActiveZoneIters == 0);
|
||||
MOZ_ASSERT_IF(destroyingRuntime, arenasEmptyAtShutdown);
|
||||
|
||||
if (rt->gc.numActiveZoneIters)
|
||||
return;
|
||||
|
||||
assertBackgroundSweepingFinished();
|
||||
|
||||
Zone** read = zones().begin();
|
||||
Zone** end = zones().end();
|
||||
Zone** write = read;
|
||||
|
||||
while (read < end) {
|
||||
|
@ -3831,36 +3851,7 @@ GCRuntime::sweepZones(FreeOp* fop, ZoneGroup* group, bool destroyingRuntime)
|
|||
}
|
||||
*write++ = zone;
|
||||
}
|
||||
group->zones().shrinkTo(write - group->zones().begin());
|
||||
}
|
||||
|
||||
void
|
||||
GCRuntime::sweepZoneGroups(FreeOp* fop, bool destroyingRuntime)
|
||||
{
|
||||
MOZ_ASSERT_IF(destroyingRuntime, numActiveZoneIters == 0);
|
||||
MOZ_ASSERT_IF(destroyingRuntime, arenasEmptyAtShutdown);
|
||||
|
||||
if (rt->gc.numActiveZoneIters)
|
||||
return;
|
||||
|
||||
assertBackgroundSweepingFinished();
|
||||
|
||||
ZoneGroup** read = groups().begin();
|
||||
ZoneGroup** end = groups().end();
|
||||
ZoneGroup** write = read;
|
||||
|
||||
while (read < end) {
|
||||
ZoneGroup* group = *read++;
|
||||
sweepZones(fop, group, destroyingRuntime);
|
||||
|
||||
if (group->zones().empty()) {
|
||||
MOZ_ASSERT(numActiveZoneIters == 0);
|
||||
fop->delete_(group);
|
||||
} else {
|
||||
*write++ = group;
|
||||
}
|
||||
}
|
||||
groups().shrinkTo(write - groups().begin());
|
||||
zones().shrinkTo(write - zones().begin());
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -7066,7 +7057,7 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea
|
|||
gcstats::AutoPhase ap2(stats(), gcstats::PhaseKind::DESTROY);
|
||||
AutoSetThreadIsSweeping threadIsSweeping;
|
||||
FreeOp fop(rt);
|
||||
sweepZoneGroups(&fop, destroyingRuntime);
|
||||
sweepZones(&fop, destroyingRuntime);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!startedCompacting);
|
||||
|
@ -7802,47 +7793,26 @@ js::NewCompartment(JSContext* cx, JSPrincipals* principals,
|
|||
JSRuntime* rt = cx->runtime();
|
||||
JS_AbortIfWrongThread(cx);
|
||||
|
||||
ScopedJSDeletePtr<ZoneGroup> groupHolder;
|
||||
ScopedJSDeletePtr<Zone> zoneHolder;
|
||||
|
||||
Zone* zone = nullptr;
|
||||
ZoneGroup* group = nullptr;
|
||||
JS::ZoneSpecifier zoneSpec = options.creationOptions().zoneSpecifier();
|
||||
switch (zoneSpec) {
|
||||
case JS::SystemZone:
|
||||
// systemZone and possibly systemZoneGroup might be null here, in which
|
||||
// case we'll make a zone/group and set these fields below.
|
||||
// systemZone might be null here, in which case we'll make a zone and
|
||||
// set this field below.
|
||||
zone = rt->gc.systemZone;
|
||||
group = rt->gc.systemZoneGroup;
|
||||
break;
|
||||
case JS::ExistingZone:
|
||||
zone = static_cast<Zone*>(options.creationOptions().zonePointer());
|
||||
zone = options.creationOptions().zone();
|
||||
MOZ_ASSERT(zone);
|
||||
group = zone->group();
|
||||
break;
|
||||
case JS::NewZoneInNewZoneGroup:
|
||||
case JS::NewZone:
|
||||
break;
|
||||
case JS::NewZoneInSystemZoneGroup:
|
||||
// As above, systemZoneGroup might be null here.
|
||||
group = rt->gc.systemZoneGroup;
|
||||
break;
|
||||
case JS::NewZoneInExistingZoneGroup:
|
||||
group = static_cast<ZoneGroup*>(options.creationOptions().zonePointer());
|
||||
MOZ_ASSERT(group);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!group) {
|
||||
MOZ_ASSERT(!zone);
|
||||
group = cx->new_<ZoneGroup>(rt);
|
||||
if (!group)
|
||||
return nullptr;
|
||||
|
||||
groupHolder.reset(group);
|
||||
}
|
||||
|
||||
if (!zone) {
|
||||
zone = cx->new_<Zone>(cx->runtime(), group);
|
||||
zone = cx->new_<Zone>(cx->runtime());
|
||||
if (!zone)
|
||||
return nullptr;
|
||||
|
||||
|
@ -7871,7 +7841,7 @@ js::NewCompartment(JSContext* cx, JSPrincipals* principals,
|
|||
}
|
||||
|
||||
if (zoneHolder) {
|
||||
if (!group->zones().append(zone)) {
|
||||
if (!rt->gc.zones().append(zone)) {
|
||||
ReportOutOfMemory(cx);
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -7884,21 +7854,7 @@ js::NewCompartment(JSContext* cx, JSPrincipals* principals,
|
|||
}
|
||||
}
|
||||
|
||||
if (groupHolder) {
|
||||
if (!rt->gc.groups().append(group)) {
|
||||
ReportOutOfMemory(cx);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Lazily set the runtime's system zone group.
|
||||
if (zoneSpec == JS::SystemZone || zoneSpec == JS::NewZoneInSystemZoneGroup) {
|
||||
MOZ_RELEASE_ASSERT(!rt->gc.systemZoneGroup);
|
||||
rt->gc.systemZoneGroup = group;
|
||||
}
|
||||
}
|
||||
|
||||
zoneHolder.forget();
|
||||
groupHolder.forget();
|
||||
return compartment.forget();
|
||||
}
|
||||
|
||||
|
@ -7922,7 +7878,6 @@ GCRuntime::mergeCompartments(JSCompartment* source, JSCompartment* target)
|
|||
|
||||
MOZ_ASSERT(!source->hasBeenEntered());
|
||||
MOZ_ASSERT(source->zone()->compartments().length() == 1);
|
||||
MOZ_ASSERT(source->zone()->group()->zones().length() == 1);
|
||||
|
||||
JSContext* cx = rt->mainContextFromOwnThread();
|
||||
|
||||
|
@ -8051,25 +8006,8 @@ GCRuntime::mergeCompartments(JSCompartment* source, JSCompartment* target)
|
|||
// a full GC.
|
||||
|
||||
Zone* sourceZone = source->zone();
|
||||
ZoneGroup* sourceGroup = sourceZone->group();
|
||||
sourceZone->deleteEmptyCompartment(source);
|
||||
sourceGroup->deleteEmptyZone(sourceZone);
|
||||
deleteEmptyZoneGroup(sourceGroup);
|
||||
}
|
||||
|
||||
void
|
||||
GCRuntime::deleteEmptyZoneGroup(ZoneGroup* group)
|
||||
{
|
||||
MOZ_ASSERT(group->zones().empty());
|
||||
MOZ_ASSERT(groups().length() > 1);
|
||||
for (auto& i : groups()) {
|
||||
if (i == group) {
|
||||
groups().erase(&i);
|
||||
js_delete(group);
|
||||
return;
|
||||
}
|
||||
}
|
||||
MOZ_CRASH("ZoneGroup not found");
|
||||
deleteEmptyZone(sourceZone);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -33,8 +33,8 @@ class VerifyPreTracer;
|
|||
|
||||
namespace gc {
|
||||
|
||||
typedef Vector<ZoneGroup*, 4, SystemAllocPolicy> ZoneGroupVector;
|
||||
using BlackGrayEdgeVector = Vector<TenuredCell*, 0, SystemAllocPolicy>;
|
||||
using ZoneVector = Vector<JS::Zone*, 4, SystemAllocPolicy>;
|
||||
|
||||
class AutoCallGCCallbacks;
|
||||
class AutoRunParallelTask;
|
||||
|
@ -492,8 +492,8 @@ class GCRuntime
|
|||
Ok
|
||||
};
|
||||
|
||||
// Delete an empty zone group after its contents have been merged.
|
||||
void deleteEmptyZoneGroup(ZoneGroup* group);
|
||||
// Delete an empty zone after its contents have been merged.
|
||||
void deleteEmptyZone(Zone* zone);
|
||||
|
||||
// For ArenaLists::allocateFromArena()
|
||||
friend class ArenaLists;
|
||||
|
@ -598,8 +598,7 @@ class GCRuntime
|
|||
IncrementalProgress sweepShapeTree(FreeOp* fop, SliceBudget& budget, Zone* zone);
|
||||
void endSweepPhase(bool lastGC);
|
||||
bool allCCVisibleZonesWereCollected() const;
|
||||
void sweepZones(FreeOp* fop, ZoneGroup* group, bool lastGC);
|
||||
void sweepZoneGroups(FreeOp* fop, bool destroyingRuntime);
|
||||
void sweepZones(FreeOp* fop, bool destroyingRuntime);
|
||||
void decommitAllWithoutUnlocking(const AutoLockGC& lock);
|
||||
void startDecommit();
|
||||
void queueZonesForBackgroundSweep(ZoneList& zones);
|
||||
|
@ -642,15 +641,14 @@ class GCRuntime
|
|||
|
||||
/* Embedders can use this zone and group however they wish. */
|
||||
UnprotectedData<JS::Zone*> systemZone;
|
||||
UnprotectedData<ZoneGroup*> systemZoneGroup;
|
||||
|
||||
// List of all zone groups (protected by the GC lock).
|
||||
// All zones in the runtime, except the atoms zone.
|
||||
private:
|
||||
ActiveThreadOrGCTaskData<ZoneGroupVector> groups_;
|
||||
ActiveThreadOrGCTaskData<ZoneVector> zones_;
|
||||
public:
|
||||
ZoneGroupVector& groups() { return groups_.ref(); }
|
||||
ZoneVector& zones() { return zones_.ref(); }
|
||||
|
||||
// The unique atoms zone, which has no zone group.
|
||||
// The unique atoms zone.
|
||||
WriteOnceData<Zone*> atomsZone;
|
||||
|
||||
private:
|
||||
|
|
|
@ -50,7 +50,6 @@ class NativeObject;
|
|||
class Nursery;
|
||||
struct NurseryChunk;
|
||||
class HeapSlot;
|
||||
class ZoneGroup;
|
||||
class JSONPrinter;
|
||||
|
||||
void SetGCZeal(JSRuntime*, uint8_t, uint32_t);
|
||||
|
|
|
@ -17,41 +17,6 @@
|
|||
|
||||
namespace js {
|
||||
|
||||
// Iterate over all zone groups except those which may be in use by helper
|
||||
// thread parse tasks.
|
||||
class ZoneGroupsIter
|
||||
{
|
||||
gc::AutoEnterIteration iterMarker;
|
||||
ZoneGroup** it;
|
||||
ZoneGroup** end;
|
||||
|
||||
public:
|
||||
explicit ZoneGroupsIter(JSRuntime* rt) : iterMarker(&rt->gc) {
|
||||
it = rt->gc.groups().begin();
|
||||
end = rt->gc.groups().end();
|
||||
|
||||
if (!done() && (*it)->usedByHelperThread())
|
||||
next();
|
||||
}
|
||||
|
||||
bool done() const { return it == end; }
|
||||
|
||||
void next() {
|
||||
MOZ_ASSERT(!done());
|
||||
do {
|
||||
it++;
|
||||
} while (!done() && (*it)->usedByHelperThread());
|
||||
}
|
||||
|
||||
ZoneGroup* get() const {
|
||||
MOZ_ASSERT(!done());
|
||||
return *it;
|
||||
}
|
||||
|
||||
operator ZoneGroup*() const { return get(); }
|
||||
ZoneGroup* operator->() const { return get(); }
|
||||
};
|
||||
|
||||
// Using the atoms zone without holding the exclusive access lock is dangerous
|
||||
// because worker threads may be using it simultaneously. Therefore, it's
|
||||
// better to skip the atoms zone when iterating over zones. If you need to
|
||||
|
@ -61,74 +26,45 @@ enum ZoneSelector {
|
|||
SkipAtoms
|
||||
};
|
||||
|
||||
// Iterate over all zones in one zone group.
|
||||
class ZonesInGroupIter
|
||||
{
|
||||
gc::AutoEnterIteration iterMarker;
|
||||
JS::Zone** it;
|
||||
JS::Zone** end;
|
||||
|
||||
public:
|
||||
explicit ZonesInGroupIter(ZoneGroup* group) : iterMarker(&group->runtime->gc) {
|
||||
it = group->zones().begin();
|
||||
end = group->zones().end();
|
||||
}
|
||||
|
||||
bool done() const { return it == end; }
|
||||
|
||||
void next() {
|
||||
MOZ_ASSERT(!done());
|
||||
it++;
|
||||
}
|
||||
|
||||
JS::Zone* get() const {
|
||||
MOZ_ASSERT(!done());
|
||||
return *it;
|
||||
}
|
||||
|
||||
operator JS::Zone*() const { return get(); }
|
||||
JS::Zone* operator->() const { return get(); }
|
||||
};
|
||||
|
||||
// Iterate over all zones in the runtime, except those which may be in use by
|
||||
// parse threads.
|
||||
class ZonesIter
|
||||
{
|
||||
ZoneGroupsIter group;
|
||||
mozilla::Maybe<ZonesInGroupIter> zone;
|
||||
gc::AutoEnterIteration iterMarker;
|
||||
JS::Zone* atomsZone;
|
||||
JS::Zone** it;
|
||||
JS::Zone** end;
|
||||
|
||||
public:
|
||||
ZonesIter(JSRuntime* rt, ZoneSelector selector)
|
||||
: group(rt), atomsZone(selector == WithAtoms ? rt->gc.atomsZone.ref() : nullptr)
|
||||
: iterMarker(&rt->gc),
|
||||
atomsZone(selector == WithAtoms ? rt->gc.atomsZone.ref() : nullptr),
|
||||
it(rt->gc.zones().begin()),
|
||||
end(rt->gc.zones().end())
|
||||
{
|
||||
if (!atomsZone && !done())
|
||||
next();
|
||||
if (!atomsZone)
|
||||
skipHelperThreadZones();
|
||||
}
|
||||
|
||||
bool done() const { return !atomsZone && group.done(); }
|
||||
bool done() const { return !atomsZone && it == end; }
|
||||
|
||||
void next() {
|
||||
MOZ_ASSERT(!done());
|
||||
if (atomsZone)
|
||||
atomsZone = nullptr;
|
||||
while (!group.done()) {
|
||||
if (zone.isSome())
|
||||
zone.ref().next();
|
||||
else
|
||||
zone.emplace(group);
|
||||
if (zone.ref().done()) {
|
||||
zone.reset();
|
||||
group.next();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
it++;
|
||||
skipHelperThreadZones();
|
||||
}
|
||||
|
||||
void skipHelperThreadZones() {
|
||||
while (!done() && get()->usedByHelperThread())
|
||||
it++;
|
||||
}
|
||||
|
||||
JS::Zone* get() const {
|
||||
MOZ_ASSERT(!done());
|
||||
return atomsZone ? atomsZone : zone.ref().get();
|
||||
return atomsZone ? atomsZone : *it;
|
||||
}
|
||||
|
||||
operator JS::Zone*() const { return get(); }
|
||||
|
|
|
@ -535,7 +535,7 @@ HeapCheckTracerBase::onChild(const JS::GCCellPtr& thing)
|
|||
else
|
||||
zone = cell->asTenured().zone();
|
||||
|
||||
if (zone->group() && zone->group()->usedByHelperThread())
|
||||
if (zone->usedByHelperThread())
|
||||
return;
|
||||
|
||||
WorkItem item(thing, contextName(), parentIndex);
|
||||
|
|
|
@ -24,45 +24,46 @@ using namespace js::gc;
|
|||
|
||||
Zone * const Zone::NotOnList = reinterpret_cast<Zone*>(1);
|
||||
|
||||
JS::Zone::Zone(JSRuntime* rt, ZoneGroup* group)
|
||||
JS::Zone::Zone(JSRuntime* rt)
|
||||
: JS::shadow::Zone(rt, &rt->gc.marker),
|
||||
group_(group),
|
||||
debuggers(group, nullptr),
|
||||
uniqueIds_(group),
|
||||
suppressAllocationMetadataBuilder(group, false),
|
||||
arenas(rt, group),
|
||||
debuggers(this, nullptr),
|
||||
uniqueIds_(this),
|
||||
suppressAllocationMetadataBuilder(this, false),
|
||||
arenas(rt, this),
|
||||
types(this),
|
||||
gcWeakMapList_(group),
|
||||
gcWeakMapList_(this),
|
||||
compartments_(),
|
||||
gcGrayRoots_(group),
|
||||
gcWeakRefs_(group),
|
||||
weakCaches_(group),
|
||||
gcWeakKeys_(group, SystemAllocPolicy(), rt->randomHashCodeScrambler()),
|
||||
typeDescrObjects_(group, this),
|
||||
gcGrayRoots_(this),
|
||||
gcWeakRefs_(this),
|
||||
weakCaches_(this),
|
||||
gcWeakKeys_(this, SystemAllocPolicy(), rt->randomHashCodeScrambler()),
|
||||
typeDescrObjects_(this, this),
|
||||
regExps(this),
|
||||
markedAtoms_(group),
|
||||
atomCache_(group),
|
||||
externalStringCache_(group),
|
||||
functionToStringCache_(group),
|
||||
markedAtoms_(this),
|
||||
atomCache_(this),
|
||||
externalStringCache_(this),
|
||||
functionToStringCache_(this),
|
||||
usage(&rt->gc.usage),
|
||||
threshold(),
|
||||
gcDelayBytes(0),
|
||||
tenuredStrings(group, 0),
|
||||
allocNurseryStrings(group, true),
|
||||
propertyTree_(group, this),
|
||||
baseShapes_(group, this),
|
||||
initialShapes_(group, this),
|
||||
nurseryShapes_(group),
|
||||
data(group, nullptr),
|
||||
isSystem(group, false),
|
||||
tenuredStrings(this, 0),
|
||||
allocNurseryStrings(this, true),
|
||||
propertyTree_(this, this),
|
||||
baseShapes_(this, this),
|
||||
initialShapes_(this, this),
|
||||
nurseryShapes_(this),
|
||||
data(this, nullptr),
|
||||
isSystem(this, false),
|
||||
helperThreadOwnerContext_(nullptr),
|
||||
helperThreadUse(HelperThreadUse::None),
|
||||
#ifdef DEBUG
|
||||
gcLastSweepGroupIndex(group, 0),
|
||||
gcLastSweepGroupIndex(this, 0),
|
||||
#endif
|
||||
jitZone_(group, nullptr),
|
||||
jitZone_(this, nullptr),
|
||||
gcScheduled_(false),
|
||||
gcScheduledSaved_(false),
|
||||
gcPreserveCode_(group, false),
|
||||
keepShapeTables_(group, false),
|
||||
gcPreserveCode_(this, false),
|
||||
keepShapeTables_(this, false),
|
||||
listNext_(NotOnList)
|
||||
{
|
||||
/* Ensure that there are no vtables to mess us up here. */
|
||||
|
@ -77,6 +78,8 @@ JS::Zone::Zone(JSRuntime* rt, ZoneGroup* group)
|
|||
|
||||
Zone::~Zone()
|
||||
{
|
||||
MOZ_ASSERT(helperThreadUse == HelperThreadUse::None);
|
||||
|
||||
JSRuntime* rt = runtimeFromAnyThread();
|
||||
if (this == rt->gc.systemZone)
|
||||
rt->gc.systemZone = nullptr;
|
||||
|
@ -135,7 +138,7 @@ Zone::getOrCreateDebuggers(JSContext* cx)
|
|||
void
|
||||
Zone::sweepBreakpoints(FreeOp* fop)
|
||||
{
|
||||
if (!group() || fop->runtime()->debuggerList().isEmpty())
|
||||
if (fop->runtime()->debuggerList().isEmpty())
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@ -308,7 +311,7 @@ Zone::canCollect()
|
|||
|
||||
// Zones that will be or are currently used by other threads cannot be
|
||||
// collected.
|
||||
return !group()->createdForHelperThread();
|
||||
return !createdForHelperThread();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -399,6 +402,21 @@ Zone::deleteEmptyCompartment(JSCompartment* comp)
|
|||
MOZ_CRASH("Compartment not found");
|
||||
}
|
||||
|
||||
void
|
||||
Zone::setHelperThreadOwnerContext(JSContext* cx)
|
||||
{
|
||||
MOZ_ASSERT_IF(cx, TlsContext.get() == cx);
|
||||
helperThreadOwnerContext_ = cx;
|
||||
}
|
||||
|
||||
bool
|
||||
Zone::ownedByCurrentHelperThread()
|
||||
{
|
||||
MOZ_ASSERT(usedByHelperThread());
|
||||
MOZ_ASSERT(TlsContext.get());
|
||||
return helperThreadOwnerContext_ == TlsContext.get();
|
||||
}
|
||||
|
||||
ZoneList::ZoneList()
|
||||
: head(nullptr), tail(nullptr)
|
||||
{}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче