diff --git a/addon-sdk/moz.build b/addon-sdk/moz.build index ae6f68bc3552..2ae1b36ba71d 100644 --- a/addon-sdk/moz.build +++ b/addon-sdk/moz.build @@ -32,6 +32,7 @@ addons = [ 'e10s-remote', 'e10s-tabs', 'e10s', + 'embedded-webextension', 'l10n-properties', 'l10n', 'layout-change', @@ -183,6 +184,10 @@ EXTRA_JS_MODULES.commonjs += [ 'source/lib/test.js', ] +EXTRA_JS_MODULES.commonjs.sdk += [ + 'source/lib/sdk/webextension.js', +] + EXTRA_JS_MODULES.commonjs.dev += [ 'source/lib/dev/debuggee.js', 'source/lib/dev/frame-script.js', diff --git a/addon-sdk/source/app-extension/bootstrap.js b/addon-sdk/source/app-extension/bootstrap.js index 31fc658add1b..3b1e13fe7865 100644 --- a/addon-sdk/source/app-extension/bootstrap.js +++ b/addon-sdk/source/app-extension/bootstrap.js @@ -257,6 +257,9 @@ function startup(data, reasonCode) { let module = cuddlefish.Module('sdk/loader/cuddlefish', cuddlefishURI); let require = cuddlefish.Require(loader, module); + // Init the 'sdk/webextension' module from the bootstrap addon parameter. + require("sdk/webextension").initFromBootstrapAddonParam(data); + require('sdk/addon/runner').startup(reason, { loader: loader, main: main, diff --git a/addon-sdk/source/lib/sdk/addon/bootstrap.js b/addon-sdk/source/lib/sdk/addon/bootstrap.js index 094f9123c043..e4c94eb299bf 100644 --- a/addon-sdk/source/lib/sdk/addon/bootstrap.js +++ b/addon-sdk/source/lib/sdk/addon/bootstrap.js @@ -123,7 +123,7 @@ Bootstrap.prototype = { manifest: metadata, metadata: metadata, modules: { - "@test/options": {} + "@test/options": {}, }, noQuit: prefs.get(`extensions.${id}.sdk.test.no-quit`, false) }); @@ -134,6 +134,9 @@ Bootstrap.prototype = { const main = command === "test" ? "sdk/test/runner" : null; const prefsURI = `${baseURI}defaults/preferences/prefs.js`; + // Init the 'sdk/webextension' module from the bootstrap addon parameter. + require("sdk/webextension").initFromBootstrapAddonParam(addon); + const { startup } = require("sdk/addon/runner"); startup(reason, {loader, main, prefsURI}); }.bind(this)).catch(error => { diff --git a/addon-sdk/source/lib/sdk/webextension.js b/addon-sdk/source/lib/sdk/webextension.js new file mode 100644 index 000000000000..d1c4385e2bad --- /dev/null +++ b/addon-sdk/source/lib/sdk/webextension.js @@ -0,0 +1,43 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +module.metadata = { + "stability": "experimental" +}; + +let webExtension; +let waitForWebExtensionAPI; + +module.exports = { + initFromBootstrapAddonParam(data) { + if (webExtension) { + throw new Error("'sdk/webextension' module has been already initialized"); + } + + webExtension = data.webExtension; + }, + + startup() { + if (!webExtension) { + return Promise.reject(new Error( + "'sdk/webextension' module is currently disabled. " + + "('hasEmbeddedWebExtension' option is missing or set to false)" + )); + } + + // NOTE: calling `startup` more than once raises an "Embedded Extension already started" + // error, but given that SDK addons are going to have access to the startup method through + // an SDK module that can be required in any part of the addon, it will be nicer if any + // additional startup calls return the startup promise instead of raising an exception, + // so that the SDK addon can access the API object in the other addon modules without the + // need to manually pass this promise around. + if (!waitForWebExtensionAPI) { + waitForWebExtensionAPI = webExtension.startup(); + } + + return waitForWebExtensionAPI; + } +}; diff --git a/addon-sdk/source/python-lib/cuddlefish/rdf.py b/addon-sdk/source/python-lib/cuddlefish/rdf.py index fb9bb76f6d6f..2964897c199e 100644 --- a/addon-sdk/source/python-lib/cuddlefish/rdf.py +++ b/addon-sdk/source/python-lib/cuddlefish/rdf.py @@ -133,6 +133,11 @@ def gen_manifest(template_root_dir, target_cfg, jid, # booleans in the .json file, not strings. manifest.set("em:unpack", "true" if target_cfg.get("unpack") else "false") + if target_cfg.get('hasEmbeddedWebExtension', False): + elem = dom.createElement("em:hasEmbeddedWebExtension"); + elem.appendChild(dom.createTextNode("true")) + dom.documentElement.getElementsByTagName("Description")[0].appendChild(elem) + for translator in target_cfg.get("translators", [ ]): elem = dom.createElement("em:translator"); elem.appendChild(dom.createTextNode(translator)) diff --git a/addon-sdk/source/python-lib/cuddlefish/xpi.py b/addon-sdk/source/python-lib/cuddlefish/xpi.py index fa585e37b6d9..4ac497e89abc 100644 --- a/addon-sdk/source/python-lib/cuddlefish/xpi.py +++ b/addon-sdk/source/python-lib/cuddlefish/xpi.py @@ -48,13 +48,12 @@ def build_xpi(template_root_dir, manifest, xpi_path, if os.path.isfile(os.path.join(pkgdir, 'chrome.manifest')): files_to_copy['chrome.manifest'] = os.path.join(pkgdir, 'chrome.manifest') - # chrome folder (would contain content, skin, and locale folders typically) - folder = 'chrome' - if os.path.exists(os.path.join(pkgdir, folder)): - dirs_to_create.add('chrome') - # cp -r folder - abs_dirname = os.path.join(pkgdir, folder) - for dirpath, dirnames, filenames in os.walk(abs_dirname): + def add_special_dir(folder): + if os.path.exists(os.path.join(pkgdir, folder)): + dirs_to_create.add(folder) + # cp -r folder + abs_dirname = os.path.join(pkgdir, folder) + for dirpath, dirnames, filenames in os.walk(abs_dirname): goodfiles = list(filter_filenames(filenames, IGNORED_FILES)) dirnames[:] = filter_dirnames(dirnames) for dirname in dirnames: @@ -69,6 +68,12 @@ def build_xpi(template_root_dir, manifest, xpi_path, ]) files_to_copy[str(arcpath)] = str(abspath) + + # chrome folder (would contain content, skin, and locale folders typically) + add_special_dir('chrome') + # optionally include a `webextension/` dir from the add-on dir. + add_special_dir('webextension') + for dirpath, dirnames, filenames in os.walk(template_root_dir): if template_root_dir == dirpath: filenames = list(filter_filenames(filenames, IGNORED_TOP_LVL_FILES)) diff --git a/addon-sdk/source/test/addons/embedded-webextension/main.js b/addon-sdk/source/test/addons/embedded-webextension/main.js new file mode 100644 index 000000000000..4e51c2f9bb09 --- /dev/null +++ b/addon-sdk/source/test/addons/embedded-webextension/main.js @@ -0,0 +1,159 @@ +const tabs = require("sdk/tabs"); +const webExtension = require('sdk/webextension'); + +exports.testEmbeddedWebExtensionModuleInitializedException = function (assert) { + let actualErr; + + assert.throws( + () => webExtension.initFromBootstrapAddonParam({webExtension: null}), + /'sdk\/webextension' module has been already initialized/, + "Got the expected exception if the module is initialized twice" + ); +}; + +exports.testEmbeddedWebExtensionBackgroungPage = function* (assert) { + try { + const api = yield webExtension.startup(); + assert.ok(api, `webextension waitForStartup promise successfully resolved`); + + const apiSecondStartup = yield webExtension.startup(); + assert.equal(api, apiSecondStartup, "Got the same API object from the second startup call"); + + const {browser} = api; + + let messageListener; + let waitForBackgroundPageMessage = new Promise((resolve, reject) => { + let numExpectedMessage = 2; + messageListener = (msg, sender, sendReply) => { + numExpectedMessage -= 1; + if (numExpectedMessage == 1) { + assert.equal(msg, "bg->sdk message", + "Got the expected message from the background page"); + sendReply("sdk reply"); + } else if (numExpectedMessage == 0) { + assert.equal(msg, "sdk reply", + "The background page received the expected reply message"); + resolve(); + } else { + console.error("Unexpected message received", {msg,sender, numExpectedMessage}); + assert.ok(false, `unexpected message received`); + reject(); + } + }; + browser.runtime.onMessage.addListener(messageListener); + }); + + let portListener; + let waitForBackgroundPagePort = new Promise((resolve, reject) => { + portListener = (port) => { + let numExpectedMessages = 2; + port.onMessage.addListener((msg) => { + numExpectedMessages -= 1; + + if (numExpectedMessages == 1) { + // Check that the legacy context has been able to receive the first port message + // and reply with a port message to the background page. + assert.equal(msg, "bg->sdk port message", + "Got the expected port message from the background page"); + port.postMessage("sdk->bg port message"); + } else if (numExpectedMessages == 0) { + // Check that the background page has received the above port message. + assert.equal(msg, "bg received sdk->bg port message", + "The background page received the expected port message"); + } + }); + + port.onDisconnect.addListener(() => { + assert.equal(numExpectedMessages, 0, "Got the expected number of port messages"); + resolve(); + }); + }; + browser.runtime.onConnect.addListener(portListener); + }); + + yield Promise.all([ + waitForBackgroundPageMessage, + waitForBackgroundPagePort, + ]).then(() => { + browser.runtime.onMessage.removeListener(messageListener); + browser.runtime.onConnect.removeListener(portListener); + }); + + } catch (err) { + assert.fail(`Unexpected webextension startup exception: ${err} - ${err.stack}`); + } +}; + +exports.testEmbeddedWebExtensionContentScript = function* (assert, done) { + try { + const {browser} = yield webExtension.startup(); + assert.ok(browser, `webextension startup promise resolved successfully to the API object`); + + let messageListener; + let waitForContentScriptMessage = new Promise((resolve, reject) => { + let numExpectedMessage = 2; + messageListener = (msg, sender, sendReply) => { + numExpectedMessage -= 1; + if (numExpectedMessage == 1) { + assert.equal(msg, "content script->sdk message", + "Got the expected message from the content script"); + sendReply("sdk reply"); + } else if (numExpectedMessage == 0) { + assert.equal(msg, "sdk reply", + "The content script received the expected reply message"); + resolve(); + } else { + console.error("Unexpected message received", {msg,sender, numExpectedMessage}); + assert.ok(false, `unexpected message received`); + reject(); + } + }; + browser.runtime.onMessage.addListener(messageListener); + }); + + let portListener; + let waitForContentScriptPort = new Promise((resolve, reject) => { + portListener = (port) => { + let numExpectedMessages = 2; + port.onMessage.addListener((msg) => { + numExpectedMessages -= 1; + + if (numExpectedMessages == 1) { + assert.equal(msg, "content script->sdk port message", + "Got the expected message from the content script port"); + port.postMessage("sdk->content script port message"); + } else if (numExpectedMessages == 0) { + assert.equal(msg, "content script received sdk->content script port message", + "The content script received the expected port message"); + } + }); + port.onDisconnect.addListener(() => { + assert.equal(numExpectedMessages, 0, "Got the epected number of port messages"); + resolve(); + }); + }; + browser.runtime.onConnect.addListener(portListener); + }); + + let url = "data:text/html;charset=utf-8,

Test Page

"; + + var openedTab; + tabs.once('open', function onOpen(tab) { + openedTab = tab; + }); + tabs.open(url); + + yield Promise.all([ + waitForContentScriptMessage, + waitForContentScriptPort, + ]).then(() => { + browser.runtime.onMessage.removeListener(messageListener); + browser.runtime.onConnect.removeListener(portListener); + openedTab.close(); + }); + } catch (err) { + assert.fail(`Unexpected webextension startup exception: ${err} - ${err.stack}`); + } +}; + +require("sdk/test/runner").runTestsFromModule(module); diff --git a/addon-sdk/source/test/addons/embedded-webextension/package.json b/addon-sdk/source/test/addons/embedded-webextension/package.json new file mode 100644 index 000000000000..25dec41c3948 --- /dev/null +++ b/addon-sdk/source/test/addons/embedded-webextension/package.json @@ -0,0 +1,6 @@ +{ + "id": "embedded-webextension@jetpack", + "version": "0.1.0", + "main": "./main.js", + "hasEmbeddedWebExtension": true +} diff --git a/addon-sdk/source/test/addons/embedded-webextension/webextension/background-page.js b/addon-sdk/source/test/addons/embedded-webextension/webextension/background-page.js new file mode 100644 index 000000000000..05e7a613b57e --- /dev/null +++ b/addon-sdk/source/test/addons/embedded-webextension/webextension/background-page.js @@ -0,0 +1,10 @@ +browser.runtime.sendMessage("bg->sdk message", (reply) => { + browser.runtime.sendMessage(reply); +}); + +let port = browser.runtime.connect(); +port.onMessage.addListener((msg) => { + port.postMessage(`bg received ${msg}`); + port.disconnect(); +}); +port.postMessage("bg->sdk port message"); diff --git a/addon-sdk/source/test/addons/embedded-webextension/webextension/content-script.js b/addon-sdk/source/test/addons/embedded-webextension/webextension/content-script.js new file mode 100644 index 000000000000..a8770e623bc7 --- /dev/null +++ b/addon-sdk/source/test/addons/embedded-webextension/webextension/content-script.js @@ -0,0 +1,10 @@ +browser.runtime.sendMessage("content script->sdk message", (reply) => { + browser.runtime.sendMessage(reply); +}); + +let port = browser.runtime.connect(); +port.onMessage.addListener((msg) => { + port.postMessage(`content script received ${msg}`); + port.disconnect(); +}); +port.postMessage("content script->sdk port message"); diff --git a/addon-sdk/source/test/addons/embedded-webextension/webextension/manifest.json b/addon-sdk/source/test/addons/embedded-webextension/webextension/manifest.json new file mode 100644 index 000000000000..d2188e7ba228 --- /dev/null +++ b/addon-sdk/source/test/addons/embedded-webextension/webextension/manifest.json @@ -0,0 +1,18 @@ +{ + "name": "Test SDK Embedded WebExtension", + "description": "", + "version": "0.1.0", + "applications": { + "gecko": { + "id": "embedded-webextension@jetpack" + } + }, + "manifest_version": 2, + "permissions": ["tabs"], + "background": { + "scripts": ["background-page.js"] + }, + "content_scripts": [ + {"matches": [""], "js": ["content-script.js"]} + ] +} diff --git a/addon-sdk/source/test/addons/jetpack-addon.ini b/addon-sdk/source/test/addons/jetpack-addon.ini index 8112761ea611..64648607a707 100644 --- a/addon-sdk/source/test/addons/jetpack-addon.ini +++ b/addon-sdk/source/test/addons/jetpack-addon.ini @@ -17,6 +17,7 @@ skip-if = true skip-if = true [e10s-tabs.xpi] skip-if = true +[embedded-webextension.xpi] [l10n.xpi] [l10n-properties.xpi] [layout-change.xpi] diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index eebbef271ea0..20706fdd08a5 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -931,7 +931,9 @@ BrowserGlue.prototype = { } if (SCALING_PROBE_NAME) { let scaling = aWindow.devicePixelRatio * 100; - Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling); + try { + Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling); + } catch (ex) {} } }, diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index 433017ad06c4..1b47ac9b20b4 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -1290,8 +1290,8 @@ case "popuphidden": Services.tm.mainThread.dispatch(() => { this.selectedButton = null; + this._contextEngine = null; }, Ci.nsIThread.DISPATCH_NORMAL); - this._contextEngine = null; break; } ]]> diff --git a/browser/components/search/test/browser.ini b/browser/components/search/test/browser.ini index 4255c19c9006..9f76d90557fb 100644 --- a/browser/components/search/test/browser.ini +++ b/browser/components/search/test/browser.ini @@ -29,6 +29,7 @@ skip-if = os == "mac" # bug 967013 [browser_healthreport.js] [browser_hiddenOneOffs_cleanup.js] [browser_hiddenOneOffs_diacritics.js] +[browser_oneOffContextMenu.js] [browser_oneOffHeader.js] [browser_private_search_perwindowpb.js] [browser_yahoo.js] diff --git a/browser/components/search/test/browser_oneOffContextMenu.js b/browser/components/search/test/browser_oneOffContextMenu.js new file mode 100644 index 000000000000..eacab116cfc1 --- /dev/null +++ b/browser/components/search/test/browser_oneOffContextMenu.js @@ -0,0 +1,99 @@ +"use strict"; + +const TEST_ENGINE_NAME = "Foo"; +const TEST_ENGINE_BASENAME = "testEngine.xml"; + +const searchbar = document.getElementById("searchbar"); +const searchPopup = document.getElementById("PopupSearchAutoComplete"); +const searchIcon = document.getAnonymousElementByAttribute( + searchbar, "anonid", "searchbar-search-button" +); +const oneOffBinding = document.getAnonymousElementByAttribute( + searchPopup, "anonid", "search-one-off-buttons" +); +const contextMenu = document.getAnonymousElementByAttribute( + oneOffBinding, "anonid", "search-one-offs-context-menu" +); +const oneOffButtons = document.getAnonymousElementByAttribute( + oneOffBinding, "anonid", "search-panel-one-offs" +); +const searchInNewTabMenuItem = document.getAnonymousElementByAttribute( + oneOffBinding, "anonid", "search-one-offs-context-open-in-new-tab" +); + +add_task(function* init() { + yield promiseNewEngine(TEST_ENGINE_BASENAME, { + setAsCurrent: false, + }); +}); + +add_task(function* extendedTelemetryDisabled() { + yield SpecialPowers.pushPrefEnv({set: [["toolkit.telemetry.enabled", false]]}); + yield doTest(); + checkTelemetry("other"); +}); + +add_task(function* extendedTelemetryEnabled() { + yield SpecialPowers.pushPrefEnv({set: [["toolkit.telemetry.enabled", true]]}); + yield doTest(); + checkTelemetry("other-" + TEST_ENGINE_NAME); +}); + +function* doTest() { + // Open the popup. + let promise = promiseEvent(searchPopup, "popupshown"); + info("Opening search panel"); + EventUtils.synthesizeMouseAtCenter(searchIcon, {}); + yield promise; + + // Get the one-off button for the test engine. + let oneOffButton; + for (let node of oneOffButtons.childNodes) { + if (node.engine && node.engine.name == TEST_ENGINE_NAME) { + oneOffButton = node; + break; + } + } + Assert.notEqual(oneOffButton, undefined, + "One-off for test engine should exist"); + + // Open the context menu on the one-off. + promise = BrowserTestUtils.waitForEvent(contextMenu, "popupshown"); + EventUtils.synthesizeMouseAtCenter(oneOffButton, { + type: "contextmenu", + button: 2, + }); + yield promise; + + // Click the Search in New Tab menu item. + promise = BrowserTestUtils.waitForNewTab(gBrowser); + EventUtils.synthesizeMouseAtCenter(searchInNewTabMenuItem, {}); + let tab = yield promise; + + // Check the loaded tab. + Assert.equal(tab.linkedBrowser.currentURI.spec, + "http://mochi.test:8888/browser/browser/components/search/test/", + "Expected search tab should have loaded"); + + yield BrowserTestUtils.removeTab(tab); + + // Move the cursor out of the panel area to avoid messing with other tests. + yield EventUtils.synthesizeNativeMouseMove(searchbar); +} + +function checkTelemetry(expectedEngineName) { + let propertyPath = [ + "countableEvents", + "__DEFAULT__", + "search-oneoff", + expectedEngineName + ".oneoff-context-searchbar", + "unknown", + "tab-background", + ]; + let telem = BrowserUITelemetry.getToolbarMeasures(); + for (let prop of propertyPath) { + Assert.ok(prop in telem, "Property " + prop + " should be in the telemetry"); + telem = telem[prop]; + } + Assert.equal(telem, 1, "Click count"); +} diff --git a/devtools/client/debugger/new/bundle.js b/devtools/client/debugger/new/bundle.js index 4f99c0ff0b08..aa6049aa08f7 100644 --- a/devtools/client/debugger/new/bundle.js +++ b/devtools/client/debugger/new/bundle.js @@ -1,4 +1,4 @@ -// Generated from: 30002d3cfc4341840af847af9eb2c31cab18abb5 Move some of editor-select.js test into editor-highlight.js to make tests more focused (and avoid timeouts on linux debug) (#746) +// Generated from: 7c393c99dd82e9b181dab64ff474ee6ca9dc1c3f Revert "Add search input" var Debugger = /******/ (function(modules) { // webpackBootstrap @@ -98,12 +98,12 @@ var Debugger = var startDebugging = _require5.startDebugging; var firefox = __webpack_require__(98); - var configureStore = __webpack_require__(179); - var reducers = __webpack_require__(187); - var selectors = __webpack_require__(198); + var configureStore = __webpack_require__(180); + var reducers = __webpack_require__(188); + var selectors = __webpack_require__(199); - var Tabs = __webpack_require__(205); - var App = __webpack_require__(211); + var Tabs = __webpack_require__(206); + var App = __webpack_require__(212); var createStore = configureStore({ log: getValue("logging.actions"), @@ -113,7 +113,7 @@ var Debugger = }); var store = createStore(combineReducers(reducers)); - var actions = bindActionCreators(__webpack_require__(213), store.dispatch); + var actions = bindActionCreators(__webpack_require__(214), store.dispatch); if (isDevelopment()) { AppConstants.DEBUG_JS_MODULES = true; @@ -169,7 +169,7 @@ var Debugger = }); } else if (isFirefoxPanel()) { (function () { - var sourceMap = __webpack_require__(215); + var sourceMap = __webpack_require__(216); module.exports = { bootstrap: _ref => { @@ -178,8 +178,8 @@ var Debugger = firefox.setThreadClient(threadClient); firefox.setTabTarget(tabTarget); - firefox.initPage(actions); renderRoot(App); + return firefox.initPage(actions); }, destroy: () => { unmountRoot(); @@ -10174,7 +10174,7 @@ var Debugger = var Task = _require.Task; var firefox = __webpack_require__(98); - var chrome = __webpack_require__(172); + var chrome = __webpack_require__(173); var _require2 = __webpack_require__(45); @@ -10326,6 +10326,10 @@ var Debugger = var setupEvents = _require7.setupEvents; var clientEvents = _require7.clientEvents; + var _require8 = __webpack_require__(172); + + var createSource = _require8.createSource; + var debuggerClient = null; var threadClient = null; @@ -10418,16 +10422,24 @@ var Debugger = threadClient.addListener(eventName, clientEvents[eventName]); }); - threadClient.reconfigure({ - "useSourceMaps": false, - "autoBlackBox": false - }); + // In Firefox, we need to initially request all of the sources. This + // usually fires off individual `newSource` notifications as the + // debugger finds them, but there may be existing sources already in + // the debugger (if it's paused already, or if loading the page from + // bfcache) so explicity fire `newSource` events for all returned + // sources. + return threadClient.getSources().then(_ref => { + var sources = _ref.sources; - // In Firefox, we need to initially request all of the sources which - // makes the server iterate over them and fire individual - // `newSource` notifications. We don't need to do anything with the - // response since `newSource` notifications are fired. - threadClient.getSources(); + actions.newSources(sources.map(createSource)); + + // If the threadClient is already paused, make sure to show a + // paused state. + var pausedPacket = threadClient.getLastPausePacket(); + if (pausedPacket) { + clientEvents.paused(null, pausedPacket); + } + }); } module.exports = { @@ -19873,6 +19885,47 @@ var Debugger = function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step("next", value); }, function (err) { return step("throw", err); }); } } return step("next"); }); }; } + var _require = __webpack_require__(172); + + var createFrame = _require.createFrame; + var createSource = _require.createSource; + + + var CALL_STACK_PAGE_SIZE = 1000; + + var threadClient = void 0; + var actions = void 0; + + function setupEvents(dependencies) { + threadClient = dependencies.threadClient; + actions = dependencies.actions; + } + + function resumed(_, packet) { + actions.resumed(packet); + } + + function newSource(_, _ref2) { + var source = _ref2.source; + + actions.newSource(createSource(source)); + } + + var clientEvents = { + paused, + resumed, + newSource + }; + + module.exports = { + setupEvents, + clientEvents + }; + +/***/ }, +/* 172 */ +/***/ function(module, exports, __webpack_require__) { + var _require = __webpack_require__(114); var Source = _require.Source; @@ -19880,16 +19933,6 @@ var Debugger = var Location = _require.Location; - var CALL_STACK_PAGE_SIZE = 1000; - var threadClient = void 0; - var actions = void 0; - var evalIndex = 1; - - function setupEvents(dependencies) { - threadClient = dependencies.threadClient; - actions = dependencies.actions; - } - function createFrame(frame) { var title = void 0; if (frame.type == "call") { @@ -19912,43 +19955,29 @@ var Debugger = }); } - function resumed(_, packet) { - actions.resumed(packet); - } - - function newSource(_, packet) { - var source = packet.source; - + var evalIndex = 1; + function createSource(source) { if (!source.url) { source.url = `SOURCE${ evalIndex++ }`; } - actions.newSource(Source({ + return Source({ id: source.actor, url: source.url, isPrettyPrinted: false, sourceMapURL: source.sourceMapURL - })); + }); } - var clientEvents = { - paused, - resumed, - newSource - }; - - module.exports = { - setupEvents, - clientEvents - }; + module.exports = { createFrame, createSource }; /***/ }, -/* 172 */ +/* 173 */ /***/ function(module, exports, __webpack_require__) { /* eslint-disable */ - var _require = __webpack_require__(173); + var _require = __webpack_require__(174); var connect = _require.connect; @@ -19963,16 +19992,16 @@ var Debugger = var isEnabled = _require3.isEnabled; var getValue = _require3.getValue; - var _require4 = __webpack_require__(174); + var _require4 = __webpack_require__(175); var networkRequest = _require4.networkRequest; - var _require5 = __webpack_require__(177); + var _require5 = __webpack_require__(178); var setupCommands = _require5.setupCommands; var clientCommands = _require5.clientCommands; - var _require6 = __webpack_require__(178); + var _require6 = __webpack_require__(179); var setupEvents = _require6.setupEvents; var clientEvents = _require6.clientEvents; @@ -20062,16 +20091,16 @@ var Debugger = }; /***/ }, -/* 173 */ +/* 174 */ /***/ function(module, exports) { module.exports = {}; /***/ }, -/* 174 */ +/* 175 */ /***/ function(module, exports, __webpack_require__) { - var _require = __webpack_require__(175); + var _require = __webpack_require__(176); var log = _require.log; @@ -20093,7 +20122,7 @@ var Debugger = }; /***/ }, -/* 175 */ +/* 176 */ /***/ function(module, exports, __webpack_require__) { var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); @@ -20136,7 +20165,7 @@ var Debugger = * 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 co = __webpack_require__(176); + var co = __webpack_require__(177); var _require = __webpack_require__(46); @@ -20338,7 +20367,7 @@ var Debugger = }; /***/ }, -/* 176 */ +/* 177 */ /***/ function(module, exports) { @@ -20581,7 +20610,7 @@ var Debugger = /***/ }, -/* 177 */ +/* 178 */ /***/ function(module, exports, __webpack_require__) { var _require = __webpack_require__(114); @@ -20705,7 +20734,7 @@ var Debugger = }; /***/ }, -/* 178 */ +/* 179 */ /***/ function(module, exports, __webpack_require__) { var paused = (() => { @@ -20815,7 +20844,7 @@ var Debugger = }; /***/ }, -/* 179 */ +/* 180 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -20828,23 +20857,23 @@ var Debugger = var createStore = _require.createStore; var applyMiddleware = _require.applyMiddleware; - var _require2 = __webpack_require__(180); + var _require2 = __webpack_require__(181); var waitUntilService = _require2.waitUntilService; - var _require3 = __webpack_require__(181); + var _require3 = __webpack_require__(182); var log = _require3.log; - var _require4 = __webpack_require__(182); + var _require4 = __webpack_require__(183); var history = _require4.history; - var _require5 = __webpack_require__(183); + var _require5 = __webpack_require__(184); var promise = _require5.promise; - var _require6 = __webpack_require__(186); + var _require6 = __webpack_require__(187); var thunk = _require6.thunk; @@ -20892,7 +20921,7 @@ var Debugger = module.exports = configureStore; /***/ }, -/* 180 */ +/* 181 */ /***/ function(module, exports) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -20962,7 +20991,7 @@ var Debugger = /***/ }, -/* 181 */ +/* 182 */ /***/ function(module, exports) { /** @@ -20984,7 +21013,7 @@ var Debugger = exports.log = log; /***/ }, -/* 182 */ +/* 183 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -21018,22 +21047,22 @@ var Debugger = }; /***/ }, -/* 183 */ +/* 184 */ /***/ function(module, exports, __webpack_require__) { /* 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 uuidgen = __webpack_require__(184).uuid; + var uuidgen = __webpack_require__(185).uuid; var defer = __webpack_require__(112); - var _require = __webpack_require__(175); + var _require = __webpack_require__(176); var entries = _require.entries; var toObject = _require.toObject; - var _require2 = __webpack_require__(185); + var _require2 = __webpack_require__(186); var executeSoon = _require2.executeSoon; @@ -21085,7 +21114,7 @@ var Debugger = exports.promise = promiseMiddleware; /***/ }, -/* 184 */ +/* 185 */ /***/ function(module, exports) { @@ -21098,7 +21127,7 @@ var Debugger = /***/ }, -/* 185 */ +/* 186 */ /***/ function(module, exports) { function reportException(who, exception) { @@ -21125,7 +21154,7 @@ var Debugger = }; /***/ }, -/* 186 */ +/* 187 */ /***/ function(module, exports) { @@ -21151,19 +21180,19 @@ var Debugger = exports.thunk = thunk; /***/ }, -/* 187 */ +/* 188 */ /***/ function(module, exports, __webpack_require__) { /* 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 eventListeners = __webpack_require__(188); - var sources = __webpack_require__(190); - var breakpoints = __webpack_require__(194); - var asyncRequests = __webpack_require__(195); - var tabs = __webpack_require__(196); - var pause = __webpack_require__(197); + var eventListeners = __webpack_require__(189); + var sources = __webpack_require__(191); + var breakpoints = __webpack_require__(195); + var asyncRequests = __webpack_require__(196); + var tabs = __webpack_require__(197); + var pause = __webpack_require__(198); module.exports = { eventListeners, @@ -21175,14 +21204,14 @@ var Debugger = }; /***/ }, -/* 188 */ +/* 189 */ /***/ function(module, exports, __webpack_require__) { /* 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 constants = __webpack_require__(189); + var constants = __webpack_require__(190); var initialState = { activeEventNames: [], @@ -21219,7 +21248,7 @@ var Debugger = module.exports = update; /***/ }, -/* 189 */ +/* 190 */ /***/ function(module, exports) { /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -21267,7 +21296,7 @@ var Debugger = exports.DELETE_EXPRESSION = "DELETE_EXPRESSION"; /***/ }, -/* 190 */ +/* 191 */ /***/ function(module, exports, __webpack_require__) { function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -21276,9 +21305,9 @@ var Debugger = * 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 fromJS = __webpack_require__(191); - var I = __webpack_require__(192); - var makeRecord = __webpack_require__(193); + var fromJS = __webpack_require__(192); + var I = __webpack_require__(193); + var makeRecord = __webpack_require__(194); var State = makeRecord({ sources: I.Map(), @@ -21300,11 +21329,6 @@ var Debugger = return state.mergeIn(["sources", action.source.id], _source); } - case "ADD_SOURCES": - return state.mergeIn(["sources"], I.Map(action.sources.map(source => { - return [source.id, fromJS(source)]; - }))); - case "LOAD_SOURCE_MAP": if (action.status == "done") { return state.mergeIn(["sourceMaps", action.source.id], action.value.sourceMap); @@ -21528,12 +21552,12 @@ var Debugger = }; /***/ }, -/* 191 */ +/* 192 */ /***/ function(module, exports, __webpack_require__) { - var Immutable = __webpack_require__(192); + var Immutable = __webpack_require__(193); // When our app state is fully types, we should be able to get rid of // this function. This is only temporarily necessary to support @@ -21572,7 +21596,7 @@ var Debugger = module.exports = fromJS; /***/ }, -/* 192 */ +/* 193 */ /***/ function(module, exports, __webpack_require__) { /** @@ -26558,7 +26582,7 @@ var Debugger = /***/ }, -/* 193 */ +/* 194 */ /***/ function(module, exports, __webpack_require__) { @@ -26568,7 +26592,7 @@ var Debugger = // because all the fields are actually typed, unlike the builtin one. // This depends on a performance fix that will go out in 0.29 though; - var I = __webpack_require__(192); + var I = __webpack_require__(193); /** * Make an immutable record type @@ -26583,7 +26607,7 @@ var Debugger = module.exports = makeRecord; /***/ }, -/* 194 */ +/* 195 */ /***/ function(module, exports, __webpack_require__) { @@ -26591,14 +26615,14 @@ var Debugger = * 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 fromJS = __webpack_require__(191); + var fromJS = __webpack_require__(192); - var _require = __webpack_require__(175); + var _require = __webpack_require__(176); var updateObj = _require.updateObj; - var I = __webpack_require__(192); - var makeRecord = __webpack_require__(193); + var I = __webpack_require__(193); + var makeRecord = __webpack_require__(194); var State = makeRecord({ breakpoints: I.Map(), @@ -26772,7 +26796,7 @@ var Debugger = }; /***/ }, -/* 195 */ +/* 196 */ /***/ function(module, exports, __webpack_require__) { function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -26781,7 +26805,7 @@ var Debugger = * 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 constants = __webpack_require__(189); + var constants = __webpack_require__(190); var initialState = []; function update() { @@ -26809,16 +26833,16 @@ var Debugger = module.exports = update; /***/ }, -/* 196 */ +/* 197 */ /***/ function(module, exports, __webpack_require__) { /* 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 constants = __webpack_require__(189); - var Immutable = __webpack_require__(192); - var fromJS = __webpack_require__(191); + var constants = __webpack_require__(190); + var Immutable = __webpack_require__(193); + var fromJS = __webpack_require__(192); var initialState = fromJS({ tabs: {}, @@ -26864,15 +26888,15 @@ var Debugger = module.exports = update; /***/ }, -/* 197 */ +/* 198 */ /***/ function(module, exports, __webpack_require__) { /* 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 constants = __webpack_require__(189); - var fromJS = __webpack_require__(191); + var constants = __webpack_require__(190); + var fromJS = __webpack_require__(192); var initialState = fromJS({ pause: null, @@ -27030,16 +27054,16 @@ var Debugger = }; /***/ }, -/* 198 */ +/* 199 */ /***/ function(module, exports, __webpack_require__) { - var URL = __webpack_require__(199); - var path = __webpack_require__(204); - var sources = __webpack_require__(190); - var pause = __webpack_require__(197); - var breakpoints = __webpack_require__(194); + var URL = __webpack_require__(200); + var path = __webpack_require__(205); + var sources = __webpack_require__(191); + var pause = __webpack_require__(198); + var breakpoints = __webpack_require__(195); function getTabs(state) { return state.tabs.get("tabs"); @@ -27104,7 +27128,7 @@ var Debugger = }; /***/ }, -/* 199 */ +/* 200 */ /***/ function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -27128,7 +27152,7 @@ var Debugger = // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - var punycode = __webpack_require__(200); + var punycode = __webpack_require__(201); exports.parse = urlParse; exports.resolve = urlResolve; @@ -27200,7 +27224,7 @@ var Debugger = 'gopher:': true, 'file:': true }, - querystring = __webpack_require__(201); + querystring = __webpack_require__(202); function urlParse(url, parseQueryString, slashesDenoteHost) { if (url && isObject(url) && url instanceof Url) return url; @@ -27817,7 +27841,7 @@ var Debugger = /***/ }, -/* 200 */ +/* 201 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/punycode v1.3.2 by @mathias */ @@ -28352,17 +28376,17 @@ var Debugger = /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(101)(module), (function() { return this; }()))) /***/ }, -/* 201 */ +/* 202 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - exports.decode = exports.parse = __webpack_require__(202); - exports.encode = exports.stringify = __webpack_require__(203); + exports.decode = exports.parse = __webpack_require__(203); + exports.encode = exports.stringify = __webpack_require__(204); /***/ }, -/* 202 */ +/* 203 */ /***/ function(module, exports) { // Copyright Joyent, Inc. and other Node contributors. @@ -28448,7 +28472,7 @@ var Debugger = /***/ }, -/* 203 */ +/* 204 */ /***/ function(module, exports) { // Copyright Joyent, Inc. and other Node contributors. @@ -28518,7 +28542,7 @@ var Debugger = /***/ }, -/* 204 */ +/* 205 */ /***/ function(module, exports) { function basename(path) { @@ -28543,7 +28567,7 @@ var Debugger = }; /***/ }, -/* 205 */ +/* 206 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -28552,14 +28576,14 @@ var Debugger = var connect = _require.connect; - var classnames = __webpack_require__(206); + var classnames = __webpack_require__(207); - var _require2 = __webpack_require__(198); + var _require2 = __webpack_require__(199); var getTabs = _require2.getTabs; - __webpack_require__(207); + __webpack_require__(208); var dom = React.DOM; var githubUrl = "https://github.com/devtools-html/debugger.html/blob/master"; @@ -28597,7 +28621,7 @@ var Debugger = module.exports = connect(state => ({ tabs: getTabs(state) }))(Tabs); /***/ }, -/* 206 */ +/* 207 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -28651,16 +28675,16 @@ var Debugger = /***/ }, -/* 207 */ +/* 208 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 208 */, /* 209 */, /* 210 */, -/* 211 */ +/* 211 */, +/* 212 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -28676,19 +28700,19 @@ var Debugger = var bindActionCreators = _require2.bindActionCreators; - var _require3 = __webpack_require__(212); + var _require3 = __webpack_require__(213); var Services = _require3.Services; - var classnames = __webpack_require__(206); - var actions = __webpack_require__(213); + var classnames = __webpack_require__(207); + var actions = __webpack_require__(214); var _require4 = __webpack_require__(46); var isFirefoxPanel = _require4.isFirefoxPanel; - __webpack_require__(224); + __webpack_require__(225); // Using this static variable allows webpack to know at compile-time // to avoid this require and not include it at all in the output. @@ -28696,29 +28720,29 @@ var Debugger = require("../lib/themes/light-theme.css"); } - var Sources = createFactory(__webpack_require__(226)); - var Editor = createFactory(__webpack_require__(261)); - var SplitBox = createFactory(__webpack_require__(266)); - var RightSidebar = createFactory(__webpack_require__(270)); - var SourceTabs = createFactory(__webpack_require__(347)); - var SourceFooter = createFactory(__webpack_require__(352)); - var Svg = __webpack_require__(234); - var Autocomplete = createFactory(__webpack_require__(355)); + var Sources = createFactory(__webpack_require__(227)); + var Editor = createFactory(__webpack_require__(262)); + var SplitBox = createFactory(__webpack_require__(267)); + var RightSidebar = createFactory(__webpack_require__(271)); + var SourceTabs = createFactory(__webpack_require__(348)); + var SourceFooter = createFactory(__webpack_require__(353)); + var Svg = __webpack_require__(235); + var Autocomplete = createFactory(__webpack_require__(356)); - var _require5 = __webpack_require__(198); + var _require5 = __webpack_require__(199); var getSources = _require5.getSources; var getSelectedSource = _require5.getSelectedSource; - var _require6 = __webpack_require__(175); + var _require6 = __webpack_require__(176); var endTruncateStr = _require6.endTruncateStr; - var _require7 = __webpack_require__(364); + var _require7 = __webpack_require__(365); var KeyShortcuts = _require7.KeyShortcuts; - var _require8 = __webpack_require__(229); + var _require8 = __webpack_require__(230); var isHiddenSource = _require8.isHiddenSource; var getURL = _require8.getURL; @@ -28820,7 +28844,7 @@ var Debugger = selectedSource: getSelectedSource(state) }), dispatch => bindActionCreators(actions, dispatch))(App); /***/ }, -/* 212 */ +/* 213 */ /***/ function(module, exports) { /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -29435,22 +29459,22 @@ var Debugger = /***/ }, -/* 213 */ +/* 214 */ /***/ function(module, exports, __webpack_require__) { - var breakpoints = __webpack_require__(214); - var eventListeners = __webpack_require__(217); - var sources = __webpack_require__(218); - var tabs = __webpack_require__(221); - var pause = __webpack_require__(222); - var navigation = __webpack_require__(223); + var breakpoints = __webpack_require__(215); + var eventListeners = __webpack_require__(218); + var sources = __webpack_require__(219); + var tabs = __webpack_require__(222); + var pause = __webpack_require__(223); + var navigation = __webpack_require__(224); module.exports = Object.assign(navigation, breakpoints, eventListeners, sources, tabs, pause); /***/ }, -/* 214 */ +/* 215 */ /***/ function(module, exports, __webpack_require__) { var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); @@ -29466,18 +29490,18 @@ var Debugger = * @module actions/breakpoints */ - var constants = __webpack_require__(189); + var constants = __webpack_require__(190); - var _require = __webpack_require__(183); + var _require = __webpack_require__(184); var PROMISE = _require.PROMISE; - var _require2 = __webpack_require__(198); + var _require2 = __webpack_require__(199); var getBreakpoint = _require2.getBreakpoint; var getBreakpoints = _require2.getBreakpoints; - var _require3 = __webpack_require__(215); + var _require3 = __webpack_require__(216); var getOriginalLocation = _require3.getOriginalLocation; var getGeneratedLocation = _require3.getGeneratedLocation; @@ -29697,7 +29721,7 @@ var Debugger = }; /***/ }, -/* 215 */ +/* 216 */ /***/ function(module, exports, __webpack_require__) { var getOriginalSources = (() => { @@ -29795,16 +29819,16 @@ var Debugger = function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step("next", value); }, function (err) { return step("throw", err); }); } } return step("next"); }); }; } - var _require = __webpack_require__(175); + var _require = __webpack_require__(176); var workerTask = _require.workerTask; - var _require2 = __webpack_require__(216); + var _require2 = __webpack_require__(217); var makeOriginalSource = _require2.makeOriginalSource; var getGeneratedSourceId = _require2.getGeneratedSourceId; - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getSource = _require3.getSource; var getSourceByURL = _require3.getSourceByURL; @@ -29899,7 +29923,7 @@ var Debugger = }; /***/ }, -/* 216 */ +/* 217 */ /***/ function(module, exports) { @@ -29928,7 +29952,7 @@ var Debugger = }; /***/ }, -/* 217 */ +/* 218 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -29942,13 +29966,13 @@ var Debugger = * @module actions/event-listeners */ - var constants = __webpack_require__(189); + var constants = __webpack_require__(190); - var _require = __webpack_require__(175); + var _require = __webpack_require__(176); var asPaused = _require.asPaused; - var _require2 = __webpack_require__(185); + var _require2 = __webpack_require__(186); var reportException = _require2.reportException; @@ -30072,7 +30096,7 @@ var Debugger = module.exports = { updateEventBreakpoints, fetchEventListeners }; /***/ }, -/* 218 */ +/* 219 */ /***/ function(module, exports, __webpack_require__) { var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); @@ -30128,7 +30152,7 @@ var Debugger = var defer = __webpack_require__(112); - var _require = __webpack_require__(183); + var _require = __webpack_require__(184); var PROMISE = _require.PROMISE; @@ -30136,31 +30160,31 @@ var Debugger = var Task = _require2.Task; - var _require3 = __webpack_require__(219); + var _require3 = __webpack_require__(220); var isJavaScript = _require3.isJavaScript; - var _require4 = __webpack_require__(174); + var _require4 = __webpack_require__(175); var networkRequest = _require4.networkRequest; - var _require5 = __webpack_require__(175); + var _require5 = __webpack_require__(176); var workerTask = _require5.workerTask; - var _require6 = __webpack_require__(220); + var _require6 = __webpack_require__(221); var updateFrameLocations = _require6.updateFrameLocations; - var constants = __webpack_require__(189); + var constants = __webpack_require__(190); var invariant = __webpack_require__(24); var _require7 = __webpack_require__(46); var isEnabled = _require7.isEnabled; - var _require8 = __webpack_require__(215); + var _require8 = __webpack_require__(216); var createOriginalSources = _require8.createOriginalSources; var getOriginalSourceTexts = _require8.getOriginalSourceTexts; @@ -30168,7 +30192,7 @@ var Debugger = var makeOriginalSource = _require8.makeOriginalSource; var getGeneratedSource = _require8.getGeneratedSource; - var _require9 = __webpack_require__(198); + var _require9 = __webpack_require__(199); var getSource = _require9.getSource; var getSourceByURL = _require9.getSourceByURL; @@ -30183,13 +30207,6 @@ var Debugger = return isEnabled("sourceMaps") && generatedSource.sourceMapURL; } - function _addSource(source) { - return { - type: constants.ADD_SOURCE, - source - }; - } - function newSource(source) { return _ref4 => { var dispatch = _ref4.dispatch; @@ -30199,7 +30216,10 @@ var Debugger = dispatch(loadSourceMap(source)); } - dispatch(_addSource(source)); + dispatch({ + type: constants.ADD_SOURCE, + source + }); // If a request has been made to show this source, go ahead and // select it. @@ -30210,14 +30230,23 @@ var Debugger = }; } + function newSources(sources) { + return _ref5 => { + var dispatch = _ref5.dispatch; + var getState = _ref5.getState; + + sources.filter(source => !getSource(getState(), source.id)).forEach(source => dispatch(newSource(source))); + }; + } + /** * @memberof actions/sources * @static */ function loadSourceMap(generatedSource) { - return _ref5 => { - var dispatch = _ref5.dispatch; - var getState = _ref5.getState; + return _ref6 => { + var dispatch = _ref6.dispatch; + var getState = _ref6.getState; var sourceMap = getSourceMap(getState(), generatedSource.id); if (sourceMap) { @@ -30255,9 +30284,9 @@ var Debugger = function selectSourceURL(url) { var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - return _ref7 => { - var dispatch = _ref7.dispatch; - var getState = _ref7.getState; + return _ref8 => { + var dispatch = _ref8.dispatch; + var getState = _ref8.getState; var source = getSourceByURL(getState(), url); if (source) { @@ -30280,10 +30309,10 @@ var Debugger = function selectSource(id) { var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - return _ref8 => { - var dispatch = _ref8.dispatch; - var getState = _ref8.getState; - var client = _ref8.client; + return _ref9 => { + var dispatch = _ref9.dispatch; + var getState = _ref9.getState; + var client = _ref9.client; if (!client) { // No connection, do nothing. This happens when the debugger is @@ -30330,9 +30359,9 @@ var Debugger = * [aSource, error]. */ function blackbox(source, shouldBlackBox) { - return _ref9 => { - var dispatch = _ref9.dispatch; - var client = _ref9.client; + return _ref10 => { + var dispatch = _ref10.dispatch; + var client = _ref10.client; dispatch({ type: constants.BLACKBOX, @@ -30360,10 +30389,10 @@ var Debugger = * [aSource, error]. */ function togglePrettyPrint(id) { - return _ref10 => { - var dispatch = _ref10.dispatch; - var getState = _ref10.getState; - var client = _ref10.client; + return _ref11 => { + var dispatch = _ref11.dispatch; + var getState = _ref11.getState; + var client = _ref11.client; var source = getSource(getState(), id).toJS(); var sourceText = getSourceText(getState(), id).toJS(); @@ -30378,7 +30407,10 @@ var Debugger = var url = source.url + ":formatted"; var originalSource = makeOriginalSource({ url, source }); - dispatch(_addSource(originalSource)); + dispatch({ + type: constants.ADD_SOURCE, + source: originalSource + }); return dispatch({ type: constants.TOGGLE_PRETTY_PRINT, @@ -30412,10 +30444,10 @@ var Debugger = * @static */ function loadSourceText(source) { - return _ref12 => { - var dispatch = _ref12.dispatch; - var getState = _ref12.getState; - var client = _ref12.client; + return _ref13 => { + var dispatch = _ref13.dispatch; + var getState = _ref13.getState; + var client = _ref13.client; // Fetch the source text only once. var textInfo = getSourceText(getState(), source.id); @@ -30472,9 +30504,9 @@ var Debugger = * A promise that is resolved after source texts have been fetched. */ function getTextForSources(actors) { - return _ref14 => { - var dispatch = _ref14.dispatch; - var getState = _ref14.getState; + return _ref15 => { + var dispatch = _ref15.dispatch; + var getState = _ref15.getState; var deferred = defer(); var pending = new Set(actors); @@ -30489,9 +30521,9 @@ var Debugger = var _loop = function (actor) { var source = getSource(getState(), actor); - dispatch(loadSourceText(source)).then(_ref23 => { - var text = _ref23.text; - var contentType = _ref23.contentType; + dispatch(loadSourceText(source)).then(_ref24 => { + var text = _ref24.text; + var contentType = _ref24.contentType; onFetch([source, text, contentType]); }, err => { @@ -30512,12 +30544,12 @@ var Debugger = } /* Called if fetching a source finishes successfully. */ - function onFetch(_ref15) { - var _ref16 = _slicedToArray(_ref15, 3); + function onFetch(_ref16) { + var _ref17 = _slicedToArray(_ref16, 3); - var aSource = _ref16[0]; - var aText = _ref16[1]; - var aContentType = _ref16[2]; + var aSource = _ref17[0]; + var aText = _ref17[1]; + var aContentType = _ref17[2]; // If fetching the source has previously timed out, discard it this time. if (!pending.has(aSource.actor)) { @@ -30529,11 +30561,11 @@ var Debugger = } /* Called if fetching a source failed because of an error. */ - function onError(_ref17) { - var _ref18 = _slicedToArray(_ref17, 2); + function onError(_ref18) { + var _ref19 = _slicedToArray(_ref18, 2); - var aSource = _ref18[0]; - var aError = _ref18[1]; + var aSource = _ref19[0]; + var aError = _ref19[1]; pending.delete(aSource.actor); maybeFinish(); @@ -30545,14 +30577,14 @@ var Debugger = function maybeFinish() { if (pending.size == 0) { // Sort the fetched sources alphabetically by their url. - deferred.resolve(fetched.sort((_ref19, _ref20) => { - var _ref22 = _slicedToArray(_ref19, 1); + deferred.resolve(fetched.sort((_ref20, _ref21) => { + var _ref23 = _slicedToArray(_ref20, 1); - var aFirst = _ref22[0]; + var aFirst = _ref23[0]; - var _ref21 = _slicedToArray(_ref20, 1); + var _ref22 = _slicedToArray(_ref21, 1); - var aSecond = _ref21[0]; + var aSecond = _ref22[0]; return aFirst > aSecond; })); } @@ -30564,6 +30596,7 @@ var Debugger = module.exports = { newSource, + newSources, selectSource, selectSourceURL, closeTab, @@ -30574,7 +30607,7 @@ var Debugger = }; /***/ }, -/* 219 */ +/* 220 */ /***/ function(module, exports) { @@ -30617,7 +30650,7 @@ var Debugger = }; /***/ }, -/* 220 */ +/* 221 */ /***/ function(module, exports, __webpack_require__) { var updateFrameLocation = (() => { @@ -30653,11 +30686,11 @@ var Debugger = var Location = _require.Location; var Frame = _require.Frame; - var _require2 = __webpack_require__(215); + var _require2 = __webpack_require__(216); var getOriginalLocation = _require2.getOriginalLocation; - var _require3 = __webpack_require__(175); + var _require3 = __webpack_require__(176); var asyncMap = _require3.asyncMap; @@ -30667,7 +30700,7 @@ var Debugger = }; /***/ }, -/* 221 */ +/* 222 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -30680,7 +30713,7 @@ var Debugger = * @module actions/tabs */ - var constants = __webpack_require__(189); + var constants = __webpack_require__(190); /** * @typedef {Object} TabAction @@ -30724,26 +30757,26 @@ var Debugger = }; /***/ }, -/* 222 */ +/* 223 */ /***/ function(module, exports, __webpack_require__) { function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step("next", value); }, function (err) { return step("throw", err); }); } } return step("next"); }); }; } - var constants = __webpack_require__(189); + var constants = __webpack_require__(190); - var _require = __webpack_require__(218); + var _require = __webpack_require__(219); var selectSource = _require.selectSource; - var _require2 = __webpack_require__(183); + var _require2 = __webpack_require__(184); var PROMISE = _require2.PROMISE; - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getExpressions = _require3.getExpressions; - var _require4 = __webpack_require__(220); + var _require4 = __webpack_require__(221); var updateFrameLocations = _require4.updateFrameLocations; @@ -31052,12 +31085,12 @@ var Debugger = }; /***/ }, -/* 223 */ +/* 224 */ /***/ function(module, exports, __webpack_require__) { - var constants = __webpack_require__(189); + var constants = __webpack_require__(190); - var _require = __webpack_require__(215); + var _require = __webpack_require__(216); var clearData = _require.clearData; @@ -31101,21 +31134,21 @@ var Debugger = }; /***/ }, -/* 224 */ +/* 225 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 225 */, -/* 226 */ +/* 226 */, +/* 227 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); var dom = React.DOM; var PropTypes = React.PropTypes; - var ImPropTypes = __webpack_require__(227); + var ImPropTypes = __webpack_require__(228); var _require = __webpack_require__(2); @@ -31125,16 +31158,16 @@ var Debugger = var connect = _require2.connect; - var SourcesTree = React.createFactory(__webpack_require__(228)); - var actions = __webpack_require__(213); + var SourcesTree = React.createFactory(__webpack_require__(229)); + var actions = __webpack_require__(214); - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getSelectedSource = _require3.getSelectedSource; var getSources = _require3.getSources; - __webpack_require__(259); + __webpack_require__(260); var Sources = React.createClass({ propTypes: { @@ -31158,7 +31191,7 @@ var Debugger = sources: getSources(state) }), dispatch => bindActionCreators(actions, dispatch))(Sources); /***/ }, -/* 227 */ +/* 228 */ /***/ function(module, exports, __webpack_require__) { /** @@ -31169,7 +31202,7 @@ var Debugger = */ "use strict"; - var Immutable = __webpack_require__(192); + var Immutable = __webpack_require__(193); var ANONYMOUS = "<>"; @@ -31362,21 +31395,21 @@ var Debugger = module.exports = ImmutablePropTypes; /***/ }, -/* 228 */ +/* 229 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); var dom = React.DOM; var PropTypes = React.PropTypes; - var classnames = __webpack_require__(206); - var ImPropTypes = __webpack_require__(227); + var classnames = __webpack_require__(207); + var ImPropTypes = __webpack_require__(228); - var _require = __webpack_require__(192); + var _require = __webpack_require__(193); var Set = _require.Set; - var _require2 = __webpack_require__(229); + var _require2 = __webpack_require__(230); var nodeHasChildren = _require2.nodeHasChildren; var createParentMap = _require2.createParentMap; @@ -31384,10 +31417,10 @@ var Debugger = var collapseTree = _require2.collapseTree; var createTree = _require2.createTree; - var ManagedTree = React.createFactory(__webpack_require__(230)); - var Svg = __webpack_require__(234); + var ManagedTree = React.createFactory(__webpack_require__(231)); + var Svg = __webpack_require__(235); - var _require3 = __webpack_require__(175); + var _require3 = __webpack_require__(176); var throttle = _require3.throttle; @@ -31531,16 +31564,16 @@ var Debugger = module.exports = SourcesTree; /***/ }, -/* 229 */ +/* 230 */ /***/ function(module, exports, __webpack_require__) { - var URL = __webpack_require__(199); + var URL = __webpack_require__(200); - var _require = __webpack_require__(185); + var _require = __webpack_require__(186); var assert = _require.assert; - var _require2 = __webpack_require__(219); + var _require2 = __webpack_require__(220); var isPretty = _require2.isPretty; @@ -31730,12 +31763,12 @@ var Debugger = }; /***/ }, -/* 230 */ +/* 231 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); - var Tree = React.createFactory(__webpack_require__(231)); - __webpack_require__(232); + var Tree = React.createFactory(__webpack_require__(232)); + __webpack_require__(233); var ManagedTree = React.createClass({ propTypes: Tree.propTypes, @@ -31810,7 +31843,7 @@ var Debugger = module.exports = ManagedTree; /***/ }, -/* 231 */ +/* 232 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -32410,52 +32443,52 @@ var Debugger = /***/ }, -/* 232 */ +/* 233 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 233 */, -/* 234 */ +/* 234 */, +/* 235 */ /***/ function(module, exports, __webpack_require__) { /** * This file maps the SVG React Components in the public/images directory. */ - var Svg = __webpack_require__(235); + var Svg = __webpack_require__(236); module.exports = Svg; /***/ }, -/* 235 */ +/* 236 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); - var InlineSVG = __webpack_require__(236); + var InlineSVG = __webpack_require__(237); var svg = { - "angle-brackets": __webpack_require__(237), - "arrow": __webpack_require__(238), - "blackBox": __webpack_require__(239), - "breakpoint": __webpack_require__(240), - "close": __webpack_require__(241), - "disableBreakpoints": __webpack_require__(242), - "domain": __webpack_require__(243), - "file": __webpack_require__(244), - "folder": __webpack_require__(245), - "globe": __webpack_require__(246), - "magnifying-glass": __webpack_require__(247), - "pause": __webpack_require__(248), - "pause-circle": __webpack_require__(249), - "pause-exceptions": __webpack_require__(250), - "prettyPrint": __webpack_require__(251), - "resume": __webpack_require__(252), - "settings": __webpack_require__(253), - "stepIn": __webpack_require__(254), - "stepOut": __webpack_require__(255), - "stepOver": __webpack_require__(256), - "subSettings": __webpack_require__(257), - "worker": __webpack_require__(258) + "angle-brackets": __webpack_require__(238), + "arrow": __webpack_require__(239), + "blackBox": __webpack_require__(240), + "breakpoint": __webpack_require__(241), + "close": __webpack_require__(242), + "disableBreakpoints": __webpack_require__(243), + "domain": __webpack_require__(244), + "file": __webpack_require__(245), + "folder": __webpack_require__(246), + "globe": __webpack_require__(247), + "magnifying-glass": __webpack_require__(248), + "pause": __webpack_require__(249), + "pause-circle": __webpack_require__(250), + "pause-exceptions": __webpack_require__(251), + "prettyPrint": __webpack_require__(252), + "resume": __webpack_require__(253), + "settings": __webpack_require__(254), + "stepIn": __webpack_require__(255), + "stepOut": __webpack_require__(256), + "stepOver": __webpack_require__(257), + "subSettings": __webpack_require__(258), + "worker": __webpack_require__(259) }; module.exports = function (name, props) { @@ -32475,7 +32508,7 @@ var Debugger = }; /***/ }, -/* 236 */ +/* 237 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32631,151 +32664,151 @@ var Debugger = module.exports = exports['default']; /***/ }, -/* 237 */ +/* 238 */ /***/ function(module, exports) { module.exports = "" /***/ }, -/* 238 */ +/* 239 */ /***/ function(module, exports) { module.exports = "" /***/ }, -/* 239 */ +/* 240 */ /***/ function(module, exports) { module.exports = "" -/***/ }, -/* 240 */ -/***/ function(module, exports) { - - module.exports = "" - /***/ }, /* 241 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 242 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 243 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 244 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 245 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 246 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 247 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 248 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 249 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 250 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 251 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 252 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 253 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 254 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 255 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 256 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 257 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 258 */ /***/ function(module, exports) { - module.exports = "" + module.exports = "" /***/ }, /* 259 */ +/***/ function(module, exports) { + + module.exports = "" + +/***/ }, +/* 260 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 260 */, -/* 261 */ +/* 261 */, +/* 262 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); var ReactDOM = __webpack_require__(25); - var ImPropTypes = __webpack_require__(227); + var ImPropTypes = __webpack_require__(228); var _require = __webpack_require__(2); @@ -32785,30 +32818,30 @@ var Debugger = var connect = _require2.connect; - var SourceEditor = __webpack_require__(262); + var SourceEditor = __webpack_require__(263); var _require3 = __webpack_require__(45); var debugGlobal = _require3.debugGlobal; - var _require4 = __webpack_require__(198); + var _require4 = __webpack_require__(199); var getSourceText = _require4.getSourceText; var getBreakpointsForSource = _require4.getBreakpointsForSource; var getSelectedLocation = _require4.getSelectedLocation; var getSelectedFrame = _require4.getSelectedFrame; - var _require5 = __webpack_require__(194); + var _require5 = __webpack_require__(195); var makeLocationId = _require5.makeLocationId; - var actions = __webpack_require__(213); - var Breakpoint = React.createFactory(__webpack_require__(263)); + var actions = __webpack_require__(214); + var Breakpoint = React.createFactory(__webpack_require__(264)); var dom = React.DOM; var PropTypes = React.PropTypes; - __webpack_require__(264); + __webpack_require__(265); function isTextForSource(sourceText) { return !sourceText.get("loading") && !sourceText.get("error"); @@ -33038,19 +33071,19 @@ var Debugger = }, dispatch => bindActionCreators(actions, dispatch))(Editor); /***/ }, -/* 262 */ +/* 263 */ /***/ function(module, exports) { module.exports = devtoolsRequire('devtools/client/sourceeditor/editor'); /***/ }, -/* 263 */ +/* 264 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); var PropTypes = React.PropTypes; - var classnames = __webpack_require__(206); + var classnames = __webpack_require__(207); function makeMarker(isDisabled) { var marker = document.createElement("div"); @@ -33120,14 +33153,14 @@ var Debugger = module.exports = Breakpoint; /***/ }, -/* 264 */ +/* 265 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 265 */, -/* 266 */ +/* 266 */, +/* 267 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -33136,8 +33169,8 @@ var Debugger = var React = __webpack_require__(17); var ReactDOM = __webpack_require__(25); - var Draggable = React.createFactory(__webpack_require__(267)); - __webpack_require__(268); + var Draggable = React.createFactory(__webpack_require__(268)); + __webpack_require__(269); var dom = React.DOM; var PropTypes = React.PropTypes; @@ -33176,8 +33209,8 @@ var Debugger = return dom.div({ className: "split-box", style: this.props.style }, dom.div({ className: rightFlex ? "uncontrolled" : "controlled", - style: { width: rightFlex ? null : width } }, left), Draggable({ className: "splitter", - onMove: x => this.onMove(x) }), dom.div({ className: rightFlex ? "controlled" : "uncontrolled", + style: { width: rightFlex ? null : width } }, left), dom.div({ className: "splitter" }, Draggable({ className: "splitter-handle", + onMove: x => this.onMove(x) })), dom.div({ className: rightFlex ? "controlled" : "uncontrolled", style: { width: rightFlex ? width : null } }, right)); } }); @@ -33185,7 +33218,7 @@ var Debugger = module.exports = SplitBox; /***/ }, -/* 267 */ +/* 268 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -33239,14 +33272,14 @@ var Debugger = module.exports = Draggable; /***/ }, -/* 268 */ +/* 269 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 269 */, -/* 270 */ +/* 270 */, +/* 271 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -33261,7 +33294,7 @@ var Debugger = var bindActionCreators = _require2.bindActionCreators; - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getPause = _require3.getPause; var getIsWaitingOnBreak = _require3.getIsWaitingOnBreak; @@ -33275,23 +33308,23 @@ var Debugger = var isEnabled = _require4.isEnabled; - var Svg = __webpack_require__(234); - var ImPropTypes = __webpack_require__(227); + var Svg = __webpack_require__(235); + var ImPropTypes = __webpack_require__(228); - var _require5 = __webpack_require__(212); + var _require5 = __webpack_require__(213); var Services = _require5.Services; var shiftKey = Services.appinfo.OS === "Darwin" ? "\u21E7" : "Shift+"; var ctrlKey = Services.appinfo.OS === "Linux" ? "Ctrl+" : ""; - var actions = __webpack_require__(213); - var Breakpoints = React.createFactory(__webpack_require__(271)); - var Expressions = React.createFactory(__webpack_require__(274)); - var Scopes = React.createFactory(__webpack_require__(307)); - var Frames = React.createFactory(__webpack_require__(339)); - var Accordion = React.createFactory(__webpack_require__(342)); - __webpack_require__(345); + var actions = __webpack_require__(214); + var Breakpoints = React.createFactory(__webpack_require__(272)); + var Expressions = React.createFactory(__webpack_require__(275)); + var Scopes = React.createFactory(__webpack_require__(308)); + var Frames = React.createFactory(__webpack_require__(340)); + var Accordion = React.createFactory(__webpack_require__(343)); + __webpack_require__(346); function debugBtn(onClick, type, className, tooltip) { className = `${ type } ${ className }`; @@ -33479,7 +33512,7 @@ var Debugger = }, dispatch => bindActionCreators(actions, dispatch))(RightSidebar); /***/ }, -/* 271 */ +/* 272 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -33492,36 +33525,36 @@ var Debugger = var bindActionCreators = _require2.bindActionCreators; - var ImPropTypes = __webpack_require__(227); - var classnames = __webpack_require__(206); - var actions = __webpack_require__(213); + var ImPropTypes = __webpack_require__(228); + var classnames = __webpack_require__(207); + var actions = __webpack_require__(214); - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getSource = _require3.getSource; var getPause = _require3.getPause; var getBreakpoints = _require3.getBreakpoints; - var _require4 = __webpack_require__(194); + var _require4 = __webpack_require__(195); var makeLocationId = _require4.makeLocationId; - var _require5 = __webpack_require__(175); + var _require5 = __webpack_require__(176); var truncateStr = _require5.truncateStr; var dom = React.DOM; var PropTypes = React.PropTypes; - var _require6 = __webpack_require__(175); + var _require6 = __webpack_require__(176); var endTruncateStr = _require6.endTruncateStr; - var _require7 = __webpack_require__(204); + var _require7 = __webpack_require__(205); var basename = _require7.basename; - __webpack_require__(272); + __webpack_require__(273); function isCurrentlyPausedAtBreakpoint(state, breakpoint) { var pause = getPause(state); @@ -33619,14 +33652,14 @@ var Debugger = }), dispatch => bindActionCreators(actions, dispatch))(Breakpoints); /***/ }, -/* 272 */ +/* 273 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 273 */, -/* 274 */ +/* 274 */, +/* 275 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -33639,23 +33672,23 @@ var Debugger = var bindActionCreators = _require2.bindActionCreators; - var ImPropTypes = __webpack_require__(227); + var ImPropTypes = __webpack_require__(228); // const classnames = require("classnames"); - var Svg = __webpack_require__(234); - var actions = __webpack_require__(213); + var Svg = __webpack_require__(235); + var actions = __webpack_require__(214); - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getExpressions = _require3.getExpressions; var getPause = _require3.getPause; - var Rep = React.createFactory(__webpack_require__(275)); + var Rep = React.createFactory(__webpack_require__(276)); // const { truncateStr } = require("../utils/utils"); var dom = React.DOM; var PropTypes = React.PropTypes; - __webpack_require__(305); + __webpack_require__(306); var Expressions = React.createClass({ propTypes: { @@ -33758,14 +33791,14 @@ var Debugger = expressions: getExpressions(state) }), dispatch => bindActionCreators(actions, dispatch))(Expressions); /***/ }, -/* 275 */ +/* 276 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); - var Rep = React.createFactory(__webpack_require__(276).Rep); - var Grip = __webpack_require__(302).Grip; + var Rep = React.createFactory(__webpack_require__(277).Rep); + var Grip = __webpack_require__(303).Grip; - __webpack_require__(303); + __webpack_require__(304); function renderRep(_ref) { var object = _ref.object; @@ -33777,7 +33810,7 @@ var Debugger = module.exports = renderRep; /***/ }, -/* 276 */ +/* 277 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -33793,31 +33826,31 @@ var Debugger = // Dependencies const React = __webpack_require__(17); - const { isGrip } = __webpack_require__(277); + const { isGrip } = __webpack_require__(278); // Load all existing rep templates - const { Undefined } = __webpack_require__(278); - const { Null } = __webpack_require__(280); - const { StringRep } = __webpack_require__(281); - const { Number } = __webpack_require__(282); - const { ArrayRep } = __webpack_require__(283); - const { Obj } = __webpack_require__(285); + const { Undefined } = __webpack_require__(279); + const { Null } = __webpack_require__(281); + const { StringRep } = __webpack_require__(282); + const { Number } = __webpack_require__(283); + const { ArrayRep } = __webpack_require__(284); + const { Obj } = __webpack_require__(286); // DOM types (grips) - const { Attribute } = __webpack_require__(287); - const { DateTime } = __webpack_require__(289); - const { Document } = __webpack_require__(290); - const { Event } = __webpack_require__(292); - const { Func } = __webpack_require__(293); - const { NamedNodeMap } = __webpack_require__(294); - const { RegExp } = __webpack_require__(295); - const { StyleSheet } = __webpack_require__(296); - const { TextNode } = __webpack_require__(297); - const { Window } = __webpack_require__(298); - const { ObjectWithText } = __webpack_require__(299); - const { ObjectWithURL } = __webpack_require__(300); - const { GripArray } = __webpack_require__(301); - const { Grip } = __webpack_require__(302); + const { Attribute } = __webpack_require__(288); + const { DateTime } = __webpack_require__(290); + const { Document } = __webpack_require__(291); + const { Event } = __webpack_require__(293); + const { Func } = __webpack_require__(294); + const { NamedNodeMap } = __webpack_require__(295); + const { RegExp } = __webpack_require__(296); + const { StyleSheet } = __webpack_require__(297); + const { TextNode } = __webpack_require__(298); + const { Window } = __webpack_require__(299); + const { ObjectWithText } = __webpack_require__(300); + const { ObjectWithURL } = __webpack_require__(301); + const { GripArray } = __webpack_require__(302); + const { Grip } = __webpack_require__(303); // List of all registered template. // XXX there should be a way for extensions to register a new @@ -33911,7 +33944,7 @@ var Debugger = /***/ }, -/* 277 */ +/* 278 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -33998,7 +34031,7 @@ var Debugger = /***/ }, -/* 278 */ +/* 279 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34013,8 +34046,8 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); + const { createFactories } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); /** * Renders undefined value @@ -34049,7 +34082,7 @@ var Debugger = /***/ }, -/* 279 */ +/* 280 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34090,7 +34123,7 @@ var Debugger = /***/ }, -/* 280 */ +/* 281 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34105,8 +34138,8 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); + const { createFactories } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); /** * Renders null value @@ -34141,7 +34174,7 @@ var Debugger = /***/ }, -/* 281 */ +/* 282 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34156,8 +34189,8 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories, cropMultipleLines } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); + const { createFactories, cropMultipleLines } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); /** * Renders a string. String value is enclosed within quotes. @@ -34198,7 +34231,7 @@ var Debugger = /***/ }, -/* 282 */ +/* 283 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34213,8 +34246,8 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); + const { createFactories } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); /** * Renders a number @@ -34250,7 +34283,7 @@ var Debugger = /***/ }, -/* 283 */ +/* 284 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34265,9 +34298,9 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); - const { Caption } = createFactories(__webpack_require__(284)); + const { createFactories } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); + const { Caption } = createFactories(__webpack_require__(285)); // Shortcuts const DOM = React.DOM; @@ -34423,7 +34456,7 @@ var Debugger = displayName: "ItemRep", render: function () { - const { Rep } = createFactories(__webpack_require__(276)); + const { Rep } = createFactories(__webpack_require__(277)); let object = this.props.object; let delim = this.props.delim; @@ -34465,7 +34498,7 @@ var Debugger = /***/ }, -/* 284 */ +/* 285 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34502,7 +34535,7 @@ var Debugger = /***/ }, -/* 285 */ +/* 286 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34516,10 +34549,10 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); - const { Caption } = createFactories(__webpack_require__(284)); - const { PropRep } = createFactories(__webpack_require__(286)); + const { createFactories } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); + const { Caption } = createFactories(__webpack_require__(285)); + const { PropRep } = createFactories(__webpack_require__(287)); // Shortcuts const { span } = React.DOM; /** @@ -34671,7 +34704,7 @@ var Debugger = /***/ }, -/* 286 */ +/* 287 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34684,7 +34717,7 @@ var Debugger = // Make this available to both AMD and CJS environments !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { const React = __webpack_require__(17); - const { createFactories } = __webpack_require__(277); + const { createFactories } = __webpack_require__(278); const { span } = React.DOM; @@ -34705,7 +34738,7 @@ var Debugger = }, render: function () { - let { Rep } = createFactories(__webpack_require__(276)); + let { Rep } = createFactories(__webpack_require__(277)); return ( span({}, @@ -34734,7 +34767,7 @@ var Debugger = /***/ }, -/* 287 */ +/* 288 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34750,9 +34783,9 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); - const { StringRep } = __webpack_require__(281); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); + const { StringRep } = __webpack_require__(282); // Shortcuts const { span } = React.DOM; @@ -34810,7 +34843,7 @@ var Debugger = /***/ }, -/* 288 */ +/* 289 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34852,7 +34885,7 @@ var Debugger = /***/ }, -/* 289 */ +/* 290 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34868,8 +34901,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); // Shortcuts const { span } = React.DOM; @@ -34919,7 +34952,7 @@ var Debugger = /***/ }, -/* 290 */ +/* 291 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -34935,9 +34968,9 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); - const { getFileName } = __webpack_require__(291); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); + const { getFileName } = __webpack_require__(292); // Shortcuts const { span } = React.DOM; @@ -34997,7 +35030,7 @@ var Debugger = /***/ }, -/* 291 */ +/* 292 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35084,7 +35117,7 @@ var Debugger = /***/ }, -/* 292 */ +/* 293 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35100,8 +35133,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); /** * Renders DOM event objects. @@ -35159,7 +35192,7 @@ var Debugger = /***/ }, -/* 293 */ +/* 294 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35175,8 +35208,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip, cropString } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip, cropString } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); /** * This component represents a template for Function objects. @@ -35224,7 +35257,7 @@ var Debugger = /***/ }, -/* 294 */ +/* 295 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35240,9 +35273,9 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); - const { Caption } = createFactories(__webpack_require__(284)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); + const { Caption } = createFactories(__webpack_require__(285)); // Shortcuts const { span } = React.DOM; @@ -35360,7 +35393,7 @@ var Debugger = }, render: function () { - const { Rep } = createFactories(__webpack_require__(276)); + const { Rep } = createFactories(__webpack_require__(277)); return ( span({}, @@ -35403,7 +35436,7 @@ var Debugger = /***/ }, -/* 295 */ +/* 296 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35419,8 +35452,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); // Shortcuts const { span } = React.DOM; @@ -35478,7 +35511,7 @@ var Debugger = /***/ }, -/* 296 */ +/* 297 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35494,9 +35527,9 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); - const { getFileName } = __webpack_require__(291); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); + const { getFileName } = __webpack_require__(292); // Shortcuts const DOM = React.DOM; @@ -35551,7 +35584,7 @@ var Debugger = /***/ }, -/* 297 */ +/* 298 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35567,8 +35600,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip, cropMultipleLines } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip, cropMultipleLines } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); // Shortcuts const DOM = React.DOM; @@ -35638,7 +35671,7 @@ var Debugger = /***/ }, -/* 298 */ +/* 299 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35654,8 +35687,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip, cropString } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); + const { createFactories, isGrip, cropString } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); // Shortcuts const DOM = React.DOM; @@ -35706,7 +35739,7 @@ var Debugger = /***/ }, -/* 299 */ +/* 300 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35722,8 +35755,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); // Shortcuts const { span } = React.DOM; @@ -35777,7 +35810,7 @@ var Debugger = /***/ }, -/* 300 */ +/* 301 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35793,8 +35826,8 @@ var Debugger = const React = __webpack_require__(17); // Reps - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectLink } = createFactories(__webpack_require__(288)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectLink } = createFactories(__webpack_require__(289)); // Shortcuts const { span } = React.DOM; @@ -35848,7 +35881,7 @@ var Debugger = /***/ }, -/* 301 */ +/* 302 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -35863,9 +35896,9 @@ var Debugger = !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { // Dependencies const React = __webpack_require__(17); - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); - const { Caption } = createFactories(__webpack_require__(284)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); + const { Caption } = createFactories(__webpack_require__(285)); // Shortcuts const { a, span } = React.DOM; @@ -35997,7 +36030,7 @@ var Debugger = }, render: function () { - let { Rep } = createFactories(__webpack_require__(276)); + let { Rep } = createFactories(__webpack_require__(277)); return ( span({}, @@ -36042,7 +36075,7 @@ var Debugger = /***/ }, -/* 302 */ +/* 303 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ @@ -36057,10 +36090,10 @@ var Debugger = // ReactJS const React = __webpack_require__(17); // Dependencies - const { createFactories, isGrip } = __webpack_require__(277); - const { ObjectBox } = createFactories(__webpack_require__(279)); - const { Caption } = createFactories(__webpack_require__(284)); - const { PropRep } = createFactories(__webpack_require__(286)); + const { createFactories, isGrip } = __webpack_require__(278); + const { ObjectBox } = createFactories(__webpack_require__(280)); + const { Caption } = createFactories(__webpack_require__(285)); + const { PropRep } = createFactories(__webpack_require__(287)); // Shortcuts const { span } = React.DOM; @@ -36229,21 +36262,21 @@ var Debugger = /***/ }, -/* 303 */ +/* 304 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 304 */, -/* 305 */ +/* 305 */, +/* 306 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 306 */, -/* 307 */ +/* 307 */, +/* 308 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -36256,22 +36289,22 @@ var Debugger = var connect = _require2.connect; - var ImPropTypes = __webpack_require__(227); - var actions = __webpack_require__(213); + var ImPropTypes = __webpack_require__(228); + var actions = __webpack_require__(214); - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getSelectedFrame = _require3.getSelectedFrame; var getLoadedObjects = _require3.getLoadedObjects; var getPause = _require3.getPause; - var ObjectInspector = React.createFactory(__webpack_require__(308)); + var ObjectInspector = React.createFactory(__webpack_require__(309)); var dom = React.DOM; var PropTypes = React.PropTypes; - var toPairs = __webpack_require__(312); + var toPairs = __webpack_require__(313); - __webpack_require__(337); + __webpack_require__(338); function info(text) { return dom.div({ className: "pane-info" }, text); @@ -36451,14 +36484,14 @@ var Debugger = }), dispatch => bindActionCreators(actions, dispatch))(Scopes); /***/ }, -/* 308 */ +/* 309 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); - var classnames = __webpack_require__(206); - var ManagedTree = React.createFactory(__webpack_require__(230)); - var Arrow = React.createFactory(__webpack_require__(309)); - var Rep = __webpack_require__(275); + var classnames = __webpack_require__(207); + var ManagedTree = React.createFactory(__webpack_require__(231)); + var Arrow = React.createFactory(__webpack_require__(310)); + var Rep = __webpack_require__(276); var dom = React.DOM; var PropTypes = React.PropTypes; @@ -36640,39 +36673,39 @@ var Debugger = module.exports = ObjectInspector; /***/ }, -/* 309 */ +/* 310 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); - var InlineSVG = __webpack_require__(236); + var InlineSVG = __webpack_require__(237); var dom = React.DOM; - __webpack_require__(310); + __webpack_require__(311); // This is inline because it's much faster. We need to revisit how we // load SVGs, at least for components that render them several times. var Arrow = props => { var className = "arrow " + (props.className || ""); return dom.span(Object.assign({}, props, { className }), React.createElement(InlineSVG, { - src: __webpack_require__(238) + src: __webpack_require__(239) })); }; module.exports = Arrow; /***/ }, -/* 310 */ +/* 311 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 311 */, -/* 312 */ +/* 312 */, +/* 313 */ /***/ function(module, exports, __webpack_require__) { - var createToPairs = __webpack_require__(313), - keys = __webpack_require__(323); + var createToPairs = __webpack_require__(314), + keys = __webpack_require__(324); /** * Creates an array of own enumerable string keyed-value pairs for `object` @@ -36704,13 +36737,13 @@ var Debugger = /***/ }, -/* 313 */ +/* 314 */ /***/ function(module, exports, __webpack_require__) { - var baseToPairs = __webpack_require__(314), - getTag = __webpack_require__(316), - mapToArray = __webpack_require__(321), - setToPairs = __webpack_require__(322); + var baseToPairs = __webpack_require__(315), + getTag = __webpack_require__(317), + mapToArray = __webpack_require__(322), + setToPairs = __webpack_require__(323); /** `Object#toString` result references. */ var mapTag = '[object Map]', @@ -36740,10 +36773,10 @@ var Debugger = /***/ }, -/* 314 */ +/* 315 */ /***/ function(module, exports, __webpack_require__) { - var arrayMap = __webpack_require__(315); + var arrayMap = __webpack_require__(316); /** * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array @@ -36764,7 +36797,7 @@ var Debugger = /***/ }, -/* 315 */ +/* 316 */ /***/ function(module, exports) { /** @@ -36791,14 +36824,14 @@ var Debugger = /***/ }, -/* 316 */ +/* 317 */ /***/ function(module, exports, __webpack_require__) { - var DataView = __webpack_require__(317), + var DataView = __webpack_require__(318), Map = __webpack_require__(82), - Promise = __webpack_require__(318), - Set = __webpack_require__(319), - WeakMap = __webpack_require__(320), + Promise = __webpack_require__(319), + Set = __webpack_require__(320), + WeakMap = __webpack_require__(321), toSource = __webpack_require__(68); /** `Object#toString` result references. */ @@ -36867,7 +36900,7 @@ var Debugger = /***/ }, -/* 317 */ +/* 318 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -36880,7 +36913,7 @@ var Debugger = /***/ }, -/* 318 */ +/* 319 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -36893,7 +36926,7 @@ var Debugger = /***/ }, -/* 319 */ +/* 320 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -36906,7 +36939,7 @@ var Debugger = /***/ }, -/* 320 */ +/* 321 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -36919,7 +36952,7 @@ var Debugger = /***/ }, -/* 321 */ +/* 322 */ /***/ function(module, exports) { /** @@ -36943,7 +36976,7 @@ var Debugger = /***/ }, -/* 322 */ +/* 323 */ /***/ function(module, exports) { /** @@ -36967,15 +37000,15 @@ var Debugger = /***/ }, -/* 323 */ +/* 324 */ /***/ function(module, exports, __webpack_require__) { - var baseHas = __webpack_require__(324), - baseKeys = __webpack_require__(325), - indexKeys = __webpack_require__(326), - isArrayLike = __webpack_require__(330), - isIndex = __webpack_require__(335), - isPrototype = __webpack_require__(336); + var baseHas = __webpack_require__(325), + baseKeys = __webpack_require__(326), + indexKeys = __webpack_require__(327), + isArrayLike = __webpack_require__(331), + isIndex = __webpack_require__(336), + isPrototype = __webpack_require__(337); /** * Creates an array of the own enumerable property names of `object`. @@ -37029,7 +37062,7 @@ var Debugger = /***/ }, -/* 324 */ +/* 325 */ /***/ function(module, exports, __webpack_require__) { var getPrototype = __webpack_require__(5); @@ -37061,7 +37094,7 @@ var Debugger = /***/ }, -/* 325 */ +/* 326 */ /***/ function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -37083,14 +37116,14 @@ var Debugger = /***/ }, -/* 326 */ +/* 327 */ /***/ function(module, exports, __webpack_require__) { - var baseTimes = __webpack_require__(327), - isArguments = __webpack_require__(328), + var baseTimes = __webpack_require__(328), + isArguments = __webpack_require__(329), isArray = __webpack_require__(52), - isLength = __webpack_require__(333), - isString = __webpack_require__(334); + isLength = __webpack_require__(334), + isString = __webpack_require__(335); /** * Creates an array of index keys for `object` values of arrays, @@ -37113,7 +37146,7 @@ var Debugger = /***/ }, -/* 327 */ +/* 328 */ /***/ function(module, exports) { /** @@ -37139,10 +37172,10 @@ var Debugger = /***/ }, -/* 328 */ +/* 329 */ /***/ function(module, exports, __webpack_require__) { - var isArrayLikeObject = __webpack_require__(329); + var isArrayLikeObject = __webpack_require__(330); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; @@ -37191,10 +37224,10 @@ var Debugger = /***/ }, -/* 329 */ +/* 330 */ /***/ function(module, exports, __webpack_require__) { - var isArrayLike = __webpack_require__(330), + var isArrayLike = __webpack_require__(331), isObjectLike = __webpack_require__(7); /** @@ -37230,12 +37263,12 @@ var Debugger = /***/ }, -/* 330 */ +/* 331 */ /***/ function(module, exports, __webpack_require__) { - var getLength = __webpack_require__(331), + var getLength = __webpack_require__(332), isFunction = __webpack_require__(62), - isLength = __webpack_require__(333); + isLength = __webpack_require__(334); /** * Checks if `value` is array-like. A value is considered array-like if it's @@ -37270,10 +37303,10 @@ var Debugger = /***/ }, -/* 331 */ +/* 332 */ /***/ function(module, exports, __webpack_require__) { - var baseProperty = __webpack_require__(332); + var baseProperty = __webpack_require__(333); /** * Gets the "length" property value of `object`. @@ -37292,7 +37325,7 @@ var Debugger = /***/ }, -/* 332 */ +/* 333 */ /***/ function(module, exports) { /** @@ -37312,7 +37345,7 @@ var Debugger = /***/ }, -/* 333 */ +/* 334 */ /***/ function(module, exports) { /** Used as references for various `Number` constants. */ @@ -37354,7 +37387,7 @@ var Debugger = /***/ }, -/* 334 */ +/* 335 */ /***/ function(module, exports, __webpack_require__) { var isArray = __webpack_require__(52), @@ -37400,7 +37433,7 @@ var Debugger = /***/ }, -/* 335 */ +/* 336 */ /***/ function(module, exports) { /** Used as references for various `Number` constants. */ @@ -37428,7 +37461,7 @@ var Debugger = /***/ }, -/* 336 */ +/* 337 */ /***/ function(module, exports) { /** Used for built-in method references. */ @@ -37452,14 +37485,14 @@ var Debugger = /***/ }, -/* 337 */ +/* 338 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 338 */, -/* 339 */ +/* 339 */, +/* 340 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -37474,17 +37507,17 @@ var Debugger = var connect = _require2.connect; - var actions = __webpack_require__(213); + var actions = __webpack_require__(214); - var _require3 = __webpack_require__(175); + var _require3 = __webpack_require__(176); var endTruncateStr = _require3.endTruncateStr; - var _require4 = __webpack_require__(204); + var _require4 = __webpack_require__(205); var basename = _require4.basename; - var _require5 = __webpack_require__(198); + var _require5 = __webpack_require__(199); var getFrames = _require5.getFrames; var getSelectedFrame = _require5.getSelectedFrame; @@ -37492,7 +37525,7 @@ var Debugger = if (typeof window == "object") { - __webpack_require__(340); + __webpack_require__(341); } function renderFrameTitle(frame) { @@ -37533,14 +37566,14 @@ var Debugger = }), dispatch => bindActionCreators(actions, dispatch))(Frames); /***/ }, -/* 340 */ +/* 341 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 341 */, -/* 342 */ +/* 342 */, +/* 343 */ /***/ function(module, exports, __webpack_require__) { function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -37550,9 +37583,9 @@ var Debugger = var PropTypes = React.PropTypes; var div = dom.div; - var Svg = __webpack_require__(234); + var Svg = __webpack_require__(235); - __webpack_require__(343); + __webpack_require__(344); var Accordion = React.createClass({ propTypes: { @@ -37602,21 +37635,21 @@ var Debugger = module.exports = Accordion; /***/ }, -/* 343 */ +/* 344 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 344 */, -/* 345 */ +/* 345 */, +/* 346 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 346 */, -/* 347 */ +/* 347 */, +/* 348 */ /***/ function(module, exports, __webpack_require__) { function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -37625,7 +37658,7 @@ var Debugger = var dom = React.DOM; var PropTypes = React.PropTypes; - var ImPropTypes = __webpack_require__(227); + var ImPropTypes = __webpack_require__(228); var _require = __webpack_require__(15); @@ -37635,27 +37668,27 @@ var Debugger = var bindActionCreators = _require2.bindActionCreators; - var Svg = __webpack_require__(234); + var Svg = __webpack_require__(235); - var _require3 = __webpack_require__(198); + var _require3 = __webpack_require__(199); var getSelectedSource = _require3.getSelectedSource; var getSourceTabs = _require3.getSourceTabs; - var _require4 = __webpack_require__(175); + var _require4 = __webpack_require__(176); var endTruncateStr = _require4.endTruncateStr; - var classnames = __webpack_require__(206); - var actions = __webpack_require__(213); + var classnames = __webpack_require__(207); + var actions = __webpack_require__(214); var _require5 = __webpack_require__(46); var isEnabled = _require5.isEnabled; - __webpack_require__(348); - __webpack_require__(350); + __webpack_require__(349); + __webpack_require__(351); /** * TODO: this is a placeholder function @@ -37837,21 +37870,21 @@ var Debugger = }), dispatch => bindActionCreators(actions, dispatch))(SourceTabs); /***/ }, -/* 348 */ +/* 349 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 349 */, -/* 350 */ +/* 350 */, +/* 351 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 351 */, -/* 352 */ +/* 352 */, +/* 353 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); @@ -37866,34 +37899,34 @@ var Debugger = var bindActionCreators = _require2.bindActionCreators; - var actions = __webpack_require__(213); + var actions = __webpack_require__(214); var _require3 = __webpack_require__(46); var isEnabled = _require3.isEnabled; - var _require4 = __webpack_require__(198); + var _require4 = __webpack_require__(199); var getSelectedSource = _require4.getSelectedSource; var getSourceText = _require4.getSourceText; var getPrettySource = _require4.getPrettySource; - var Svg = __webpack_require__(234); - var ImPropTypes = __webpack_require__(227); - var classnames = __webpack_require__(206); + var Svg = __webpack_require__(235); + var ImPropTypes = __webpack_require__(228); + var classnames = __webpack_require__(207); - var _require5 = __webpack_require__(215); + var _require5 = __webpack_require__(216); var isMapped = _require5.isMapped; var getGeneratedSourceId = _require5.getGeneratedSourceId; var isOriginal = _require5.isOriginal; - var _require6 = __webpack_require__(219); + var _require6 = __webpack_require__(220); var isPretty = _require6.isPretty; - __webpack_require__(353); + __webpack_require__(354); function debugBtn(onClick, type) { var className = arguments.length <= 2 || arguments[2] === undefined ? "active" : arguments[2]; @@ -37978,27 +38011,27 @@ var Debugger = }, dispatch => bindActionCreators(actions, dispatch))(SourceFooter); /***/ }, -/* 353 */ +/* 354 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 354 */, -/* 355 */ +/* 355 */, +/* 356 */ /***/ function(module, exports, __webpack_require__) { var React = __webpack_require__(17); var dom = React.DOM; var PropTypes = React.PropTypes; - var _require = __webpack_require__(356); + var _require = __webpack_require__(357); var filter = _require.filter; - var classnames = __webpack_require__(206); - __webpack_require__(362); - var Svg = __webpack_require__(234); + var classnames = __webpack_require__(207); + __webpack_require__(363); + var Svg = __webpack_require__(235); var INITIAL_SELECTED_INDEX = 0; @@ -38109,21 +38142,21 @@ var Debugger = module.exports = Autocomplete; /***/ }, -/* 356 */ +/* 357 */ /***/ function(module, exports, __webpack_require__) { (function() { var PathSeparator, filter, legacy_scorer, matcher, prepQueryCache, scorer; - scorer = __webpack_require__(357); + scorer = __webpack_require__(358); - legacy_scorer = __webpack_require__(359); + legacy_scorer = __webpack_require__(360); - filter = __webpack_require__(360); + filter = __webpack_require__(361); - matcher = __webpack_require__(361); + matcher = __webpack_require__(362); - PathSeparator = __webpack_require__(358).sep; + PathSeparator = __webpack_require__(359).sep; prepQueryCache = null; @@ -38198,13 +38231,13 @@ var Debugger = /***/ }, -/* 357 */ +/* 358 */ /***/ function(module, exports, __webpack_require__) { (function() { var AcronymResult, PathSeparator, Query, basenameScore, coreChars, countDir, doScore, emptyAcronymResult, file_coeff, isMatch, isSeparator, isWordEnd, isWordStart, miss_coeff, opt_char_re, pos_bonus, scoreAcronyms, scoreCharacter, scoreConsecutives, scoreExact, scoreExactMatch, scorePattern, scorePosition, scoreSize, tau_depth, tau_size, truncatedUpperCase, wm; - PathSeparator = __webpack_require__(358).sep; + PathSeparator = __webpack_require__(359).sep; wm = 150; @@ -38591,7 +38624,7 @@ var Debugger = /***/ }, -/* 358 */ +/* 359 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. @@ -38822,13 +38855,13 @@ var Debugger = /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35))) /***/ }, -/* 359 */ +/* 360 */ /***/ function(module, exports, __webpack_require__) { (function() { var PathSeparator, queryIsLastPathSegment; - PathSeparator = __webpack_require__(358).sep; + PathSeparator = __webpack_require__(359).sep; exports.basenameScore = function(string, query, score) { var base, depth, index, lastCharacter, segmentCount, slashCount; @@ -38956,15 +38989,15 @@ var Debugger = /***/ }, -/* 360 */ +/* 361 */ /***/ function(module, exports, __webpack_require__) { (function() { var PathSeparator, legacy_scorer, pluckCandidates, scorer, sortCandidates; - scorer = __webpack_require__(357); + scorer = __webpack_require__(358); - legacy_scorer = __webpack_require__(359); + legacy_scorer = __webpack_require__(360); pluckCandidates = function(a) { return a.candidate; @@ -38974,7 +39007,7 @@ var Debugger = return b.score - a.score; }; - PathSeparator = __webpack_require__(358).sep; + PathSeparator = __webpack_require__(359).sep; module.exports = function(candidates, query, _arg) { var allowErrors, bAllowErrors, bKey, candidate, coreQuery, key, legacy, maxInners, maxResults, prepQuery, queryHasSlashes, score, scoredCandidates, spotLeft, string, _i, _j, _len, _len1, _ref; @@ -39035,15 +39068,15 @@ var Debugger = /***/ }, -/* 361 */ +/* 362 */ /***/ function(module, exports, __webpack_require__) { (function() { var PathSeparator, scorer; - PathSeparator = __webpack_require__(358).sep; + PathSeparator = __webpack_require__(359).sep; - scorer = __webpack_require__(357); + scorer = __webpack_require__(358); exports.basenameMatch = function(subject, subject_lw, prepQuery) { var basePos, depth, end; @@ -39188,14 +39221,14 @@ var Debugger = /***/ }, -/* 362 */ +/* 363 */ /***/ function(module, exports) { // removed by extract-text-webpack-plugin /***/ }, -/* 363 */, -/* 364 */ +/* 364 */, +/* 365 */ /***/ function(module, exports, __webpack_require__) { /* This Source Code Form is subject to the terms of the Mozilla Public @@ -39204,7 +39237,7 @@ var Debugger = "use strict"; - const { Services } = __webpack_require__(212); + const { Services } = __webpack_require__(213); const EventEmitter = __webpack_require__(111); const isOSX = Services.appinfo.OS === "Darwin"; diff --git a/devtools/client/debugger/new/images/favicon.png b/devtools/client/debugger/new/images/favicon.png new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/devtools/client/debugger/new/pretty-print-worker.js b/devtools/client/debugger/new/pretty-print-worker.js index 7fe123efd46b..e664292c8de8 100644 --- a/devtools/client/debugger/new/pretty-print-worker.js +++ b/devtools/client/debugger/new/pretty-print-worker.js @@ -46,7 +46,7 @@ var Debugger = /***/ 0: /***/ function(module, exports, __webpack_require__) { - var prettyFast = __webpack_require__(365); + var prettyFast = __webpack_require__(366); self.onmessage = function (msg) { var _prettyPrint = prettyPrint(msg.data); @@ -100,7 +100,7 @@ var Debugger = /***/ }, -/***/ 365: +/***/ 366: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */ @@ -122,8 +122,8 @@ var Debugger = }(this, function () { "use strict"; - var acorn = this.acorn || __webpack_require__(366); - var sourceMap = this.sourceMap || __webpack_require__(367); + var acorn = this.acorn || __webpack_require__(367); + var sourceMap = this.sourceMap || __webpack_require__(368); var SourceNode = sourceMap.SourceNode; // If any of these tokens are seen before a "[" token, we know that "[" token @@ -982,7 +982,7 @@ var Debugger = /***/ }, -/***/ 366: +/***/ 367: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Acorn is a tiny, fast JavaScript parser written in JavaScript. @@ -3642,7 +3642,7 @@ var Debugger = /***/ }, -/***/ 367: +/***/ 368: /***/ function(module, exports, __webpack_require__) { /* @@ -3650,14 +3650,14 @@ var Debugger = * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ - exports.SourceMapGenerator = __webpack_require__(368).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(374).SourceMapConsumer; - exports.SourceNode = __webpack_require__(376).SourceNode; + exports.SourceMapGenerator = __webpack_require__(369).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(375).SourceMapConsumer; + exports.SourceNode = __webpack_require__(377).SourceNode; /***/ }, -/***/ 368: +/***/ 369: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -3671,10 +3671,10 @@ var Debugger = } !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { - var base64VLQ = __webpack_require__(369); - var util = __webpack_require__(371); - var ArraySet = __webpack_require__(372).ArraySet; - var MappingList = __webpack_require__(373).MappingList; + var base64VLQ = __webpack_require__(370); + var util = __webpack_require__(372); + var ArraySet = __webpack_require__(373).ArraySet; + var MappingList = __webpack_require__(374).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -4064,7 +4064,7 @@ var Debugger = /***/ }, -/***/ 369: +/***/ 370: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4108,7 +4108,7 @@ var Debugger = } !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { - var base64 = __webpack_require__(370); + var base64 = __webpack_require__(371); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -4213,7 +4213,7 @@ var Debugger = /***/ }, -/***/ 370: +/***/ 371: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4262,7 +4262,7 @@ var Debugger = /***/ }, -/***/ 371: +/***/ 372: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4588,7 +4588,7 @@ var Debugger = /***/ }, -/***/ 372: +/***/ 373: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4602,7 +4602,7 @@ var Debugger = } !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { - var util = __webpack_require__(371); + var util = __webpack_require__(372); /** * A data structure which is a combination of an array and a set. Adding a new @@ -4692,7 +4692,7 @@ var Debugger = /***/ }, -/***/ 373: +/***/ 374: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4706,7 +4706,7 @@ var Debugger = } !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { - var util = __webpack_require__(371); + var util = __webpack_require__(372); /** * Determine whether mappingB is after mappingA with respect to generated @@ -4785,7 +4785,7 @@ var Debugger = /***/ }, -/***/ 374: +/***/ 375: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4799,10 +4799,10 @@ var Debugger = } !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { - var util = __webpack_require__(371); - var binarySearch = __webpack_require__(375); - var ArraySet = __webpack_require__(372).ArraySet; - var base64VLQ = __webpack_require__(369); + var util = __webpack_require__(372); + var binarySearch = __webpack_require__(376); + var ArraySet = __webpack_require__(373).ArraySet; + var base64VLQ = __webpack_require__(370); /** * A SourceMapConsumer instance represents a parsed source map which we can @@ -5367,7 +5367,7 @@ var Debugger = /***/ }, -/***/ 375: +/***/ 376: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -5454,7 +5454,7 @@ var Debugger = /***/ }, -/***/ 376: +/***/ 377: /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ @@ -5468,8 +5468,8 @@ var Debugger = } !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { - var SourceMapGenerator = __webpack_require__(368).SourceMapGenerator; - var util = __webpack_require__(371); + var SourceMapGenerator = __webpack_require__(369).SourceMapGenerator; + var util = __webpack_require__(372); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). diff --git a/devtools/client/debugger/new/source-map-worker.js b/devtools/client/debugger/new/source-map-worker.js index 52879deffb8d..4295f182922f 100644 --- a/devtools/client/debugger/new/source-map-worker.js +++ b/devtools/client/debugger/new/source-map-worker.js @@ -48,19 +48,19 @@ var Debugger = var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _require = __webpack_require__(377); + var _require = __webpack_require__(378); var SourceMapConsumer = _require.SourceMapConsumer; var SourceNode = _require.SourceNode; var SourceMapGenerator = _require.SourceMapGenerator; - var _require2 = __webpack_require__(216); + var _require2 = __webpack_require__(217); var makeOriginalSource = _require2.makeOriginalSource; var getGeneratedSourceId = _require2.getGeneratedSourceId; - var toPairs = __webpack_require__(312); + var toPairs = __webpack_require__(313); var sourceMapConsumers = new Map(); var sourceNodes = new Map(); @@ -657,7 +657,7 @@ var Debugger = /***/ }, -/***/ 216: +/***/ 217: /***/ function(module, exports) { @@ -687,11 +687,11 @@ var Debugger = /***/ }, -/***/ 312: +/***/ 313: /***/ function(module, exports, __webpack_require__) { - var createToPairs = __webpack_require__(313), - keys = __webpack_require__(323); + var createToPairs = __webpack_require__(314), + keys = __webpack_require__(324); /** * Creates an array of own enumerable string keyed-value pairs for `object` @@ -724,13 +724,13 @@ var Debugger = /***/ }, -/***/ 313: +/***/ 314: /***/ function(module, exports, __webpack_require__) { - var baseToPairs = __webpack_require__(314), - getTag = __webpack_require__(316), - mapToArray = __webpack_require__(321), - setToPairs = __webpack_require__(322); + var baseToPairs = __webpack_require__(315), + getTag = __webpack_require__(317), + mapToArray = __webpack_require__(322), + setToPairs = __webpack_require__(323); /** `Object#toString` result references. */ var mapTag = '[object Map]', @@ -761,10 +761,10 @@ var Debugger = /***/ }, -/***/ 314: +/***/ 315: /***/ function(module, exports, __webpack_require__) { - var arrayMap = __webpack_require__(315); + var arrayMap = __webpack_require__(316); /** * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array @@ -786,7 +786,7 @@ var Debugger = /***/ }, -/***/ 315: +/***/ 316: /***/ function(module, exports) { /** @@ -814,14 +814,14 @@ var Debugger = /***/ }, -/***/ 316: +/***/ 317: /***/ function(module, exports, __webpack_require__) { - var DataView = __webpack_require__(317), + var DataView = __webpack_require__(318), Map = __webpack_require__(82), - Promise = __webpack_require__(318), - Set = __webpack_require__(319), - WeakMap = __webpack_require__(320), + Promise = __webpack_require__(319), + Set = __webpack_require__(320), + WeakMap = __webpack_require__(321), toSource = __webpack_require__(68); /** `Object#toString` result references. */ @@ -891,7 +891,7 @@ var Debugger = /***/ }, -/***/ 317: +/***/ 318: /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -905,7 +905,7 @@ var Debugger = /***/ }, -/***/ 318: +/***/ 319: /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -919,7 +919,7 @@ var Debugger = /***/ }, -/***/ 319: +/***/ 320: /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -933,7 +933,7 @@ var Debugger = /***/ }, -/***/ 320: +/***/ 321: /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(60), @@ -947,7 +947,7 @@ var Debugger = /***/ }, -/***/ 321: +/***/ 322: /***/ function(module, exports) { /** @@ -972,7 +972,7 @@ var Debugger = /***/ }, -/***/ 322: +/***/ 323: /***/ function(module, exports) { /** @@ -997,15 +997,15 @@ var Debugger = /***/ }, -/***/ 323: +/***/ 324: /***/ function(module, exports, __webpack_require__) { - var baseHas = __webpack_require__(324), - baseKeys = __webpack_require__(325), - indexKeys = __webpack_require__(326), - isArrayLike = __webpack_require__(330), - isIndex = __webpack_require__(335), - isPrototype = __webpack_require__(336); + var baseHas = __webpack_require__(325), + baseKeys = __webpack_require__(326), + indexKeys = __webpack_require__(327), + isArrayLike = __webpack_require__(331), + isIndex = __webpack_require__(336), + isPrototype = __webpack_require__(337); /** * Creates an array of the own enumerable property names of `object`. @@ -1060,7 +1060,7 @@ var Debugger = /***/ }, -/***/ 324: +/***/ 325: /***/ function(module, exports, __webpack_require__) { var getPrototype = __webpack_require__(5); @@ -1093,7 +1093,7 @@ var Debugger = /***/ }, -/***/ 325: +/***/ 326: /***/ function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -1116,14 +1116,14 @@ var Debugger = /***/ }, -/***/ 326: +/***/ 327: /***/ function(module, exports, __webpack_require__) { - var baseTimes = __webpack_require__(327), - isArguments = __webpack_require__(328), + var baseTimes = __webpack_require__(328), + isArguments = __webpack_require__(329), isArray = __webpack_require__(52), - isLength = __webpack_require__(333), - isString = __webpack_require__(334); + isLength = __webpack_require__(334), + isString = __webpack_require__(335); /** * Creates an array of index keys for `object` values of arrays, @@ -1147,7 +1147,7 @@ var Debugger = /***/ }, -/***/ 327: +/***/ 328: /***/ function(module, exports) { /** @@ -1174,10 +1174,10 @@ var Debugger = /***/ }, -/***/ 328: +/***/ 329: /***/ function(module, exports, __webpack_require__) { - var isArrayLikeObject = __webpack_require__(329); + var isArrayLikeObject = __webpack_require__(330); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; @@ -1227,10 +1227,10 @@ var Debugger = /***/ }, -/***/ 329: +/***/ 330: /***/ function(module, exports, __webpack_require__) { - var isArrayLike = __webpack_require__(330), + var isArrayLike = __webpack_require__(331), isObjectLike = __webpack_require__(7); /** @@ -1267,12 +1267,12 @@ var Debugger = /***/ }, -/***/ 330: +/***/ 331: /***/ function(module, exports, __webpack_require__) { - var getLength = __webpack_require__(331), + var getLength = __webpack_require__(332), isFunction = __webpack_require__(62), - isLength = __webpack_require__(333); + isLength = __webpack_require__(334); /** * Checks if `value` is array-like. A value is considered array-like if it's @@ -1308,10 +1308,10 @@ var Debugger = /***/ }, -/***/ 331: +/***/ 332: /***/ function(module, exports, __webpack_require__) { - var baseProperty = __webpack_require__(332); + var baseProperty = __webpack_require__(333); /** * Gets the "length" property value of `object`. @@ -1331,7 +1331,7 @@ var Debugger = /***/ }, -/***/ 332: +/***/ 333: /***/ function(module, exports) { /** @@ -1352,7 +1352,7 @@ var Debugger = /***/ }, -/***/ 333: +/***/ 334: /***/ function(module, exports) { /** Used as references for various `Number` constants. */ @@ -1395,7 +1395,7 @@ var Debugger = /***/ }, -/***/ 334: +/***/ 335: /***/ function(module, exports, __webpack_require__) { var isArray = __webpack_require__(52), @@ -1442,7 +1442,7 @@ var Debugger = /***/ }, -/***/ 335: +/***/ 336: /***/ function(module, exports) { /** Used as references for various `Number` constants. */ @@ -1471,7 +1471,7 @@ var Debugger = /***/ }, -/***/ 336: +/***/ 337: /***/ function(module, exports) { /** Used for built-in method references. */ @@ -1496,7 +1496,7 @@ var Debugger = /***/ }, -/***/ 377: +/***/ 378: /***/ function(module, exports, __webpack_require__) { /* @@ -1504,14 +1504,14 @@ var Debugger = * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ - exports.SourceMapGenerator = __webpack_require__(378).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(384).SourceMapConsumer; - exports.SourceNode = __webpack_require__(387).SourceNode; + exports.SourceMapGenerator = __webpack_require__(379).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(385).SourceMapConsumer; + exports.SourceNode = __webpack_require__(388).SourceNode; /***/ }, -/***/ 378: +/***/ 379: /***/ function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -1521,10 +1521,10 @@ var Debugger = * http://opensource.org/licenses/BSD-3-Clause */ - var base64VLQ = __webpack_require__(379); - var util = __webpack_require__(381); - var ArraySet = __webpack_require__(382).ArraySet; - var MappingList = __webpack_require__(383).MappingList; + var base64VLQ = __webpack_require__(380); + var util = __webpack_require__(382); + var ArraySet = __webpack_require__(383).ArraySet; + var MappingList = __webpack_require__(384).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -1922,7 +1922,7 @@ var Debugger = /***/ }, -/***/ 379: +/***/ 380: /***/ function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -1962,7 +1962,7 @@ var Debugger = * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - var base64 = __webpack_require__(380); + var base64 = __webpack_require__(381); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -2069,7 +2069,7 @@ var Debugger = /***/ }, -/***/ 380: +/***/ 381: /***/ function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -2143,7 +2143,7 @@ var Debugger = /***/ }, -/***/ 381: +/***/ 382: /***/ function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -2567,7 +2567,7 @@ var Debugger = /***/ }, -/***/ 382: +/***/ 383: /***/ function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -2577,7 +2577,7 @@ var Debugger = * http://opensource.org/licenses/BSD-3-Clause */ - var util = __webpack_require__(381); + var util = __webpack_require__(382); var has = Object.prototype.hasOwnProperty; /** @@ -2678,7 +2678,7 @@ var Debugger = /***/ }, -/***/ 383: +/***/ 384: /***/ function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -2688,7 +2688,7 @@ var Debugger = * http://opensource.org/licenses/BSD-3-Clause */ - var util = __webpack_require__(381); + var util = __webpack_require__(382); /** * Determine whether mappingB is after mappingA with respect to generated @@ -2764,7 +2764,7 @@ var Debugger = /***/ }, -/***/ 384: +/***/ 385: /***/ function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -2774,11 +2774,11 @@ var Debugger = * http://opensource.org/licenses/BSD-3-Clause */ - var util = __webpack_require__(381); - var binarySearch = __webpack_require__(385); - var ArraySet = __webpack_require__(382).ArraySet; - var base64VLQ = __webpack_require__(379); - var quickSort = __webpack_require__(386).quickSort; + var util = __webpack_require__(382); + var binarySearch = __webpack_require__(386); + var ArraySet = __webpack_require__(383).ArraySet; + var base64VLQ = __webpack_require__(380); + var quickSort = __webpack_require__(387).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -3853,7 +3853,7 @@ var Debugger = /***/ }, -/***/ 385: +/***/ 386: /***/ function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -3971,7 +3971,7 @@ var Debugger = /***/ }, -/***/ 386: +/***/ 387: /***/ function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4092,7 +4092,7 @@ var Debugger = /***/ }, -/***/ 387: +/***/ 388: /***/ function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -4102,8 +4102,8 @@ var Debugger = * http://opensource.org/licenses/BSD-3-Clause */ - var SourceMapGenerator = __webpack_require__(378).SourceMapGenerator; - var util = __webpack_require__(381); + var SourceMapGenerator = __webpack_require__(379).SourceMapGenerator; + var util = __webpack_require__(382); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). diff --git a/devtools/client/debugger/new/styles.css b/devtools/client/debugger/new/styles.css index 83701328ab2e..430955636423 100644 --- a/devtools/client/debugger/new/styles.css +++ b/devtools/client/debugger/new/styles.css @@ -427,15 +427,22 @@ ul.sources-list { .split-box .splitter { background-color: var(--theme-splitter-color); - border-bottom-width: 0; - border-color: white; - border-left-width: 0; - border-right-width: 0; - border-style: solid; - border-top-width: 0; - box-sizing: content-box; - cursor: ew-resize; flex: 0 0 1px; + position: relative; +} + +/* The actual handle that users drag is a transparent element that's slightly wider than + the splitter element itself, so it's easier to grab it. */ +.split-box .splitter .splitter-handle { + cursor: ew-resize; + position: absolute; + top: 0; + left: -4px; + width: 8px; + height: 100%; + + /* Stack above the code-mirror editor so it's actually possible to grab the handle. */ + z-index: 5; } .breakpoints-list .breakpoint { @@ -937,6 +944,13 @@ ul.sources-list { margin: 0; padding: 0; } +.source-footer { + border-top: 1px solid var(--theme-splitter-color); + left: 0; + opacity: 1; + width: 100%; +} + .source-footer .prettyPrint.pretty { stroke: var(--theme-highlight-blue); } diff --git a/devtools/client/debugger/new/test/mochitest/.eslintrc b/devtools/client/debugger/new/test/mochitest/.eslintrc index 723b8b13a734..df67615c68a6 100644 --- a/devtools/client/debugger/new/test/mochitest/.eslintrc +++ b/devtools/client/debugger/new/test/mochitest/.eslintrc @@ -47,11 +47,13 @@ "isPaused": false, "assertPausedLocation": false, "assertHighlightLocation": false, + "createDebuggerContext": false, "initDebugger": false, "invokeInTab": false, "findSource": false, "findElement": false, "findAllElements": false, + "openNewTabAndToolbox": false, "selectSource": false, "stepOver": false, "stepIn": false, diff --git a/devtools/client/debugger/new/test/mochitest/browser.ini b/devtools/client/debugger/new/test/mochitest/browser.ini index 20c95394c116..ff8c8edd5cbf 100644 --- a/devtools/client/debugger/new/test/mochitest/browser.ini +++ b/devtools/client/debugger/new/test/mochitest/browser.ini @@ -17,6 +17,8 @@ support-files = examples/code-script-switching-02.js examples/code-script-switching-01.js +[browser_dbg-breaking.js] +[browser_dbg-breaking-from-console.js] [browser_dbg-editor-gutter.js] [browser_dbg-editor-mode.js] [browser_dbg-editor-select.js] diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-breaking-from-console.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-breaking-from-console.js new file mode 100644 index 000000000000..8005b518d6ee --- /dev/null +++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-breaking-from-console.js @@ -0,0 +1,31 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +// Tests that `debugger` statements are hit before the debugger even +// initializes and it properly highlights the right location in the +// debugger. + +add_task(function* () { + const url = EXAMPLE_URL + "doc-script-switching.html"; + const toolbox = yield openNewTabAndToolbox(url, "webconsole"); + + // Type "debugger" into console + let jsterm = toolbox.getPanel("webconsole").hud.jsterm; + jsterm.execute("debugger"); + + // Wait for the debugger to be selected and make sure it's paused + yield new Promise((resolve) => { + toolbox.on("jsdebugger-selected", resolve); + }); + is(toolbox.threadClient.state, "paused"); + + // Create a dbg context + const dbg = createDebuggerContext(toolbox); + const { selectors: { getSelectedSource }, getState } = dbg; + + // Make sure the thread is paused in the right source and location + yield waitForDispatch(dbg, "LOAD_SOURCE_TEXT"); + is(dbg.win.cm.getValue(), "debugger"); + const source = getSelectedSource(getState()).toJS(); + assertPausedLocation(dbg, source, 1); +}); diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-breaking.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-breaking.js new file mode 100644 index 000000000000..f978c55ae286 --- /dev/null +++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-breaking.js @@ -0,0 +1,33 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +// Tests the breakpoints are hit in various situations. + +add_task(function* () { + const dbg = yield initDebugger("doc-scripts.html", "scripts.html"); + const { selectors: { getSelectedSource }, getState } = dbg; + + // Make sure we can set a top-level breakpoint and it will be hit on + // reload. + yield addBreakpoint(dbg, "scripts.html", 18); + reload(dbg); + yield waitForPaused(dbg); + assertPausedLocation(dbg, "scripts.html", 18); + yield resume(dbg); + + const paused = waitForPaused(dbg); + + // Create an eval script that pauses itself. + invokeInTab("doEval"); + + yield paused; + yield resume(dbg); + const source = getSelectedSource(getState()).toJS(); + // TODO: The url of an eval source should be null. + ok(source.url.indexOf("SOURCE") === 0, "It is an eval source"); + + yield addBreakpoint(dbg, source, 5); + invokeInTab("evaledFunc"); + yield waitForPaused(dbg); + assertPausedLocation(dbg, source, 5); +}); diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-navigation.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-navigation.js index fea1d2ac96bd..381b6b7fde5b 100644 --- a/devtools/client/debugger/new/test/mochitest/browser_dbg-navigation.js +++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-navigation.js @@ -11,15 +11,13 @@ function countSources(dbg) { * navigating while paused will reset the pause state and sources */ add_task(function* () { - const dbg = yield initDebugger( - "doc-script-switching.html", - "script-switching-01.js" - ); + const dbg = yield initDebugger("doc-script-switching.html"); + const { selectors: { getSelectedSource, getPause }, getState } = dbg; invokeInTab("firstCall"); yield waitForPaused(dbg); - yield navigate(dbg, "doc-scripts.html", "simple1.js", "long.js"); + yield navigate(dbg, "doc-scripts.html", "simple1.js"); yield addBreakpoint(dbg, "simple1.js", 4); invokeInTab("main"); yield waitForPaused(dbg); @@ -29,6 +27,7 @@ add_task(function* () { yield navigate(dbg, "about:blank"); yield waitForDispatch(dbg, "NAVIGATE"); is(countSources(dbg), 0, "0 sources are loaded."); + ok(!getPause(getState()), "No pause state exists"); yield navigate(dbg, "doc-scripts.html", @@ -39,4 +38,10 @@ add_task(function* () { ); is(countSources(dbg), 4, "4 sources are loaded."); + + // Test that the current select source persists across reloads + yield selectSource(dbg, "long.js"); + yield reload(dbg, "long.js"); + ok(getSelectedSource(getState()).get("url").includes("long.js"), + "Selected source is long.js"); }); diff --git a/devtools/client/debugger/new/test/mochitest/examples/code-simple1.js b/devtools/client/debugger/new/test/mochitest/examples/code-simple1.js index aa45e2c39b78..87cc50f442db 100644 --- a/devtools/client/debugger/new/test/mochitest/examples/code-simple1.js +++ b/devtools/client/debugger/new/test/mochitest/examples/code-simple1.js @@ -5,3 +5,27 @@ function main() { const result = func(); return result; } + +function doEval() { + eval("(" + function() { + debugger; + + window.evaledFunc = function() { + var foo = 1; + var bar = 2; + return foo + bar; + }; + }.toString() + ")()"); +} + +function doNamedEval() { + eval("(" + function() { + debugger; + + window.evaledFunc = function() { + var foo = 1; + var bar = 2; + return foo + bar; + }; + }.toString() + ")();\n //# sourceURL=evaled.js"); +} diff --git a/devtools/client/debugger/new/test/mochitest/head.js b/devtools/client/debugger/new/test/mochitest/head.js index b850b8d34896..1ec851c441a9 100644 --- a/devtools/client/debugger/new/test/mochitest/head.js +++ b/devtools/client/debugger/new/test/mochitest/head.js @@ -118,7 +118,7 @@ function assertPausedLocation(dbg, source, line) { source = findSource(dbg, source); // Check the selected source - is(getSelectedSource(getState()).get("url"), source.url); + is(getSelectedSource(getState()).get("id"), source.id); // Check the pause location const location = getPause(getState()).getIn(["frame", "location"]); @@ -172,25 +172,26 @@ function waitForPaused(dbg) { }); }; +function createDebuggerContext(toolbox) { + const win = toolbox.getPanel("jsdebugger").panelWin; + const store = win.Debugger.store; + + return { + actions: win.Debugger.actions, + selectors: win.Debugger.selectors, + getState: store.getState, + store: store, + client: win.Debugger.client, + toolbox: toolbox, + win: win + }; +} + function initDebugger(url, ...sources) { return Task.spawn(function* () { const toolbox = yield openNewTabAndToolbox(EXAMPLE_URL + url, "jsdebugger"); - const win = toolbox.getPanel("jsdebugger").panelWin; - const store = win.Debugger.store; - const { getSources } = win.Debugger.selectors; - - const dbg = { - actions: win.Debugger.actions, - selectors: win.Debugger.selectors, - getState: store.getState, - store: store, - client: win.Debugger.client, - toolbox: toolbox, - win: win - }; - + const dbg = createDebuggerContext(toolbox); yield waitForSources(dbg, ...sources); - return dbg; }); }; @@ -256,8 +257,8 @@ function resume(dbg) { return waitForThreadEvents(dbg, "resumed"); } -function reload(dbg) { - return dbg.client.reload(); +function reload(dbg, ...sources) { + return dbg.client.reload().then(() => waitForSources(...sources)); } function navigate(dbg, url, ...sources) { diff --git a/devtools/client/framework/devtools-browser.js b/devtools/client/framework/devtools-browser.js index 9e764877cba9..41a4e513438e 100644 --- a/devtools/client/framework/devtools-browser.js +++ b/devtools/client/framework/devtools-browser.js @@ -634,7 +634,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = { // Destroy toolboxes for closed window for (let [target, toolbox] of gDevTools._toolboxes) { - if (toolbox.win == win) { + if (toolbox.win.top == win) { toolbox.destroy(); } } diff --git a/devtools/client/framework/target.js b/devtools/client/framework/target.js index 2e408c543cab..14588af983d6 100644 --- a/devtools/client/framework/target.js +++ b/devtools/client/framework/target.js @@ -619,6 +619,9 @@ TabTarget.prototype = { this._form = null; this._remote = null; this._root = null; + this._title = null; + this._url = null; + this.threadActor = null; }, toString: function () { diff --git a/devtools/client/framework/test/browser_toolbox_theme_registration.js b/devtools/client/framework/test/browser_toolbox_theme_registration.js index 639702153f61..7794d457cd31 100644 --- a/devtools/client/framework/test/browser_toolbox_theme_registration.js +++ b/devtools/client/framework/test/browser_toolbox_theme_registration.js @@ -78,14 +78,16 @@ add_task(function* themeInOptionsPanel() { }); add_task(function* themeUnregistration() { + let panelWin = toolbox.getCurrentPanel().panelWin; let onUnRegisteredTheme = once(gDevTools, "theme-unregistered"); + let onThemeSwitchComplete = once(panelWin, "theme-switch-complete"); gDevTools.unregisterTheme("test-theme"); yield onUnRegisteredTheme; + yield onThemeSwitchComplete; ok(!gDevTools.getThemeDefinitionMap().has("test-theme"), "theme removed from map"); - let panelWin = toolbox.getCurrentPanel().panelWin; let doc = panelWin.frameElement.contentDocument; let themeBox = doc.getElementById("devtools-theme-box"); diff --git a/devtools/client/framework/toolbox-hosts.js b/devtools/client/framework/toolbox-hosts.js index 4efc549c0fbf..ea774549a96a 100644 --- a/devtools/client/framework/toolbox-hosts.js +++ b/devtools/client/framework/toolbox-hosts.js @@ -173,6 +173,9 @@ BottomHost.prototype = { Services.prefs.setIntPref(this.heightPref, this.frame.height); this._nbox.removeChild(this._splitter); this._nbox.removeChild(this.frame); + this.frame = null; + this._nbox = null; + this._splitter = null; } return promise.resolve(null); diff --git a/devtools/client/framework/toolbox-options.js b/devtools/client/framework/toolbox-options.js index 107b654ca432..92d7218d7af6 100644 --- a/devtools/client/framework/toolbox-options.js +++ b/devtools/client/framework/toolbox-options.js @@ -98,24 +98,26 @@ OptionsPanel.prototype = { }), _addListeners: function () { - gDevTools.on("pref-changed", this._prefChanged); + Services.prefs.addObserver("devtools.cache.disabled", this._prefChanged, false); + Services.prefs.addObserver("devtools.theme", this._prefChanged, false); gDevTools.on("theme-registered", this._themeRegistered); gDevTools.on("theme-unregistered", this._themeUnregistered); }, _removeListeners: function () { - gDevTools.off("pref-changed", this._prefChanged); + Services.prefs.removeObserver("devtools.cache.disabled", this._prefChanged); + Services.prefs.removeObserver("devtools.theme", this._prefChanged); gDevTools.off("theme-registered", this._themeRegistered); gDevTools.off("theme-unregistered", this._themeUnregistered); }, - _prefChanged: function (event, data) { - if (data.pref === "devtools.cache.disabled") { + _prefChanged: function (subject, topic, prefName) { + if (prefName === "devtools.cache.disabled") { let cacheDisabled = data.newValue; let cbx = this.panelDoc.getElementById("devtools-disable-cache"); cbx.checked = cacheDisabled; - } else if (data.pref === "devtools.theme") { + } else if (prefName === "devtools.theme") { this.updateCurrentTheme(); } }, @@ -254,6 +256,7 @@ OptionsPanel.prototype = { setupThemeList: function () { let themeBox = this.panelDoc.getElementById("devtools-theme-box"); + themeBox.innerHTML = ""; let createThemeOption = theme => { let inputLabel = this.panelDoc.createElement("label"); @@ -350,11 +353,11 @@ OptionsPanel.prototype = { let themeRadioInput = themeBox.querySelector(`[value=${currentTheme}]`); if (themeRadioInput) { - themeRadioInput.click(); + themeRadioInput.checked = true; } else { // If the current theme does not exist anymore, switch to light theme let lightThemeInputRadio = themeBox.querySelector("[value=light]"); - lightThemeInputRadio.click(); + lightThemeInputRadio.checked = true; } }, diff --git a/devtools/client/framework/toolbox.js b/devtools/client/framework/toolbox.js index 7d8626b7251c..3b32312b4cdb 100644 --- a/devtools/client/framework/toolbox.js +++ b/devtools/client/framework/toolbox.js @@ -823,9 +823,7 @@ Toolbox.prototype = { button.className = "toolbox-dock-button devtools-button"; button.setAttribute("title", L10N.getStr("toolboxDockButtons." + position + ".tooltip")); - button.addEventListener("click", () => { - this.switchHost(position); - }); + button.addEventListener("click", this.switchHost.bind(this, position)); dockBox.appendChild(button); } @@ -1136,9 +1134,7 @@ Toolbox.prototype = { radio.setAttribute("icon-invertable", "dark-theme"); } - radio.addEventListener("command", () => { - this.selectTool(id); - }); + radio.addEventListener("command", this.selectTool.bind(this, id)); // spacer lets us center the image and label, while allowing cropping let spacer = this.doc.createElement("spacer"); @@ -2052,6 +2048,8 @@ Toolbox.prototype = { if (this._destroyer) { return this._destroyer; } + let deferred = defer(); + this._destroyer = deferred.promise; this.emit("destroy"); @@ -2076,13 +2074,23 @@ Toolbox.prototype = { this._saveSplitConsoleHeight(); this.webconsolePanel.removeEventListener("resize", this._saveSplitConsoleHeight); + this.webconsolePanel = null; + } + if (this.closeButton) { + this.closeButton.removeEventListener("click", this.destroy, true); + this.closeButton = null; + } + if (this.textboxContextMenuPopup) { + this.textboxContextMenuPopup.removeEventListener("popupshowing", + this._updateTextboxMenuItems, true); + this.textboxContextMenuPopup = null; + } + if (this.tabbar) { + this.tabbar.removeEventListener("focus", this._onTabbarFocus, true); + this.tabbar.removeEventListener("click", this._onTabbarFocus, true); + this.tabbar.removeEventListener("keypress", this._onTabbarArrowKeypress); + this.tabbar = null; } - this.closeButton.removeEventListener("click", this.destroy, true); - this.textboxContextMenuPopup.removeEventListener("popupshowing", - this._updateTextboxMenuItems, true); - this.tabbar.removeEventListener("focus", this._onTabbarFocus, true); - this.tabbar.removeEventListener("click", this._onTabbarFocus, true); - this.tabbar.removeEventListener("keypress", this._onTabbarArrowKeypress); let outstanding = []; for (let [id, panel] of this._toolPanels) { @@ -2137,7 +2145,7 @@ Toolbox.prototype = { // Finish all outstanding tasks (which means finish destroying panels and // then destroying the host, successfully or not) before destroying the // target. - this._destroyer = settleAll(outstanding) + deferred.resolve(settleAll(outstanding) .catch(console.error) .then(() => this.destroyHost()) .catch(console.error) @@ -2171,7 +2179,7 @@ Toolbox.prototype = { .getInterface(Ci.nsIDOMWindowUtils) .garbageCollect(); } - }).then(null, console.error); + }).then(null, console.error)); let leakCheckObserver = ({wrappedJSObject: barrier}) => { // Make the leak detector wait until this toolbox is properly destroyed. diff --git a/devtools/client/inspector/components/test/head.js b/devtools/client/inspector/components/test/head.js index a39f4d57d850..fa86b5e9e179 100644 --- a/devtools/client/inspector/components/test/head.js +++ b/devtools/client/inspector/components/test/head.js @@ -16,36 +16,23 @@ registerCleanupFunction(() => { Services.prefs.clearUserPref("devtools.toolbox.footer.height"); }); -/** - * Simple DOM node accesor function that takes either a node or a string css - * selector as argument and returns the corresponding node - * FIXME: Delete this function and use inspector/test/head.js' getNode instead, - * and fix all box model view tests to use nodeFronts instead of CPOWs. - * @param {String|DOMNode} nodeOrSelector - * @return {DOMNode} - */ -function getNode(nodeOrSelector) { - return typeof nodeOrSelector === "string" ? - content.document.querySelector(nodeOrSelector) : - nodeOrSelector; -} - /** * Highlight a node and set the inspector's current selection to the node or * the first match of the given css selector. - * @param {String|DOMNode} nodeOrSelector + * @param {String|NodeFront} selectorOrNodeFront + * The selector for the node to be set, or the nodeFront * @param {InspectorPanel} inspector * The instance of InspectorPanel currently loaded in the toolbox * @return a promise that resolves when the inspector is updated with the new * node */ -function selectAndHighlightNode(nodeOrSelector, inspector) { - info("Highlighting and selecting the node " + nodeOrSelector); +function* selectAndHighlightNode(selectorOrNodeFront, inspector) { + info("Highlighting and selecting the node " + selectorOrNodeFront); - let node = getNode(nodeOrSelector); + let nodeFront = yield getNodeFront(selectorOrNodeFront, inspector); let updated = inspector.toolbox.once("highlighter-ready"); - inspector.selection.setNode(node, "test-highlight"); - return updated; + inspector.selection.setNodeFront(nodeFront, "test-highlight"); + yield updated; } /** diff --git a/devtools/client/inspector/rules/test/doc_frame_script.js b/devtools/client/inspector/rules/test/doc_frame_script.js index a851cac43b0b..88da043f1dc8 100644 --- a/devtools/client/inspector/rules/test/doc_frame_script.js +++ b/devtools/client/inspector/rules/test/doc_frame_script.js @@ -16,10 +16,9 @@ // // Some listeners do not send a response message back. -var {classes: Cc, interfaces: Ci, utils: Cu} = Components; +var {utils: Cu} = Components; var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {}); -var {isContentStylesheet} = require("devtools/shared/inspector/css-logic"); var defer = require("devtools/shared/defer"); /** @@ -49,32 +48,6 @@ addMessageListener("Test:GetRulePropertyValue", function (msg) { sendAsyncMessage("Test:GetRulePropertyValue", value); }); -/** - * Get information about all the stylesheets that contain rules that apply to - * a given node. The information contains the sheet href and whether or not the - * sheet is a content sheet or not - * @param {Object} objects Expects a 'target' CPOW object - * @return {Array} A list of stylesheet info objects - */ -addMessageListener("Test:GetStyleSheetsInfoForNode", function (msg) { - let target = msg.objects.target; - let sheets = []; - - let domUtils = Cc["@mozilla.org/inspector/dom-utils;1"] - .getService(Ci.inIDOMUtils); - let domRules = domUtils.getCSSStyleRules(target); - - for (let i = 0, n = domRules.Count(); i < n; i++) { - let sheet = domRules.GetElementAt(i).parentStyleSheet; - sheets.push({ - href: sheet.href, - isContentSheet: isContentStylesheet(sheet) - }); - } - - sendAsyncMessage("Test:GetStyleSheetsInfoForNode", sheets); -}); - /** * Get the property value from the computed style for an element. * @param {Object} data Expects a data object with the following properties diff --git a/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js b/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js index 6af39b0853e2..421a2bb47f6f 100644 --- a/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js +++ b/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js @@ -25,21 +25,19 @@ add_task(function* () { info("Checking stylesheets on HTML document"); yield addTab(TEST_URI_HTML); - let target = getNode("#target"); - let {inspector} = yield openInspector(); + let {inspector, testActor} = yield openInspector(); yield selectNode("#target", inspector); info("Checking stylesheets"); - yield checkSheets(target); + yield checkSheets("#target", testActor); info("Checking authored stylesheets"); yield addTab(TEST_URI_AUTHOR); ({inspector} = yield openInspector()); - target = getNode("#target"); yield selectNode("#target", inspector); - yield checkSheets(target); + yield checkSheets("#target", testActor); info("Checking stylesheets on XUL document"); info("Allowing XUL content"); @@ -47,10 +45,9 @@ add_task(function* () { yield addTab(TEST_URI_XUL); ({inspector} = yield openInspector()); - target = getNode("#target"); yield selectNode("#target", inspector); - yield checkSheets(target); + yield checkSheets("#target", testActor); info("Disallowing XUL content"); disallowXUL(); }); @@ -67,9 +64,8 @@ function disallowXUL() { Ci.nsIPermissionManager.DENY_ACTION); } -function* checkSheets(target) { - let sheets = yield executeInContent("Test:GetStyleSheetsInfoForNode", {}, - {target}); +function* checkSheets(targetSelector, testActor) { + let sheets = yield testActor.getStyleSheetsInfoForNode(targetSelector); for (let sheet of sheets) { if (!sheet.href || diff --git a/devtools/client/inspector/shared/test/doc_frame_script.js b/devtools/client/inspector/shared/test/doc_frame_script.js index 2668178704f9..aeb73a11527b 100644 --- a/devtools/client/inspector/shared/test/doc_frame_script.js +++ b/devtools/client/inspector/shared/test/doc_frame_script.js @@ -16,10 +16,8 @@ // // Some listeners do not send a response message back. -var {classes: Cc, interfaces: Ci, utils: Cu} = Components; - +var {utils: Cu} = Components; var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {}); -var {isContentStylesheet} = require("devtools/shared/inspector/css-logic"); var defer = require("devtools/shared/defer"); /** @@ -49,32 +47,6 @@ addMessageListener("Test:GetRulePropertyValue", function (msg) { sendAsyncMessage("Test:GetRulePropertyValue", value); }); -/** - * Get information about all the stylesheets that contain rules that apply to - * a given node. The information contains the sheet href and whether or not the - * sheet is a content sheet or not - * @param {Object} objects Expects a 'target' CPOW object - * @return {Array} A list of stylesheet info objects - */ -addMessageListener("Test:GetStyleSheetsInfoForNode", function (msg) { - let target = msg.objects.target; - let sheets = []; - - let domUtils = Cc["@mozilla.org/inspector/dom-utils;1"] - .getService(Ci.inIDOMUtils); - let domRules = domUtils.getCSSStyleRules(target); - - for (let i = 0, n = domRules.Count(); i < n; i++) { - let sheet = domRules.GetElementAt(i).parentStyleSheet; - sheets.push({ - href: sheet.href, - isContentSheet: isContentStylesheet(sheet) - }); - } - - sendAsyncMessage("Test:GetStyleSheetsInfoForNode", sheets); -}); - /** * Get the property value from the computed style for an element. * @param {Object} data Expects a data object with the following properties diff --git a/devtools/client/inspector/test/browser_inspector_initialization.js b/devtools/client/inspector/test/browser_inspector_initialization.js index fe14a29bfde0..55db060f3a2c 100644 --- a/devtools/client/inspector/test/browser_inspector_initialization.js +++ b/devtools/client/inspector/test/browser_inspector_initialization.js @@ -29,12 +29,12 @@ add_task(function* () { let tab = yield addTab(TEST_URI); let testActor = yield getTestActorWithoutToolbox(tab); - yield testToolboxInitialization(tab); + yield testToolboxInitialization(testActor, tab); yield testContextMenuInitialization(testActor); yield testContextMenuInspectorAlreadyOpen(testActor); }); -function* testToolboxInitialization(tab) { +function* testToolboxInitialization(testActor, tab) { let target = TargetFactory.forTab(tab); info("Opening inspector with gDevTools."); @@ -50,8 +50,7 @@ function* testToolboxInitialization(tab) { yield testMarkupView("p", inspector); yield testBreadcrumbs("p", inspector); - let span = getNode("span"); - span.scrollIntoView(); + yield testActor.scrollIntoView("span"); yield selectNode("span", inspector); yield testMarkupView("span", inspector); diff --git a/devtools/client/inspector/test/head.js b/devtools/client/inspector/test/head.js index 141cb5c20843..b73354352c4f 100644 --- a/devtools/client/inspector/test/head.js +++ b/devtools/client/inspector/test/head.js @@ -66,41 +66,6 @@ var navigateTo = function (toolbox, url) { return activeTab.navigateTo(url); }; -/** - * Simple DOM node accesor function that takes either a node or a string css - * selector as argument and returns the corresponding node - * @param {String|DOMNode} nodeOrSelector - * @param {Object} options - * An object containing any of the following options: - * - document: HTMLDocument that should be queried for the selector. - * Default: content.document. - * - expectNoMatch: If true and a node matches the given selector, a - * failure is logged for an unexpected match. - * If false and nothing matches the given selector, a - * failure is logged for a missing match. - * Default: false. - * @return {DOMNode} - */ -function getNode(nodeOrSelector, options = {}) { - let document = options.document || content.document; - let noMatches = !!options.expectNoMatch; - - if (typeof nodeOrSelector === "string") { - info("Looking for a node that matches selector " + nodeOrSelector); - let node = document.querySelector(nodeOrSelector); - if (noMatches) { - ok(!node, "Selector " + nodeOrSelector + " didn't match any nodes."); - } else { - ok(node, "Selector " + nodeOrSelector + " matched a node."); - } - - return node; - } - - info("Looking for a node but selector was not a string."); - return nodeOrSelector; -} - /** * Start the element picker and focus the content window. * @param {Toolbox} toolbox diff --git a/devtools/client/shared/developer-toolbar.js b/devtools/client/shared/developer-toolbar.js index f1d0ad137a95..d28089278f89 100644 --- a/devtools/client/shared/developer-toolbar.js +++ b/devtools/client/shared/developer-toolbar.js @@ -105,9 +105,8 @@ var CommandUtils = { button.setAttribute("title", command.description); } - button.addEventListener("click", () => { - requisition.updateExec(typed); - }, false); + button.addEventListener("click", + requisition.updateExec.bind(requisition, typed)); button.addEventListener("keypress", (event) => { if (ViewHelpers.isSpaceOrReturn(event)) { @@ -117,6 +116,7 @@ var CommandUtils = { }, false); // Allow the command button to be toggleable + let onChange = null; if (command.state) { button.setAttribute("autocheck", false); @@ -126,7 +126,7 @@ var CommandUtils = { * applies to. For legacy reasons the event object can also contain * a tab property. */ - let onChange = (eventName, ev) => { + onChange = (eventName, ev) => { if (ev.target == target || ev.tab == target.tab) { let updateChecked = (checked) => { @@ -155,12 +155,14 @@ var CommandUtils = { command.state.onChange(target, onChange); onChange("", { target: target }); - document.defaultView.addEventListener("unload", () => { - if (command.state.offChange) { - command.state.offChange(target, onChange); - } - }, false); - } + }; + document.defaultView.addEventListener("unload", function (event) { + if (onChange && command.state.offChange) { + command.state.offChange(target, onChange); + } + button.remove(); + button = null; + }, { once: true }); requisition.clear(); diff --git a/devtools/client/shared/test/test-actor.js b/devtools/client/shared/test/test-actor.js index f9a1c3ae3a91..554d7b8065c5 100644 --- a/devtools/client/shared/test/test-actor.js +++ b/devtools/client/shared/test/test-actor.js @@ -10,6 +10,7 @@ var { Cc, Ci, Cu, Cr } = require("chrome"); const {getRect, getElementFromPoint, getAdjustedQuads} = require("devtools/shared/layout/utils"); const defer = require("devtools/shared/defer"); const {Task} = require("devtools/shared/task"); +const {isContentStylesheet} = require("devtools/shared/inspector/css-logic"); var DOMUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils); var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"] .getService(Ci.mozIJSSubScriptLoader); @@ -144,6 +145,12 @@ var testSpec = protocol.generateActorSpec({ }, response: {} }, + scrollIntoView: { + request: { + args: Arg(0, "string") + }, + response: {} + }, hasPseudoClassLock: { request: { selector: Arg(0, "string"), @@ -260,6 +267,14 @@ var testSpec = protocol.generateActorSpec({ response: { value: RetVal("json") } + }, + getStyleSheetsInfoForNode: { + request: { + selector: Arg(0, "string") + }, + response: { + value: RetVal("json") + } } } }); @@ -498,6 +513,15 @@ var TestActor = exports.TestActor = protocol.ActorClassWithSpec(testSpec, { EventUtils.synthesizeKey(key, options, this.content); }, + /** + * Scroll an element into view. + * @param {String} selector The selector for the node to scroll into view. + */ + scrollIntoView: function (selector) { + let node = this._querySelector(selector); + node.scrollIntoView(); + }, + /** * Check that an element currently has a pseudo-class lock. * @param {String} selector The node selector to get the pseudo-class from @@ -725,6 +749,32 @@ var TestActor = exports.TestActor = protocol.ActorClassWithSpec(testSpec, { } return info; + }, + + /** + * Get information about the stylesheets which have CSS rules that apply to a given DOM + * element, identified by a selector. + * @param {String} selector The CSS selector to get the node (can be an array + * of selectors to get elements in an iframe). + * @return {Array} A list of stylesheet objects, each having the following properties: + * - {String} href. + * - {Boolean} isContentSheet. + */ + getStyleSheetsInfoForNode: function (selector) { + let node = this._querySelector(selector); + let domRules = DOMUtils.getCSSStyleRules(node); + + let sheets = []; + + for (let i = 0, n = domRules.Count(); i < n; i++) { + let sheet = domRules.GetElementAt(i).parentStyleSheet; + sheets.push({ + href: sheet.href, + isContentSheet: isContentStylesheet(sheet) + }); + } + + return sheets; } }); diff --git a/devtools/client/shared/theme-switching.js b/devtools/client/shared/theme-switching.js index 3ff5662c033c..92aa0076af5b 100644 --- a/devtools/client/shared/theme-switching.js +++ b/devtools/client/shared/theme-switching.js @@ -27,6 +27,7 @@ } let devtoolsStyleSheets = new WeakMap(); + let gOldTheme = ""; function forceStyle() { let computedStyle = window.getComputedStyle(documentElement); @@ -83,10 +84,12 @@ * Apply all the sheets from `newTheme` and remove all of the sheets * from `oldTheme` */ - function switchTheme(newTheme, oldTheme) { - if (newTheme === oldTheme) { + function switchTheme(newTheme) { + if (newTheme === gOldTheme) { return; } + let oldTheme = gOldTheme; + gOldTheme = newTheme; let oldThemeDef = gDevTools.getThemeDefinition(oldTheme); let newThemeDef = gDevTools.getThemeDefinition(newTheme); @@ -156,10 +159,8 @@ }, console.error.bind(console)); } - function handlePrefChange(event, data) { - if (data.pref == "devtools.theme") { - switchTheme(data.newValue, data.oldValue); - } + function handlePrefChange() { + switchTheme(Services.prefs.getCharPref("devtools.theme")); } const { classes: Cc, interfaces: Ci, utils: Cu } = Components; @@ -174,10 +175,10 @@ } else { switchTheme(Services.prefs.getCharPref("devtools.theme")); - gDevTools.on("pref-changed", handlePrefChange); + Services.prefs.addObserver("devtools.theme", handlePrefChange, false); window.addEventListener("unload", function () { - gDevTools.off("pref-changed", handlePrefChange); - }); + Services.prefs.removeObserver("devtools.theme", handlePrefChange); + }, { once: true }); } watchCSS(window); diff --git a/devtools/client/webconsole/panel.js b/devtools/client/webconsole/panel.js index 9d3a63d386e5..3e3a4f4b988d 100644 --- a/devtools/client/webconsole/panel.js +++ b/devtools/client/webconsole/panel.js @@ -107,7 +107,11 @@ WebConsolePanel.prototype = { } this._destroyer = this.hud.destroy(); - this._destroyer.then(() => this.emit("destroyed")); + this._destroyer.then(() => { + this._frameWindow = null; + this._toolbox = null; + this.emit("destroyed"); + }); return this._destroyer; }, diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index 34a348795e4f..c06443911634 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -223,7 +223,23 @@ public: // Event handlers for various events. // Return true if the event is handled by this state object. - virtual bool HandleDormant(bool aDormant) { return false; } + virtual bool HandleDormant(bool aDormant) + { + if (!aDormant) { + return true; + } + mMaster->mQueuedSeek.mTarget = + SeekTarget(mMaster->mCurrentPosition, + SeekTarget::Accurate, + MediaDecoderEventVisibility::Suppressed); + // SeekJob asserts |mTarget.IsValid() == !mPromise.IsEmpty()| so we + // need to create the promise even it is not used at all. + RefPtr unused = + mMaster->mQueuedSeek.mPromise.Ensure(__func__); + SetState(DECODER_STATE_DORMANT); + return true; + } + virtual bool HandleCDMProxyReady() { return false; } protected: @@ -408,6 +424,15 @@ public: { return DECODER_STATE_DORMANT; } + + bool HandleDormant(bool aDormant) override + { + if (!aDormant) { + // Exit dormant state. + SetState(DECODER_STATE_DECODING_METADATA); + } + return true; + } }; class MediaDecoderStateMachine::DecodingFirstFrameState @@ -459,6 +484,26 @@ public: { return DECODER_STATE_SEEKING; } + + bool HandleDormant(bool aDormant) override + { + if (!aDormant) { + return true; + } + MOZ_ASSERT(!mMaster->mQueuedSeek.Exists()); + MOZ_ASSERT(mMaster->mCurrentSeek.Exists()); + // Because both audio and video decoders are going to be reset in this + // method later, we treat a VideoOnly seek task as a normal Accurate + // seek task so that while it is resumed, both audio and video playback + // are handled. + if (mMaster->mCurrentSeek.mTarget.IsVideoOnly()) { + mMaster->mCurrentSeek.mTarget.SetType(SeekTarget::Accurate); + mMaster->mCurrentSeek.mTarget.SetVideoOnly(false); + } + mMaster->mQueuedSeek = Move(mMaster->mCurrentSeek); + SetState(DECODER_STATE_DORMANT); + return true; + } }; class MediaDecoderStateMachine::BufferingState @@ -530,6 +575,11 @@ public: { return DECODER_STATE_SHUTDOWN; } + + bool HandleDormant(bool aDormant) override + { + return true; + } }; #define INIT_WATCHABLE(name, val) \ @@ -1317,20 +1367,33 @@ MediaDecoderStateMachine::MaybeStartBuffering() MOZ_ASSERT(mSentFirstFrameLoadedEvent); MOZ_ASSERT(mState == DECODER_STATE_DECODING); - if (mPlayState == MediaDecoder::PLAY_STATE_PLAYING && - mResource->IsExpectingMoreData()) { - bool shouldBuffer; - if (mReader->UseBufferingHeuristics()) { - shouldBuffer = HasLowDecodedData(EXHAUSTED_DATA_MARGIN_USECS) && - (JustExitedQuickBuffering() || HasLowUndecodedData()); - } else { - MOZ_ASSERT(mReader->IsWaitForDataSupported()); - shouldBuffer = (OutOfDecodedAudio() && mReader->IsWaitingAudioData()) || - (OutOfDecodedVideo() && mReader->IsWaitingVideoData()); - } - if (shouldBuffer) { - SetState(DECODER_STATE_BUFFERING); - } + // Don't enter buffering when MediaDecoder is not playing. + if (mPlayState != MediaDecoder::PLAY_STATE_PLAYING) { + return; + } + + // Don't enter buffering while prerolling so that the decoder has a chance to + // enqueue some decoded data before we give up and start buffering. + if (!IsPlaying()) { + return; + } + + // No more data to download. No need to enter buffering. + if (!mResource->IsExpectingMoreData()) { + return; + } + + bool shouldBuffer; + if (mReader->UseBufferingHeuristics()) { + shouldBuffer = HasLowDecodedData(EXHAUSTED_DATA_MARGIN_USECS) && + (JustExitedQuickBuffering() || HasLowUndecodedData()); + } else { + MOZ_ASSERT(mReader->IsWaitForDataSupported()); + shouldBuffer = (OutOfDecodedAudio() && mReader->IsWaitingAudioData()) || + (OutOfDecodedVideo() && mReader->IsWaitingVideoData()); + } + if (shouldBuffer) { + SetState(DECODER_STATE_BUFFERING); } } @@ -1488,51 +1551,7 @@ void MediaDecoderStateMachine::SetDormant(bool aDormant) { MOZ_ASSERT(OnTaskQueue()); - - if (IsShutdown()) { - return; - } - - if (mStateObj->HandleDormant(aDormant)) { - return; - } - - bool wasDormant = mState == DECODER_STATE_DORMANT; - if (wasDormant == aDormant) { - return; - } - - DECODER_LOG("SetDormant=%d", aDormant); - - // Enter dormant state. - if (aDormant) { - if (mState == DECODER_STATE_SEEKING) { - MOZ_ASSERT(!mQueuedSeek.Exists()); - MOZ_ASSERT(mCurrentSeek.Exists()); - // Because both audio and video decoders are going to be reset in this - // method later, we treat a VideoOnly seek task as a normal Accurate - // seek task so that while it is resumed, both audio and video playback - // are handled. - if (mCurrentSeek.mTarget.IsVideoOnly()) { - mCurrentSeek.mTarget.SetType(SeekTarget::Accurate); - mCurrentSeek.mTarget.SetVideoOnly(false); - } - mQueuedSeek = Move(mCurrentSeek); - } else { - mQueuedSeek.mTarget = SeekTarget(mCurrentPosition, - SeekTarget::Accurate, - MediaDecoderEventVisibility::Suppressed); - // SeekJob asserts |mTarget.IsValid() == !mPromise.IsEmpty()| so we - // need to create the promise even it is not used at all. - RefPtr unused = mQueuedSeek.mPromise.Ensure(__func__); - } - - SetState(DECODER_STATE_DORMANT); - return; - } - - // Exit dormant state. - SetState(DECODER_STATE_DECODING_METADATA); + mStateObj->HandleDormant(aDormant); } RefPtr diff --git a/image/test/reftest/reftest-stylo.list b/image/test/reftest/reftest-stylo.list index 97294c75b28a..8c76cce79998 100644 --- a/image/test/reftest/reftest-stylo.list +++ b/image/test/reftest/reftest-stylo.list @@ -37,7 +37,7 @@ skip-if(B2G) include pngsuite-zlib/reftest-stylo.list #skip-if(Android) include bmp/reftest-stylo.list # ICO tests -skip-if(Android) include ico/reftest-stylo.list +#skip-if(Android) include ico/reftest-stylo.list # JPEG tests # include jpeg/reftest-stylo.list diff --git a/js/xpconnect/src/XPCCallContext.cpp b/js/xpconnect/src/XPCCallContext.cpp index b7bc4bc3072a..14626baf361f 100644 --- a/js/xpconnect/src/XPCCallContext.cpp +++ b/js/xpconnect/src/XPCCallContext.cpp @@ -199,6 +199,7 @@ XPCCallContext::SystemIsBeingShutDown() NS_WARNING("Shutting Down XPConnect even through there is a live XPCCallContext"); mXPCJSContext = nullptr; mState = SYSTEM_SHUTDOWN; + mSet = nullptr; mInterface = nullptr; if (mPrevCallContext) diff --git a/js/xpconnect/src/XPCInlines.h b/js/xpconnect/src/XPCInlines.h index a060e2e83eea..c060da4c506e 100644 --- a/js/xpconnect/src/XPCInlines.h +++ b/js/xpconnect/src/XPCInlines.h @@ -446,18 +446,6 @@ XPCNativeSet::MatchesSetUpToInterface(const XPCNativeSet* other, return false; } -inline void XPCNativeSet::Mark() -{ - mMarked = 1; -} - -#ifdef DEBUG -inline void XPCNativeSet::ASSERT_NotMarked() -{ - MOZ_ASSERT(!IsMarked(), "bad"); -} -#endif - /***************************************************************************/ inline diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index 91bbfca44ed0..aa282ac5d748 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -784,19 +784,6 @@ XPCJSContext::FinalizeCallback(JSFreeOp* fop, MOZ_ASSERT(!self->mGCIsRunning, "bad state"); self->mGCIsRunning = true; - // We use this occasion to mark and sweep NativeInterfaces, - // NativeSets, and the WrappedNativeJSClasses... - - // Do the marking... - XPCWrappedNativeScope::MarkAllWrappedNativesAndProtos(); - - // Mark the sets used in the call contexts. There is a small - // chance that a wrapper's set will change *while* a call is - // happening which uses that wrapper's old interfface set. So, - // we need to do this marking to avoid collecting those sets - // that might no longer be otherwise reachable from the wrappers - // or the wrapperprotos. - // Skip this part if XPConnect is shutting down. We get into // bad locking problems with the thread iteration otherwise. if (!nsXPConnect::XPConnect()->IsShuttingDown()) { @@ -804,57 +791,8 @@ XPCJSContext::FinalizeCallback(JSFreeOp* fop, // Mark those AutoMarkingPtr lists! if (AutoMarkingPtr* roots = Get()->mAutoRoots) roots->MarkAfterJSFinalizeAll(); - - XPCCallContext* ccxp = XPCJSContext::Get()->GetCallContext(); - while (ccxp) { - // Deal with the strictness of callcontext that - // complains if you ask for a set when - // it is in a state where the set could not - // possibly be valid. - if (ccxp->CanGetSet()) { - XPCNativeSet* set = ccxp->GetSet(); - if (set) - set->Mark(); - } - ccxp = ccxp->GetPrevCallContext(); - } } - // Do the sweeping. During a zone GC, only WrappedNativeProtos in - // collected zones will be marked. Therefore, some reachable - // NativeInterfaces will not be marked, so it is not safe to sweep - // them. We still need to unmark them, since the ones pointed to by - // WrappedNativeProtos in a zone being collected will be marked. - // - // Ideally, if NativeInterfaces from different zones were kept - // separate, we could sweep only the ones belonging to zones being - // collected. Currently, though, NativeInterfaces are shared between - // zones. This ought to be fixed. - bool doSweep = !isZoneGC; - - if (doSweep) { - for (auto i = self->mClassInfo2NativeSetMap->Iter(); !i.Done(); i.Next()) { - auto entry = static_cast(i.Get()); - if (!entry->value->IsMarked()) - i.Remove(); - } - } - - for (auto i = self->mNativeSetMap->Iter(); !i.Done(); i.Next()) { - auto entry = static_cast(i.Get()); - XPCNativeSet* set = entry->key_value; - if (set->IsMarked()) { - set->Unmark(); - } else if (doSweep) { - XPCNativeSet::DestroyInstance(set); - i.Remove(); - } - } - -#ifdef DEBUG - XPCWrappedNativeScope::ASSERT_NoInterfaceSetsAreMarked(); -#endif - // Now we are going to recycle any unused WrappedNativeTearoffs. // We do this by iterating all the live callcontexts // and marking the tearoffs in use. And then we diff --git a/js/xpconnect/src/XPCMaps.cpp b/js/xpconnect/src/XPCMaps.cpp index 7f44648f0f9b..6e86b0795d9d 100644 --- a/js/xpconnect/src/XPCMaps.cpp +++ b/js/xpconnect/src/XPCMaps.cpp @@ -201,6 +201,33 @@ IID2NativeInterfaceMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) /***************************************************************************/ // implement ClassInfo2NativeSetMap... +// static +bool ClassInfo2NativeSetMap::Entry::Match(const PLDHashEntryHdr* aEntry, + const void* aKey) +{ + return static_cast(aEntry)->key == aKey; +} + +// static +void ClassInfo2NativeSetMap::Entry::Clear(PLDHashTable* aTable, + PLDHashEntryHdr* aEntry) +{ + auto entry = static_cast(aEntry); + NS_RELEASE(entry->value); + + entry->key = nullptr; + entry->value = nullptr; +} + +const PLDHashTableOps ClassInfo2NativeSetMap::Entry::sOps = +{ + PLDHashTable::HashVoidPtrKeyStub, + Match, + PLDHashTable::MoveEntryStub, + Clear, + nullptr +}; + // static ClassInfo2NativeSetMap* ClassInfo2NativeSetMap::newMap(int length) @@ -209,7 +236,7 @@ ClassInfo2NativeSetMap::newMap(int length) } ClassInfo2NativeSetMap::ClassInfo2NativeSetMap(int length) - : mTable(PLDHashTable::StubOps(), sizeof(Entry), length) + : mTable(&ClassInfo2NativeSetMap::Entry::sOps, sizeof(Entry), length) { } diff --git a/js/xpconnect/src/XPCMaps.h b/js/xpconnect/src/XPCMaps.h index 41f2fc8a73bd..050ee7fd05b7 100644 --- a/js/xpconnect/src/XPCMaps.h +++ b/js/xpconnect/src/XPCMaps.h @@ -278,7 +278,12 @@ public: struct Entry : public PLDHashEntryHdr { nsIClassInfo* key; - XPCNativeSet* value; + XPCNativeSet* value; // strong reference + static const PLDHashTableOps sOps; + + private: + static bool Match(const PLDHashEntryHdr* aEntry, const void* aKey); + static void Clear(PLDHashTable* aTable, PLDHashEntryHdr* aEntry); }; static ClassInfo2NativeSetMap* newMap(int length); @@ -298,7 +303,7 @@ public: if (entry->key) return entry->value; entry->key = info; - entry->value = set; + NS_ADDREF(entry->value = set); return set; } @@ -310,8 +315,6 @@ public: inline uint32_t Count() { return mTable.EntryCount(); } - PLDHashTable::Iterator Iter() { return mTable.Iter(); } - // ClassInfo2NativeSetMap holds pointers to *some* XPCNativeSets. // So we don't want to count those XPCNativeSets, because they are better // counted elsewhere (i.e. in XPCJSContext::mNativeSetMap, which holds diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index 7cdb128625d6..5b30425c066c 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -431,15 +431,15 @@ XPCWrappedNative::GetNewOrUsed(xpcObjectHelper& helper, if (!iface) iface = XPCNativeInterface::GetISupports(); - AutoMarkingNativeSetPtr set(cx); XPCNativeSetKey key(iface); - set = XPCNativeSet::GetNewOrUsed(&key); + RefPtr set = + XPCNativeSet::GetNewOrUsed(&key); if (!set) return NS_ERROR_FAILURE; - wrapper = - new XPCWrappedNative(helper.forgetCanonical(), Scope, set); + wrapper = new XPCWrappedNative(helper.forgetCanonical(), Scope, + set.forget()); } MOZ_ASSERT(!xpc::WrapperFactory::IsXrayWrapper(parent), @@ -566,7 +566,7 @@ XPCWrappedNative::XPCWrappedNative(already_AddRefed&& aIdentity, // This ctor is used if this object will NOT have a proto. XPCWrappedNative::XPCWrappedNative(already_AddRefed&& aIdentity, XPCWrappedNativeScope* aScope, - XPCNativeSet* aSet) + already_AddRefed&& aSet) : mMaybeScope(TagScope(aScope)), mSet(aSet), @@ -578,7 +578,7 @@ XPCWrappedNative::XPCWrappedNative(already_AddRefed&& aIdentity, mFlatJSObject.setFlags(FLAT_JS_OBJECT_VALID); MOZ_ASSERT(aScope, "bad ctor param"); - MOZ_ASSERT(aSet, "bad ctor param"); + MOZ_ASSERT(mSet, "bad ctor param"); } XPCWrappedNative::~XPCWrappedNative() @@ -1014,16 +1014,14 @@ private: bool XPCWrappedNative::ExtendSet(XPCNativeInterface* aInterface) { - AutoJSContext cx; - if (!mSet->HasInterface(aInterface)) { - AutoMarkingNativeSetPtr newSet(cx); XPCNativeSetKey key(mSet, aInterface); - newSet = XPCNativeSet::GetNewOrUsed(&key); + RefPtr newSet = + XPCNativeSet::GetNewOrUsed(&key); if (!newSet) return false; - mSet = newSet; + mSet = newSet.forget(); } return true; } @@ -2164,7 +2162,7 @@ NS_IMETHODIMP XPCWrappedNative::DebugDump(int16_t depth) if (depth && mSet) mSet->DebugDump(depth); else - XPC_LOG_ALWAYS(("mSet @ %x", mSet)); + XPC_LOG_ALWAYS(("mSet @ %x", mSet.get())); XPC_LOG_ALWAYS(("mFlatJSObject of %x", mFlatJSObject.getPtr())); XPC_LOG_ALWAYS(("mIdentity of %x", mIdentity.get())); diff --git a/js/xpconnect/src/XPCWrappedNativeInfo.cpp b/js/xpconnect/src/XPCWrappedNativeInfo.cpp index 2e08f3d04a77..302454fb53d0 100644 --- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp +++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp @@ -462,13 +462,21 @@ XPCNativeSetKey::Hash() const /***************************************************************************/ // XPCNativeSet +XPCNativeSet::~XPCNativeSet() +{ + // Remove |this| before we clear the interfaces to ensure that the + // hashtable look up is correct. + XPCJSContext::Get()->GetNativeSetMap()->Remove(this); + + for (int i = 0; i < mInterfaceCount; i++) { + NS_RELEASE(mInterfaces[i]); + } +} + // static -XPCNativeSet* +already_AddRefed XPCNativeSet::GetNewOrUsed(const nsIID* iid) { - AutoJSContext cx; - AutoMarkingNativeSetPtr set(cx); - RefPtr iface = XPCNativeInterface::GetNewOrUsed(iid); if (!iface) @@ -481,10 +489,10 @@ XPCNativeSet::GetNewOrUsed(const nsIID* iid) if (!map) return nullptr; - set = map->Find(&key); + RefPtr set = map->Find(&key); if (set) - return set; + return set.forget(); set = NewInstance({iface.forget()}); if (!set) @@ -492,29 +500,25 @@ XPCNativeSet::GetNewOrUsed(const nsIID* iid) if (!map->AddNew(&key, set)) { NS_ERROR("failed to add our set!"); - DestroyInstance(set); set = nullptr; } - return set; + return set.forget(); } // static -XPCNativeSet* +already_AddRefed XPCNativeSet::GetNewOrUsed(nsIClassInfo* classInfo) { - AutoJSContext cx; - AutoMarkingNativeSetPtr set(cx); XPCJSContext* xpccx = XPCJSContext::Get(); - ClassInfo2NativeSetMap* map = xpccx->GetClassInfo2NativeSetMap(); if (!map) return nullptr; - set = map->Find(classInfo); + RefPtr set = map->Find(classInfo); if (set) - return set; + return set.forget(); nsIID** iidArray = nullptr; uint32_t iidCount = 0; @@ -567,14 +571,12 @@ XPCNativeSet::GetNewOrUsed(nsIClassInfo* classInfo) XPCNativeSet* set2 = map2->Add(&key, set); if (!set2) { NS_ERROR("failed to add our set!"); - DestroyInstance(set); set = nullptr; goto out; } // It is okay to find an existing entry here because // we did not look for one before we called Add(). if (set2 != set) { - DestroyInstance(set); set = set2; } } @@ -596,7 +598,7 @@ out: if (iidArray) NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(iidCount, iidArray); - return set; + return set.forget(); } // static @@ -610,20 +612,17 @@ XPCNativeSet::ClearCacheEntryForClassInfo(nsIClassInfo* classInfo) } // static -XPCNativeSet* +already_AddRefed XPCNativeSet::GetNewOrUsed(XPCNativeSetKey* key) { - AutoJSContext cx; - AutoMarkingNativeSetPtr set(cx); - XPCJSContext* xpccx = XPCJSContext::Get(); - NativeSetMap* map = xpccx->GetNativeSetMap(); + NativeSetMap* map = XPCJSContext::Get()->GetNativeSetMap(); if (!map) return nullptr; - set = map->Find(key); + RefPtr set = map->Find(key); if (set) - return set; + return set.forget(); if (key->GetBaseSet()) set = NewInstanceMutate(key); @@ -635,15 +634,14 @@ XPCNativeSet::GetNewOrUsed(XPCNativeSetKey* key) if (!map->AddNew(key, set)) { NS_ERROR("failed to add our set!"); - DestroyInstance(set); set = nullptr; } - return set; + return set.forget(); } // static -XPCNativeSet* +already_AddRefed XPCNativeSet::GetNewOrUsed(XPCNativeSet* firstSet, XPCNativeSet* secondSet, bool preserveFirstSetOrder) @@ -658,12 +656,12 @@ XPCNativeSet::GetNewOrUsed(XPCNativeSet* firstSet, // If everything in secondSet was a duplicate, we can just use the first // set. if (uniqueCount == firstSet->mInterfaceCount) - return firstSet; + return RefPtr(firstSet).forget(); // If the secondSet is just a superset of the first, we can use it provided // that the caller doesn't care about ordering. if (!preserveFirstSetOrder && uniqueCount == secondSet->mInterfaceCount) - return secondSet; + return RefPtr(secondSet).forget(); // Ok, darn. Now we have to make a new set. // @@ -672,7 +670,7 @@ XPCNativeSet::GetNewOrUsed(XPCNativeSet* firstSet, // a lot of stuff assumes that sets are created by adding one interface to an // existing set. So let's just do the slow and easy thing and hope that the // above optimizations handle the common cases. - XPCNativeSet* currentSet = firstSet; + RefPtr currentSet = firstSet; for (uint32_t i = 0; i < secondSet->mInterfaceCount; ++i) { XPCNativeInterface* iface = secondSet->mInterfaces[i]; if (!currentSet->HasInterface(iface)) { @@ -686,11 +684,11 @@ XPCNativeSet::GetNewOrUsed(XPCNativeSet* firstSet, // We've got the union set. Hand it back to the caller. MOZ_ASSERT(currentSet->mInterfaceCount == uniqueCount); - return currentSet; + return currentSet.forget(); } // static -XPCNativeSet* +already_AddRefed XPCNativeSet::NewInstance(nsTArray>&& array) { if (array.Length() == 0) @@ -715,7 +713,7 @@ XPCNativeSet::NewInstance(nsTArray>&& array) if (slots > 1) size += (slots - 1) * sizeof(XPCNativeInterface*); void* place = new char[size]; - XPCNativeSet* obj = new(place) XPCNativeSet(); + RefPtr obj = new(place) XPCNativeSet(); // Stick the nsISupports in front and skip additional nsISupport(s) XPCNativeInterface** outp = (XPCNativeInterface**) &obj->mInterfaces; @@ -733,11 +731,11 @@ XPCNativeSet::NewInstance(nsTArray>&& array) obj->mMemberCount = memberCount; obj->mInterfaceCount = slots; - return obj; + return obj.forget(); } // static -XPCNativeSet* +already_AddRefed XPCNativeSet::NewInstanceMutate(XPCNativeSetKey* key) { XPCNativeSet* otherSet = key->GetBaseSet(); @@ -753,7 +751,7 @@ XPCNativeSet::NewInstanceMutate(XPCNativeSetKey* key) int size = sizeof(XPCNativeSet); size += otherSet->mInterfaceCount * sizeof(XPCNativeInterface*); void* place = new char[size]; - XPCNativeSet* obj = new(place) XPCNativeSet(); + RefPtr obj = new(place) XPCNativeSet(); obj->mMemberCount = otherSet->GetMemberCount() + newInterface->GetMemberCount(); @@ -766,7 +764,7 @@ XPCNativeSet::NewInstanceMutate(XPCNativeSetKey* key) } NS_ADDREF(*dest++ = newInterface); - return obj; + return obj.forget(); } // static diff --git a/js/xpconnect/src/XPCWrappedNativeProto.cpp b/js/xpconnect/src/XPCWrappedNativeProto.cpp index 53da674bcee3..825ae45f96c6 100644 --- a/js/xpconnect/src/XPCWrappedNativeProto.cpp +++ b/js/xpconnect/src/XPCWrappedNativeProto.cpp @@ -17,7 +17,7 @@ int32_t XPCWrappedNativeProto::gDEBUG_LiveProtoCount = 0; XPCWrappedNativeProto::XPCWrappedNativeProto(XPCWrappedNativeScope* Scope, nsIClassInfo* ClassInfo, - XPCNativeSet* Set) + already_AddRefed&& Set) : mScope(Scope), mJSProtoObject(nullptr), mClassInfo(ClassInfo), @@ -166,12 +166,11 @@ XPCWrappedNativeProto::GetNewOrUsed(XPCWrappedNativeScope* scope, if (proto) return proto; - AutoMarkingNativeSetPtr set(cx); - set = XPCNativeSet::GetNewOrUsed(classInfo); + RefPtr set = XPCNativeSet::GetNewOrUsed(classInfo); if (!set) return nullptr; - proto = new XPCWrappedNativeProto(scope, classInfo, set); + proto = new XPCWrappedNativeProto(scope, classInfo, set.forget()); if (!proto || !proto->Init(scriptableCreateInfo, callPostCreatePrototype)) { delete proto.get(); @@ -193,7 +192,7 @@ XPCWrappedNativeProto::DebugDump(int16_t depth) XPC_LOG_ALWAYS(("gDEBUG_LiveProtoCount is %d", gDEBUG_LiveProtoCount)); XPC_LOG_ALWAYS(("mScope @ %x", mScope)); XPC_LOG_ALWAYS(("mJSProtoObject @ %x", mJSProtoObject.get())); - XPC_LOG_ALWAYS(("mSet @ %x", mSet)); + XPC_LOG_ALWAYS(("mSet @ %x", mSet.get())); XPC_LOG_ALWAYS(("mScriptableInfo @ %x", mScriptableInfo)); if (depth && mScriptableInfo) { XPC_LOG_INDENT(); diff --git a/js/xpconnect/src/XPCWrappedNativeScope.cpp b/js/xpconnect/src/XPCWrappedNativeScope.cpp index 6b82c27477f9..63252ec6b96b 100644 --- a/js/xpconnect/src/XPCWrappedNativeScope.cpp +++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp @@ -574,42 +574,6 @@ XPCWrappedNativeScope::UpdateWeakPointersAfterGC(XPCJSContext* cx) } } -// static -void -XPCWrappedNativeScope::MarkAllWrappedNativesAndProtos() -{ - for (XPCWrappedNativeScope* cur = gScopes; cur; cur = cur->mNext) { - for (auto i = cur->mWrappedNativeMap->Iter(); !i.Done(); i.Next()) { - auto entry = static_cast(i.Get()); - entry->value->Mark(); - } - // We need to explicitly mark all the protos too because some protos may be - // alive in the hashtable but not currently in use by any wrapper - for (auto i = cur->mWrappedNativeProtoMap->Iter(); !i.Done(); i.Next()) { - auto entry = static_cast(i.Get()); - entry->value->Mark(); - } - } -} - -#ifdef DEBUG -// static -void -XPCWrappedNativeScope::ASSERT_NoInterfaceSetsAreMarked() -{ - for (XPCWrappedNativeScope* cur = gScopes; cur; cur = cur->mNext) { - for (auto i = cur->mWrappedNativeMap->Iter(); !i.Done(); i.Next()) { - auto entry = static_cast(i.Get()); - entry->value->ASSERT_SetsNotMarked(); - } - for (auto i = cur->mWrappedNativeProtoMap->Iter(); !i.Done(); i.Next()) { - auto entry = static_cast(i.Get()); - entry->value->ASSERT_SetNotMarked(); - } - } -} -#endif - // static void XPCWrappedNativeScope::SweepAllWrappedNativeTearOffs() diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index c4922b3bfa3a..3a317435d3c7 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -793,7 +793,7 @@ private: XPCNativeScriptableInfo* mScriptableInfo; - XPCNativeSet* mSet; + RefPtr mSet; RefPtr mInterface; XPCNativeMember* mMember; @@ -928,14 +928,6 @@ public: static void SuspectAllWrappers(XPCJSContext* cx, nsCycleCollectionNoteRootCallback& cb); - static void - MarkAllWrappedNativesAndProtos(); - -#ifdef DEBUG - static void - ASSERT_NoInterfaceSetsAreMarked(); -#endif - static void SweepAllWrappedNativeTearOffs(); @@ -1281,7 +1273,7 @@ private: // It represents a new XPCNativeSet we are considering constructing, without // requiring that the set actually be built. -class XPCNativeSetKey final +class MOZ_STACK_CLASS XPCNativeSetKey final { public: // This represents an existing set |baseSet|. @@ -1314,8 +1306,8 @@ public: // Allow shallow copy private: - XPCNativeSet* mBaseSet; - XPCNativeInterface* mAddition; + RefPtr mBaseSet; + RefPtr mAddition; }; /***************************************************************************/ @@ -1324,9 +1316,12 @@ private: class XPCNativeSet final { public: - static XPCNativeSet* GetNewOrUsed(const nsIID* iid); - static XPCNativeSet* GetNewOrUsed(nsIClassInfo* classInfo); - static XPCNativeSet* GetNewOrUsed(XPCNativeSetKey* key); + NS_INLINE_DECL_REFCOUNTING_WITH_DESTROY(XPCNativeSet, + DestroyInstance(this)) + + static already_AddRefed GetNewOrUsed(const nsIID* iid); + static already_AddRefed GetNewOrUsed(nsIClassInfo* classInfo); + static already_AddRefed GetNewOrUsed(XPCNativeSetKey* key); // This generates a union set. // @@ -1335,9 +1330,9 @@ class XPCNativeSet final // algorithm is applied; but if we detect that |secondSet| is a superset of // |firstSet|, we return |secondSet| without worrying about whether the // ordering might differ from |firstSet|. - static XPCNativeSet* GetNewOrUsed(XPCNativeSet* firstSet, - XPCNativeSet* secondSet, - bool preserveFirstSetOrder); + static already_AddRefed GetNewOrUsed(XPCNativeSet* firstSet, + XPCNativeSet* secondSet, + bool preserveFirstSetOrder); static void ClearCacheEntryForClassInfo(nsIClassInfo* classInfo); @@ -1377,50 +1372,25 @@ class XPCNativeSet final inline bool MatchesSetUpToInterface(const XPCNativeSet* other, XPCNativeInterface* iface) const; - inline void Mark(); - - // NOP. This is just here to make the AutoMarkingPtr code compile. - inline void TraceJS(JSTracer* trc) {} - inline void AutoTrace(JSTracer* trc) {} - - public: - void Unmark() { - mMarked = 0; - } - bool IsMarked() const { - return !!mMarked; - } - -#ifdef DEBUG - inline void ASSERT_NotMarked(); -#endif - void DebugDump(int16_t depth); - static void DestroyInstance(XPCNativeSet* inst); - size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf); protected: - static XPCNativeSet* NewInstance(nsTArray>&& array); - static XPCNativeSet* NewInstanceMutate(XPCNativeSetKey* key); + static already_AddRefed NewInstance(nsTArray>&& array); + static already_AddRefed NewInstanceMutate(XPCNativeSetKey* key); + XPCNativeSet() - : mMemberCount(0), mInterfaceCount(0), mMarked(0) - { - MOZ_COUNT_CTOR(XPCNativeSet); - } - ~XPCNativeSet() { - for (int i = 0; i < mInterfaceCount; i++) { - NS_RELEASE(mInterfaces[i]); - } - MOZ_COUNT_DTOR(XPCNativeSet); - } + : mMemberCount(0), mInterfaceCount(0) + {} + ~XPCNativeSet(); void* operator new(size_t, void* p) CPP_THROW_NEW {return p;} + static void DestroyInstance(XPCNativeSet* inst); + private: uint16_t mMemberCount; - uint16_t mInterfaceCount : 15; - uint16_t mMarked : 1; + uint16_t mInterfaceCount; // Always last - object sized for array. // These are strong references. XPCNativeInterface* mInterfaces[1]; @@ -1653,10 +1623,6 @@ public: } void TraceInside(JSTracer* trc) { - if (trc->isMarkingTracer()) { - mSet->Mark(); - } - GetScope()->TraceSelf(trc); } @@ -1672,14 +1638,9 @@ public: } // NOP. This is just here to make the AutoMarkingPtr code compile. + void Mark() const {} inline void AutoTrace(JSTracer* trc) {} - void Mark() const {mSet->Mark();} - -#ifdef DEBUG - void ASSERT_SetNotMarked() const {mSet->ASSERT_NotMarked();} -#endif - ~XPCWrappedNativeProto(); protected: @@ -1690,7 +1651,7 @@ protected: // hide ctor XPCWrappedNativeProto(XPCWrappedNativeScope* Scope, nsIClassInfo* ClassInfo, - XPCNativeSet* Set); + already_AddRefed&& Set); bool Init(const XPCNativeScriptableCreateInfo* scriptableCreateInfo, bool callPostCreatePrototype); @@ -1704,7 +1665,7 @@ private: XPCWrappedNativeScope* mScope; JS::ObjectPtr mJSProtoObject; nsCOMPtr mClassInfo; - XPCNativeSet* mSet; + RefPtr mSet; XPCNativeScriptableInfo* mScriptableInfo; }; @@ -1856,7 +1817,7 @@ public: GetSet() const {return mSet;} void - SetSet(XPCNativeSet* set) {mSet = set;} + SetSet(already_AddRefed set) {mSet = set;} static XPCWrappedNative* Get(JSObject* obj) { MOZ_ASSERT(IS_WN_REFLECTOR(obj)); @@ -1931,16 +1892,9 @@ public: nsresult* pError = nullptr); XPCWrappedNativeTearOff* FindTearOff(const nsIID& iid); - void Mark() const - { - mSet->Mark(); - if (HasProto()) GetProto()->Mark(); - } + void Mark() const {} inline void TraceInside(JSTracer* trc) { - if (trc->isMarkingTracer()) { - mSet->Mark(); - } if (HasProto()) GetProto()->TraceSelf(trc); else @@ -1969,12 +1923,6 @@ public: TraceSelf(trc); } -#ifdef DEBUG - void ASSERT_SetsNotMarked() const - {mSet->ASSERT_NotMarked(); - if (HasProto()){GetProto()->ASSERT_SetNotMarked();}} -#endif - inline void SweepTearOffs(); // Returns a string that shuld be free'd using JS_smprintf_free (or null). @@ -1999,7 +1947,7 @@ protected: // This ctor is used if this object will NOT have a proto. XPCWrappedNative(already_AddRefed&& aIdentity, XPCWrappedNativeScope* aScope, - XPCNativeSet* aSet); + already_AddRefed&& aSet); virtual ~XPCWrappedNative(); void Destroy(); @@ -2035,7 +1983,7 @@ private: XPCWrappedNativeScope* mMaybeScope; XPCWrappedNativeProto* mMaybeProto; }; - XPCNativeSet* mSet; + RefPtr mSet; JS::TenuredHeap mFlatJSObject; XPCNativeScriptableInfo* mScriptableInfo; XPCWrappedNativeTearOff mFirstTearOff; @@ -2881,7 +2829,6 @@ class TypedAutoMarkingPtr : public AutoMarkingPtr T* mPtr; }; -typedef TypedAutoMarkingPtr AutoMarkingNativeSetPtr; typedef TypedAutoMarkingPtr AutoMarkingWrappedNativePtr; typedef TypedAutoMarkingPtr AutoMarkingWrappedNativeTearOffPtr; typedef TypedAutoMarkingPtr AutoMarkingWrappedNativeProtoPtr; diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index dace26632c8b..4596451c57df 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -313,12 +313,12 @@ WrapperFactory::PrepareForWrapping(JSContext* cx, HandleObject scope, // give the destination object the union of the two native sets. We try // to do this cleverly in the common case to avoid too much overhead. XPCWrappedNative* newwn = XPCWrappedNative::Get(obj); - XPCNativeSet* unionSet = XPCNativeSet::GetNewOrUsed(newwn->GetSet(), - wn->GetSet(), false); + RefPtr unionSet = XPCNativeSet::GetNewOrUsed(newwn->GetSet(), + wn->GetSet(), false); if (!unionSet) { return; } - newwn->SetSet(unionSet); + newwn->SetSet(unionSet.forget()); retObj.set(waive ? WaiveXray(cx, obj) : obj); } diff --git a/layout/reftests/bugs/reftest-stylo.list b/layout/reftests/bugs/reftest-stylo.list index f1ac8db6dedf..c9e58ef5befb 100644 --- a/layout/reftests/bugs/reftest-stylo.list +++ b/layout/reftests/bugs/reftest-stylo.list @@ -1073,7 +1073,7 @@ fails skip == 403656-4.html 403656-4.html #== 403657-1.html 403657-1.html # Fails depending on the fonts... == 403733-1.html 403733-1.html -== 403962-1.xhtml 403962-1.xhtml +skip == 403962-1.xhtml 403962-1.xhtml == 404030-1.html 404030-1.html == 404030-1-notref.html 404030-1-notref.html == 404030-1-notref2.html 404030-1-notref2.html diff --git a/layout/reftests/css-display/reftest-stylo.list b/layout/reftests/css-display/reftest-stylo.list index 84f495da2dbf..8f7e66498b2e 100644 --- a/layout/reftests/css-display/reftest-stylo.list +++ b/layout/reftests/css-display/reftest-stylo.list @@ -9,7 +9,7 @@ random pref(layout.css.display-contents.enabled,true) == display-contents-acid-d pref(layout.css.display-contents.enabled,true) == display-contents-generated-content.html display-contents-generated-content.html pref(layout.css.display-contents.enabled,true) == display-contents-generated-content-2.html display-contents-generated-content-2.html pref(layout.css.display-contents.enabled,true) == display-contents-style-inheritance-1.html display-contents-style-inheritance-1.html -pref(layout.css.display-contents.enabled,true) == display-contents-style-inheritance-1-stylechange.html display-contents-style-inheritance-1-stylechange.html +skip pref(layout.css.display-contents.enabled,true) == display-contents-style-inheritance-1-stylechange.html display-contents-style-inheritance-1-stylechange.html skip pref(layout.css.display-contents.enabled,true) fuzzy-if(winWidget,12,100) == display-contents-style-inheritance-1-dom-mutations.html display-contents-style-inheritance-1-dom-mutations.html pref(layout.css.display-contents.enabled,true) == display-contents-tables.xhtml display-contents-tables.xhtml pref(layout.css.display-contents.enabled,true) == display-contents-tables-2.xhtml display-contents-tables-2.xhtml diff --git a/layout/reftests/css-grid/reftest-stylo.list b/layout/reftests/css-grid/reftest-stylo.list index 95c2c36ee14a..70fa86a7411b 100644 --- a/layout/reftests/css-grid/reftest-stylo.list +++ b/layout/reftests/css-grid/reftest-stylo.list @@ -40,10 +40,10 @@ skip-if(Android) == grid-placement-definite-implicit-001.html grid-placement-def == grid-placement-definite-implicit-002.html grid-placement-definite-implicit-002.html skip-if(Android) fuzzy-if(winWidget,1,32) == grid-placement-auto-implicit-001.html grid-placement-auto-implicit-001.html == grid-placement-abspos-implicit-001.html grid-placement-abspos-implicit-001.html -pref(layout.css.vertical-text.enabled,true) == rtl-grid-placement-definite-001.html rtl-grid-placement-definite-001.html -pref(layout.css.vertical-text.enabled,true) == rtl-grid-placement-auto-row-sparse-001.html rtl-grid-placement-auto-row-sparse-001.html -pref(layout.css.vertical-text.enabled,true) == vlr-grid-placement-auto-row-sparse-001.html vlr-grid-placement-auto-row-sparse-001.html -pref(layout.css.vertical-text.enabled,true) == vrl-grid-placement-auto-row-sparse-001.html vrl-grid-placement-auto-row-sparse-001.html +== rtl-grid-placement-definite-001.html rtl-grid-placement-definite-001.html +== rtl-grid-placement-auto-row-sparse-001.html rtl-grid-placement-auto-row-sparse-001.html +== vlr-grid-placement-auto-row-sparse-001.html vlr-grid-placement-auto-row-sparse-001.html +== vrl-grid-placement-auto-row-sparse-001.html vrl-grid-placement-auto-row-sparse-001.html == grid-relpos-items-001.html grid-relpos-items-001.html == grid-item-sizing-percent-001.html grid-item-sizing-percent-001.html == grid-item-sizing-px-001.html grid-item-sizing-px-001.html diff --git a/layout/reftests/css-ruby/reftest-stylo.list b/layout/reftests/css-ruby/reftest-stylo.list index 89bb83d7f364..1ed58bea4fed 100644 --- a/layout/reftests/css-ruby/reftest-stylo.list +++ b/layout/reftests/css-ruby/reftest-stylo.list @@ -48,8 +48,8 @@ skip load nested-ruby-1.html == ruby-align-2.html ruby-align-2.html == ruby-align-2a.html ruby-align-2a.html == ruby-position-horizontal.html ruby-position-horizontal.html -pref(layout.css.vertical-text.enabled,true) == ruby-position-vertical-lr.html ruby-position-vertical-lr.html -pref(layout.css.vertical-text.enabled,true) == ruby-position-vertical-rl.html ruby-position-vertical-rl.html +== ruby-position-vertical-lr.html ruby-position-vertical-lr.html +== ruby-position-vertical-rl.html ruby-position-vertical-rl.html == ruby-reflow-1-opaqueruby.html ruby-reflow-1-opaqueruby.html fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),13,1) == ruby-reflow-1-transparentruby.html ruby-reflow-1-transparentruby.html == ruby-span-1.html ruby-span-1.html diff --git a/layout/reftests/floats/reftest-stylo.list b/layout/reftests/floats/reftest-stylo.list index 5abc994dbc8d..d93517f22ed7 100644 --- a/layout/reftests/floats/reftest-stylo.list +++ b/layout/reftests/floats/reftest-stylo.list @@ -59,7 +59,7 @@ fails fuzzy-if(skiaContent,1,12000) == float-in-rtl-4d.html float-in-rtl-4d.html # XXX The default-preferences setting here can be removed after the # pref has been made true by default for all channels (bug 1138384). -default-preferences pref(layout.css.vertical-text.enabled,true) + == float-in-rtl-vlr-1a.html float-in-rtl-vlr-1a.html == float-in-rtl-vlr-1b.html float-in-rtl-vlr-1b.html diff --git a/layout/reftests/forms/input/number/reftest-stylo.list b/layout/reftests/forms/input/number/reftest-stylo.list index 75520f595f8a..8a10476d790c 100644 --- a/layout/reftests/forms/input/number/reftest-stylo.list +++ b/layout/reftests/forms/input/number/reftest-stylo.list @@ -14,8 +14,8 @@ skip-if(!Android&&!B2G&&!Mulet) == number-same-as-text-unthemed.html number-same # should look the same as type=text, except for the spin box skip == number-similar-to-text-unthemed.html number-similar-to-text-unthemed.html skip == number-similar-to-text-unthemed-rtl.html number-similar-to-text-unthemed-rtl.html -skip pref(layout.css.vertical-text.enabled,true) == number-similar-to-text-unthemed-vertical-lr.html number-similar-to-text-unthemed-vertical-lr.html -skip pref(layout.css.vertical-text.enabled,true) == number-similar-to-text-unthemed-vertical-rl.html number-similar-to-text-unthemed-vertical-rl.html +skip == number-similar-to-text-unthemed-vertical-lr.html number-similar-to-text-unthemed-vertical-lr.html +skip == number-similar-to-text-unthemed-vertical-rl.html number-similar-to-text-unthemed-vertical-rl.html # dynamic type changes: fuzzy-if(/^Windows\x20NT\x205\.1/.test(http.oscpu),64,4) fuzzy-if(cocoaWidget,63,4) fuzzy-if(skiaContent,2,5) == to-number-from-other-type-unthemed-1.html to-number-from-other-type-unthemed-1.html diff --git a/layout/reftests/forms/input/range/reftest-stylo.list b/layout/reftests/forms/input/range/reftest-stylo.list index 2a3b2c7c9402..776a29fb289b 100644 --- a/layout/reftests/forms/input/range/reftest-stylo.list +++ b/layout/reftests/forms/input/range/reftest-stylo.list @@ -37,7 +37,7 @@ fails-if(B2G||Mulet||Android) == moz-range-progress-1.html moz-range-progress-1. # Tests for block and inline orientation in combination with writing-mode # XXX Remove default-preferences setting here after bug 1138384 makes # it the default for all channels -default-preferences pref(layout.css.vertical-text.enabled,true) + == range-orient-horizontal.html range-orient-horizontal.html == range-orient-horizontal.html range-orient-horizontal.html == range-orient-block.html range-orient-block.html diff --git a/layout/reftests/forms/meter/reftest-stylo.list b/layout/reftests/forms/meter/reftest-stylo.list index 607d003c0851..ef10df30d1b7 100644 --- a/layout/reftests/forms/meter/reftest-stylo.list +++ b/layout/reftests/forms/meter/reftest-stylo.list @@ -32,7 +32,7 @@ include default-style/reftest-stylo.list # Tests for block and inline orientation in combination with writing-mode # XXX Remove default-preferences setting here after bug 1138384 makes # it the default for all channels -default-preferences pref(layout.css.vertical-text.enabled,true) + == meter-orient-vertical.html meter-orient-vertical.html == meter-orient-horizontal.html meter-orient-horizontal.html == meter-orient-block.html meter-orient-block.html diff --git a/layout/reftests/forms/progress/reftest-stylo.list b/layout/reftests/forms/progress/reftest-stylo.list index b9765881eabd..5019c4486212 100644 --- a/layout/reftests/forms/progress/reftest-stylo.list +++ b/layout/reftests/forms/progress/reftest-stylo.list @@ -31,7 +31,7 @@ skip-if(B2G||Mulet) == bar-pseudo-element-vertical.html bar-pseudo-element-verti # Tests for block and inline orientation in combination with writing-mode # XXX Remove default-preferences setting here after bug 1138384 makes # it the default for all channels -default-preferences pref(layout.css.vertical-text.enabled,true) + == progress-orient-horizontal.html progress-orient-horizontal.html skip == progress-orient-vertical.html progress-orient-vertical.html # only OS X currently has direction-dependent rendering here diff --git a/layout/reftests/svg/text/reftest-stylo.list b/layout/reftests/svg/text/reftest-stylo.list index bd6fa5167317..68f6a9819a39 100644 --- a/layout/reftests/svg/text/reftest-stylo.list +++ b/layout/reftests/svg/text/reftest-stylo.list @@ -132,7 +132,7 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||/^Windows\x20NT\x206\.[12]/ == text-shadow.svg text-shadow.svg # vertical text -pref(layout.css.vertical-text.enabled,true) == vertical-01.svg vertical-01.svg +== vertical-01.svg vertical-01.svg # tests for ignoring various properties == ignore-border.svg ignore-border.svg diff --git a/layout/reftests/text-overflow/reftest-stylo.list b/layout/reftests/text-overflow/reftest-stylo.list index 9289ea298bd8..c7d990f43adf 100644 --- a/layout/reftests/text-overflow/reftest-stylo.list +++ b/layout/reftests/text-overflow/reftest-stylo.list @@ -44,11 +44,11 @@ skip-if(Android||B2G||Mulet) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,12352) HTTP(..) == combobox-zoom.html combobox-zoom.html # The vertical-text pref setting can be removed after bug 1138384 lands -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-1.html vertical-decorations-1.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-2.html vertical-decorations-2.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-1.html vertical-decorations-1.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-2.html vertical-decorations-2.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-3.html vertical-decorations-3.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-4.html vertical-decorations-4.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-3.html vertical-decorations-3.html -pref(layout.css.vertical-text.enabled,true) == vertical-decorations-4.html vertical-decorations-4.html +== vertical-decorations-1.html vertical-decorations-1.html +== vertical-decorations-2.html vertical-decorations-2.html +== vertical-decorations-1.html vertical-decorations-1.html +== vertical-decorations-2.html vertical-decorations-2.html +== vertical-decorations-3.html vertical-decorations-3.html +== vertical-decorations-4.html vertical-decorations-4.html +== vertical-decorations-3.html vertical-decorations-3.html +== vertical-decorations-4.html vertical-decorations-4.html diff --git a/layout/reftests/w3c-css/submitted/flexbox/reftest-stylo.list b/layout/reftests/w3c-css/submitted/flexbox/reftest-stylo.list index 6b1ab116c18b..41635050dc4e 100644 --- a/layout/reftests/w3c-css/submitted/flexbox/reftest-stylo.list +++ b/layout/reftests/w3c-css/submitted/flexbox/reftest-stylo.list @@ -195,12 +195,12 @@ random == flexbox-mbp-horiz-002b.xhtml flexbox-mbp-horiz-002b.xhtml == flexbox-with-pseudo-elements-003.html flexbox-with-pseudo-elements-003.html # Tests for combined influence of 'writing-mode' & 'direction' on flex axes -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-001.html flexbox-writing-mode-001.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-002.html flexbox-writing-mode-002.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-003.html flexbox-writing-mode-003.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-004.html flexbox-writing-mode-004.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-005.html flexbox-writing-mode-005.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-006.html flexbox-writing-mode-006.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-007.html flexbox-writing-mode-007.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-008.html flexbox-writing-mode-008.html -test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-009.html flexbox-writing-mode-009.html +== flexbox-writing-mode-001.html flexbox-writing-mode-001.html +== flexbox-writing-mode-002.html flexbox-writing-mode-002.html +== flexbox-writing-mode-003.html flexbox-writing-mode-003.html +== flexbox-writing-mode-004.html flexbox-writing-mode-004.html +== flexbox-writing-mode-005.html flexbox-writing-mode-005.html +== flexbox-writing-mode-006.html flexbox-writing-mode-006.html +== flexbox-writing-mode-007.html flexbox-writing-mode-007.html +== flexbox-writing-mode-008.html flexbox-writing-mode-008.html +== flexbox-writing-mode-009.html flexbox-writing-mode-009.html diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/reftest-stylo.list b/layout/reftests/w3c-css/submitted/text-decor-3/reftest-stylo.list index 683393365036..7792a22e7ec0 100644 --- a/layout/reftests/w3c-css/submitted/text-decor-3/reftest-stylo.list +++ b/layout/reftests/w3c-css/submitted/text-decor-3/reftest-stylo.list @@ -1,5 +1,5 @@ # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -default-preferences pref(layout.css.vertical-text.enabled,true) + == ruby-text-decoration-01.html ruby-text-decoration-01.html == text-decoration-propagation-01.html text-decoration-propagation-01.html diff --git a/layout/reftests/writing-mode/abspos/reftest-stylo.list b/layout/reftests/writing-mode/abspos/reftest-stylo.list index 928d0f07bdeb..8874e96efd91 100644 --- a/layout/reftests/writing-mode/abspos/reftest-stylo.list +++ b/layout/reftests/writing-mode/abspos/reftest-stylo.list @@ -2,7 +2,7 @@ # This directory contains tests for position:absolute and vertical writing modes. # They require the vertical-text pref to be true, otherwise lots of them will fail. # (See bug 1079151 for the origin of these testcases by GĂ©rard Talbot.) -default-preferences pref(layout.css.vertical-text.enabled,true) + # All of these are fuzzy-if on skia content on OS X due to subpixel text positioning. fails fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) fuzzy-if(skiaContent,255,248) == s71-abs-pos-non-replaced-vlr-003.xht s71-abs-pos-non-replaced-vlr-003.xht diff --git a/layout/reftests/writing-mode/reftest-stylo.list b/layout/reftests/writing-mode/reftest-stylo.list index 96c379f203b1..5574d9b5b0b3 100644 --- a/layout/reftests/writing-mode/reftest-stylo.list +++ b/layout/reftests/writing-mode/reftest-stylo.list @@ -1,7 +1,7 @@ # DO NOT EDIT! This is a auto-generated temporary list for Stylo testing # This directory contains tests for vertical text and logical layout coordinates. # They require the vertical-text pref to be true, otherwise lots of them will fail. -default-preferences pref(layout.css.vertical-text.enabled,true) + HTTP(..) == 1079154-1-vertical-rl-columns.html 1079154-1-vertical-rl-columns.html == 1082844.html 1082844.html diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/UnusedResourcesUtil.java b/mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java similarity index 100% rename from mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/UnusedResourcesUtil.java rename to mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index d0cb0c118abd..814bc655641e 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -11,21 +11,24 @@ CONFIGURE_SUBST_FILES += ['adjust_sdk_app_token'] include('android-services.mozbuild') geckoview_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/main/' +geckoview_thirdparty_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/thirdparty/' thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/' constants_jar = add_java_jar('constants') -constants_jar.sources = ['java/org/mozilla/gecko/' + x for x in [ - 'adjust/AdjustHelperInterface.java', - 'adjust/AttributionHelperListener.java', +constants_jar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x for x in [ 'annotation/JNITarget.java', 'annotation/ReflectionTarget.java', 'annotation/RobocopTarget.java', 'annotation/WebRTCJNITarget.java', 'annotation/WrapForJNI.java', + 'SysInfo.java', +]] +constants_jar.sources += ['java/org/mozilla/gecko/' + x for x in [ + 'adjust/AdjustHelperInterface.java', + 'adjust/AttributionHelperListener.java', 'db/BrowserContract.java', 'LocaleManager.java', 'Locales.java', - 'SysInfo.java', ]] constants_jar.generated_sources = [ 'preprocessed/org/mozilla/gecko/AdjustConstants.java', @@ -289,10 +292,10 @@ gvjar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x 'widget/SwipeDismissListViewTouchListener.java', ]] -gvjar.sources += [thirdparty_source_dir + f for f in [ - 'com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java', - 'com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java', - 'com/googlecode/eyesfree/braille/selfbraille/WriteData.java', +gvjar.sources += [geckoview_thirdparty_source_dir + f for f in [ + 'java/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java', + 'java/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java', + 'java/com/googlecode/eyesfree/braille/selfbraille/WriteData.java', ]] gvjar.extra_jars += [ diff --git a/mobile/android/base/java/org/mozilla/gecko/SysInfo.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/SysInfo.java similarity index 100% rename from mobile/android/base/java/org/mozilla/gecko/SysInfo.java rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/SysInfo.java diff --git a/mobile/android/base/java/org/mozilla/gecko/annotation/JNITarget.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/JNITarget.java similarity index 100% rename from mobile/android/base/java/org/mozilla/gecko/annotation/JNITarget.java rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/JNITarget.java diff --git a/mobile/android/base/java/org/mozilla/gecko/annotation/ReflectionTarget.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/ReflectionTarget.java similarity index 100% rename from mobile/android/base/java/org/mozilla/gecko/annotation/ReflectionTarget.java rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/ReflectionTarget.java diff --git a/mobile/android/base/java/org/mozilla/gecko/annotation/RobocopTarget.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/RobocopTarget.java similarity index 100% rename from mobile/android/base/java/org/mozilla/gecko/annotation/RobocopTarget.java rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/RobocopTarget.java diff --git a/mobile/android/base/java/org/mozilla/gecko/annotation/WebRTCJNITarget.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/WebRTCJNITarget.java similarity index 100% rename from mobile/android/base/java/org/mozilla/gecko/annotation/WebRTCJNITarget.java rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/WebRTCJNITarget.java diff --git a/mobile/android/base/java/org/mozilla/gecko/annotation/WrapForJNI.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/WrapForJNI.java similarity index 100% rename from mobile/android/base/java/org/mozilla/gecko/annotation/WrapForJNI.java rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/annotation/WrapForJNI.java diff --git a/mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java b/mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java similarity index 100% rename from mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java rename to mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java diff --git a/mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java b/mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java similarity index 100% rename from mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java rename to mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java diff --git a/mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/WriteData.java b/mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/WriteData.java similarity index 100% rename from mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/WriteData.java rename to mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/WriteData.java diff --git a/mobile/android/thirdparty/build.gradle b/mobile/android/thirdparty/build.gradle index a3af5492a294..bf95958609f3 100644 --- a/mobile/android/thirdparty/build.gradle +++ b/mobile/android/thirdparty/build.gradle @@ -25,6 +25,8 @@ android { manifest.srcFile 'AndroidManifest.xml' java { srcDir '.' + srcDir "${topsrcdir}/mobile/android/geckoview/src/thirdparty/java" + if (!mozconfig.substs.MOZ_INSTALL_TRACKING) { exclude 'com/adjust/**' } diff --git a/testing/mozharness/scripts/get_apk.py b/testing/mozharness/scripts/get_apk.py index 977003e17478..a53046e4e5ff 100644 --- a/testing/mozharness/scripts/get_apk.py +++ b/testing/mozharness/scripts/get_apk.py @@ -17,7 +17,6 @@ from mozharness.base.script import ScriptMixin class GetAPK(BaseScript, VirtualenvMixin): all_actions = [ 'create-virtualenv', - "test", 'download-apk' ] @@ -37,6 +36,18 @@ class GetAPK(BaseScript, VirtualenvMixin): "help": "Specify version number to download (e.g. 23.0b7)", "default": "None" }], + [["--latest-nightly"], { + "dest": "latest_nightly", + "help": "Download the latest nightly version", + "action": "store_true", + "default": False + }], + [["--latest-aurora"], { + "dest": "latest_aurora", + "help": "Download the latest aurora version", + "action": "store_true", + "default": False + }], [["--arch"], { "dest": "arch", "help": "Specify which architecture to get the apk for", @@ -57,7 +68,7 @@ class GetAPK(BaseScript, VirtualenvMixin): arch_values = ["arm", "x86"] multi_api_archs = ["arm"] - multi_apis = ["api-15"] # v11 has been dropped in fx 46 (1155801) + multi_apis = ["api-15"] # v11 has been dropped in fx 46 (1155801) # v9 has been dropped in fx 48 (1220184) download_dir = "apk-download" @@ -66,6 +77,9 @@ class GetAPK(BaseScript, VirtualenvMixin): checksums_ext = ".checksums" android_prefix = "android-" + base_url = "https://ftp.mozilla.org/pub/mobile" + json_version_url = "https://product-details.mozilla.org/1.0/firefox_versions.json" + # Cleanup half downloaded files on Ctrl+C def signal_handler(self, signal, frame): print("You pressed Ctrl+C!") @@ -112,7 +126,8 @@ class GetAPK(BaseScript, VirtualenvMixin): if self.config["version"] == "None": if self.config["clean"]: sys.exit(0) - self.fatal("Version is required") + if self.config["version"] != "None" and (self.config["latest_nightly"] or self.config["latest_aurora"]): + self.fatal("Cannot set a version and --latest-nightly or --latest-aurora") if self.config["arch"] not in self.arch_values and not self.config["arch"] == "all": error = self.config["arch"] + " is not a valid arch. " \ @@ -122,6 +137,9 @@ class GetAPK(BaseScript, VirtualenvMixin): error += "Or don't use the --arch option to download all the archs" self.fatal(error) + if self.config["latest_nightly"] and self.config["latest_aurora"]: + self.fatal("Conflicting options. Cannot use --latest-nightly with --latest-aurora") + # Checksum check the APK def check_apk(self, apk_file, checksum_file): self.info("The checksum for the APK is being checked....") @@ -139,9 +157,12 @@ class GetAPK(BaseScript, VirtualenvMixin): # Helper functions def generate_url(self, version, build, locale, api_suffix, arch_file): - return "https://ftp.mozilla.org/pub/mozilla.org/mobile/candidates/" + version + "-candidates/build" + build + \ - "/" + self.android_prefix + api_suffix + "/" + locale + "/fennec-" + version + "." + locale + \ - "." + self.android_prefix + arch_file + if self.config["latest_nightly"] or self.config["latest_aurora"]: + code = "central" if self.config["latest_nightly"] else "aurora" + return ("%s/nightly/latest-mozilla-%s-android-%s/fennec-%s.%s.android-%s") % (self.base_url, code, api_suffix, version, locale, arch_file) + + return ("%s/candidates/%s-candidates/build%s/%s%s/%s/fennec-%s.%s.%s%s") % (self.base_url, version, build, self.android_prefix, api_suffix, locale, version, locale, self.android_prefix, arch_file) + def get_api_suffix(self, arch): if arch in self.multi_api_archs: @@ -178,14 +199,23 @@ class GetAPK(BaseScript, VirtualenvMixin): filename_apk = os.path.join(self.download_dir, filename + self.apk_ext) filename_checksums = os.path.join(self.download_dir, filename + self.checksums_ext) + # Download the APK retry_config = {'attempts': 1, 'cleanup': self.download_error} ScriptMixin.download_file(self, apk_url, filename_apk, retry_config=retry_config) + # Download the checksum of the APK retry_config = {'attempts': 1, 'cleanup': self.download_error} ScriptMixin.download_file(self, checksum_url, filename_checksums, retry_config=retry_config) self.check_apk(filename_apk, filename_checksums) + def get_version_name(self): + if self.config["latest_nightly"] or self.config["latest_aurora"]: + json = self.load_json_url(self.json_version_url) + version_code = json['FIREFOX_NIGHTLY'] if self.config["latest_nightly"] else json['FIREFOX_AURORA'] + return version_code + return self.config["version"] + # Download all the archs if none is given def download_all(self, version, build, locale): for arch in self.arch_values: @@ -194,7 +224,7 @@ class GetAPK(BaseScript, VirtualenvMixin): # Download apk initial action def download_apk(self): self.check_argument() - version = self.config["version"] + version = self.get_version_name() arch = self.config["arch"] build = str(self.config["build"]) locale = self.config["locale"] @@ -225,8 +255,9 @@ class GetAPK(BaseScript, VirtualenvMixin): url = self.generate_url("43.0", "2", "multi", "x86", "i386") correcturl = "https://ftp.mozilla.org/pub/mozilla.org/mobile/candidates/43.0-candidates/build2/"\ + self.android_prefix + "x86/multi/fennec-43.0.multi." + self.android_prefix + "i386" + if not url == correcturl: - self.fatal("get_url test failed!") + self.fatal(("get_url test failed! %s != %s") % (url, correcturl)) if not self.get_api_suffix(self.multi_api_archs[0]) == self.multi_apis: self.fatal("get_api_suffix test failed!") diff --git a/tools/lint/flake8.lint b/tools/lint/flake8.lint index bc0cd76a5736..0f138a0487d1 100644 --- a/tools/lint/flake8.lint +++ b/tools/lint/flake8.lint @@ -50,9 +50,12 @@ results = [] def process_line(line): + # Escape slashes otherwise JSON conversion will not work + line = line.replace('\\', '\\\\') try: res = json.loads(line) except ValueError: + print('Non JSON output from linter, will not be processed: {}'.format(line)) return if 'code' in res: diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 60446012ee94..dd74e1c788fd 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -1096,7 +1096,7 @@ double nsWindow::GetDefaultScaleInternal() if (mDefaultScale <= 0.0) { mDefaultScale = WinUtils::LogToPhysFactor(mWnd); } - return WinUtils::LogToPhysFactor(mWnd); + return mDefaultScale; } int32_t nsWindow::LogToPhys(double aValue) @@ -2785,8 +2785,8 @@ NS_IMETHODIMP nsWindow::SetCursor(imgIContainer* aCursor, return NS_ERROR_NOT_AVAILABLE; HCURSOR cursor; - // No scaling - IntSize size(0, 0); + double scale = GetDefaultScale().scale; + IntSize size = RoundedToInt(Size(width * scale, height * scale)); rv = nsWindowGfx::CreateIcon(aCursor, true, aHotspotX, aHotspotY, size, &cursor); NS_ENSURE_SUCCESS(rv, rv);