Граф коммитов

1801 Коммитов

Автор SHA1 Сообщение Дата
Brendan Dahl 114c68f373 Bug 1482170 - Remove <Add/Remove>BroadcastListenerFor on XULDocument webidl. r=bz
These methods are only ever used in tests and no longer need to be exposed.
In test_bug445177.xul I tried to preserve more of the test, but everything
after the call to addBroadcastListenerFor is dependent on that.

MozReview-Commit-ID: C4vAxNir4O8
2018-08-15 09:14:23 -07:00
Andreea Pavel 870fc40e66 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-08-14 19:17:13 +03:00
Hiroyuki Ikezoe d1f6ab90ec Bug 1481699 - Merge two if statements for 'start-server' into a single one. r=jdescottes
And fix some log messages.
2018-08-13 06:12:55 +09:00
Csoregi Natalia 2466b82b72 Merge inbound to mozilla-central. a=merge 2018-08-13 18:42:53 +03:00
Hiroyuki Ikezoe 0381486a5f Bug 1481699 - Send host:kill command through TCP socket instead of spawning a new adb process with 'kill-server'. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D3170
2018-08-13 06:12:55 +09:00
Hiroyuki Ikezoe db4c3c99a6 Bug 1481699 - Do not process any further data after we started shutting down the ADB server. r=jdescottes
In the genuine adb binary, when it received 'host:kill' command, it exits the
server process soon [1].  Whereas, in our mock adb.py which is based on
SocketServer.TCPServer in python, when we call
SocketServer.TCPServer.shutdown() in the case of 'kill-server' command, the
server process doesn't exit soon since the shutdown() function just sets a
flag [2] and serve_forever() polls it [3] every |poll_interval| seconds,
|poll_interval| is 0.5 seconds by default.  Thus it's possible that new incoming
requests are processed during polling.

This is the real cause of the race condition that the adb server still keeps
alive when 'adb kill-server' finished.  So we don't need to the workaround
for the race condition.

[1] 4039051d6d/adb/adb.cpp (1049)
[2] 65b5ef02ec/Lib/socketserver.py (L248)
[3] https://docs.python.org/2/library/socketserver.html#SocketServer.BaseServer.serve_forever

Differential Revision: https://phabricator.services.mozilla.com/D3169
2018-08-13 06:08:34 +09:00
Hiroyuki Ikezoe 720a215841 Bug 1481699 - Send back 'OKAY' to the client when the adb server received 'kill-server' command. r=jdescottes
Because the genuine adb binary does it [1].  And doing it before shutdown
thread is created to make sure it's sent to the client.

[1] 4039051d6d/adb/adb.cpp (1055)

Differential Revision: https://phabricator.services.mozilla.com/D3168
2018-08-13 06:08:34 +09:00
Hiroyuki Ikezoe 2a0f871277 Bug 1481699 - Rename ADBServer to ADBRequestHandler. r=jdescottes
Since it's actually a child of SocketServer.BaseRequestHandler.

Differential Revision: https://phabricator.services.mozilla.com/D3167
2018-08-13 06:08:33 +09:00
Alexandre Poirot caaa9566c0 Bug 1482090 - Instanciate Debugger API in the same global as DevTools modules. r=jdescottes
MozReview-Commit-ID: LS6t5CFSVom

Differential Revision: https://phabricator.services.mozilla.com/D3006

--HG--
extra : moz-landing-system : lando
2018-08-13 12:47:40 +00:00
Alexandre Poirot 5135b70a76 Bug 1299344 - Fix exceptions when accessing DOMWindow and contentCharset when reload page against the netmonitor. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D3020

--HG--
extra : moz-landing-system : lando
2018-08-13 12:37:41 +00:00
Nicolas Chevobbe 7a43defa74 Bug 1479521 - Update tests to match the new jsterm behavior; r=Honza.
Some test were relying on the existence of the complete function
and were using it in order to do integration test.
We modify those and instead trigger real user interaction for
making those assertions.
Additional test cases are added to the test files they fit in
so we have a broader coverage of user interaction in regard
to autocompletion.

Depends on D2825

Differential Revision: https://phabricator.services.mozilla.com/D2826

--HG--
extra : moz-landing-system : lando
2018-08-13 08:37:09 +00:00
Nicolas Chevobbe 01f2cedfe4 Bug 1479521 - Refactor JsTerm autocompletion behavior; r=Honza.
We used to rely on different things to both display
the autocompletion text and accept an autocompletion.
This patches introduces new helper functions in order
to make the code more easy to reason about.
We also rollback our decision to show the popup when
there is only 1 item in the autocompletion list in
order to be more consistent with what Chrome does.

Differential Revision: https://phabricator.services.mozilla.com/D2824

--HG--
extra : moz-landing-system : lando
2018-08-13 10:07:15 +00:00
Nicholas Nethercote b9e071e2e8 Bug 1481998 - Make mozilla::Hash{Map,Set}'s entry storage allocation lazy. r=luke,sfink
Entry storage allocation now occurs on the first lookupForAdd()/put()/putNew().
This removes the need for init() and initialized(), and matches how
PLDHashTable/nsTHashtable work. It also removes the need for init() functions
in a lot of types that are built on top of mozilla::Hash{Map,Set}.

Pros:

- No need for init() calls and subsequent checks.

- No memory allocated for empty tables, which are not that uncommon.

Cons:

- An extra branch in lookup() and lookupForAdd(), but not in put()/putNew(),
  because the existing checkOverloaded() can handle it.

Specifics:

- Construction now can take a length parameter.

- init() is removed. Explicit length-setting, when necessary, now occurs in the
  constructors.

- initialized() is removed.

- capacity() now returns zero when the entry storage is absent.

- lookupForAdd() is no longer `const`, because it can instantiate the storage,
  which requires modifications.

- lookupForAdd() can now return an invalid AddPtr in two cases:

  - old: hashing failure (due to OOM in the hasher)

  - new: OOM while instantiating entry storage

  The existing failure handling paths for the old case work for the new case.

- clear(), finish(), and clearAndShrink() are replaced by clear(), compact(),
  and reserve(). The old compactIfUnderloaded() is also removed.

- Capacity computation code is now in its own functions, bestCapacity() and
  hashShift(). setTableSizeLog2() is removed.

- uint32_t is used throughout for capacities, instead of size_t, for
  consistency with other similar values.

- changeTableSize() now takes a capacity instead of a deltaLog2, and it can now
  handle !mTable.

Measurements:

- Total source code size is reduced by over 900 lines. Also, lots of existing
  lines got shorter (i.e. two checks were reduced to one).

- Executable size barely changed, down by 2 KiB on Linux64. The extra branches
  are compensated for by the lack of init() calls.

- Speed changed negligibly. The instruction count for Bench_Cpp_MozHash
  increased from 2.84 billion to 2.89 billion but any execution time change was
  well below noise.
2018-08-10 18:00:29 +10:00
Hiroyuki Ikezoe 9312c8f8ff Bug 1481691 - Unpack files only if the devtools-adb-extension versionis mismatch or there are no unpacked files. r=jdescottes
getManifestFromUnpacked() and isUnpacked() are mostly the same as they are in
binary-manager.js [1] in the adbhelper addon.  A big difference is that the
manifest.json copied from the extension is the manifest.json for the
devtools-adb-extension itself, not manifest.json(s) in a subdirectory for
each platforms (e.g. linux/manifest.json).

Due to the verion check in each xpcshell test needs to use a different version
for the test extension, otherwise subsequent tests will use unpacked files in
the first test case, thus the ADB mock won't be used at all.

[1] 0821424b6b/binary-manager.js
2018-08-10 16:57:21 +09:00
Hiroyuki Ikezoe 67bc64cb9f Bug 1481691 - Rename extractBinary to extractFiles and make it return a boolean instead of path string. r=jdescottes
In the next patch, we will extract manifest.json in the extension into the
profile directory.  And returning a boolean will make getFileForBinary()
simple with the extension version check which will be also introduced in the
next patch.
2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe e085258ff8 Bug 1481691 - Drop |sync| argument from kill() and stop(). r=jdescottes
We've been using them as synchrous mode only.
2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe 48c7716393 Bug 1481691 - Use Promise instead of PromiseUtils. r=jdescottes 2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe 0a417befc7 Bug 1481691 - Drop root relevant stuff and push and pull. r=jedescottes
As far as I can tell they were all for FirefoxOS.
2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe 9086628cb3 Bug 1481691 - Drop code for FirefoxOS. r=jdescottes 2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe 3de4909c47 Bug 1481691 - Drop code and comments for older versions of Firefox. r=jdescottes 2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe a65eb4c83e Bug 1481691 - Replace console.log and console.debug with dumpn. r=jdescottes 2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe 6f6938c775 Bug 1481691 - Add a preference for the devtools-adb-extension id. r=jdescottes 2018-08-10 16:32:20 +09:00
Nicolas Chevobbe c1e79affbb Bug 1472117 - Fix autocompletion with "." surrounded by spaces; r=bgrins.
Expressions like `window . addEventListener` are perfectly valid in JS,
but our autocompletion provider wasn't working well in such case.
We modify the JSPropertyProvider to make sure to handle this kind of
syntax and add test cases to make sure it works as intended.`

Differential Revision: https://phabricator.services.mozilla.com/D2988

--HG--
extra : moz-landing-system : lando
2018-08-14 13:40:08 +00:00
L. David Baron 09f62c0e05 Bug 1481866: Swap order of values in 'overflow' shorthand property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3069

--HG--
extra : moz-landing-system : lando
2018-08-10 02:20:53 +00:00
Tiberius Oros 4199099335 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-09 13:04:39 +03:00
Tiberius Oros aff5d4ad5d Merge inbound to mozilla-central. a=merge 2018-08-09 13:02:05 +03:00
Xidorn Quan 34de342864 Bug 1464786 - Implement flow-relative values for resize property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2908

--HG--
extra : moz-landing-system : lando
2018-08-08 23:40:06 +00:00
Daniel Varga 31ff8cd9c8 Merge mozilla-central to mozilla inbound. a=merge 2018-08-09 01:10:56 +03:00
Xidorn Quan aa0eed2685 Bug 1481781 followup - Fixup order in properties-db.js on a CLOSED TREE.
--HG--
extra : source : 278775698907f55a8874cd797483a4b54680ee85
2018-08-08 23:20:04 +10:00
Hiroyuki Ikezoe bb43bca5d4 Bug 1469054 - Skip some test cases in test_adb.js on Windows. r=jdescottes
On Windows testNoTargetBinaries fails since we don't remove extracted binaries
in the profile directory when the extension is removed.  The original adbhelper
addon doesn't remove them either, so this problem has been underlying
originally.  We will fix it in a later bug.

Also on Windows, testStartAndStop and testTrackDevices fail.  That's because,
I guess, the adb mock (adb.py) isn't launched properly.  I will handle it
once after I take a windows laptop back.

MozReview-Commit-ID: 15wo1S0pX37

--HG--
extra : rebase_source : 3a8c60c174def8f24517e10d916384c5fa5ce45c
2018-08-09 15:43:44 +09:00
Hiroyuki Ikezoe e061017292 Bug 1469054 - Make check() in adb-running-checker fail if a certain period of time elapsed. r=jdescottes
On MacOSX connecting to a port which is not started listening gets stuck
(bug 1481963), to avoid the stuck, we make forcibly the function fail.

MozReview-Commit-ID: COVplVPx3vA

--HG--
extra : rebase_source : 2f048e8e8aa7e9b9212c6cfa31f3589b73e0087c
2018-08-09 15:43:44 +09:00
Hiroyuki Ikezoe cc02c63e27 Bug 1469054 - Make sure the ADB server is ready to listen from clients when we call adb.start(). r=jdescottes
There is a race condition that when we adb.start() finishes, i.e. the ADB server
is launched, the ADB server is not ready to listen from clients yet.  To avoid
this race condition in adb.start() function, we do wait until the server gets
ready.

MozReview-Commit-ID: EfSLA9uvhI9

--HG--
extra : rebase_source : 7b5938a3a7687e7072352aa65674631d2b1ee429
2018-08-09 15:43:39 +09:00
Hiroyuki Ikezoe ba4f116e0e Bug 1469054 - Make sure that the adb.py sends all data. r=jdescottes
It seems that, on chaos mode, we can't receive whole data set at once, i.e.
sending data will be split into some chunks, so the adb mock should check the
sent data length and if there remains still data which has to be sent, we have
to continue sending the rest of the data.

MozReview-Commit-ID: 5jeEH8KpNNW

--HG--
extra : rebase_source : 69bc849a48db649bf4f4786456464d3556a903d7
2018-08-09 14:27:57 +09:00
Hiroyuki Ikezoe 17cff22452 Bug 1469054 - ESLint: lint fix for adb-device.js. r=jdescottes
MozReview-Commit-ID: AYvHsiirrtt

--HG--
extra : rebase_source : b541f85809cb48b05f3ffe90b720ccea71db908d
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe bdd6379e19 Bug 1469054 - Adapt device.js in the adbhelper addon into devtools. r=jdescottes
The diff;
 --- /home/hiro/adbhelper/device.js	2018-07-19 06:18:41.613011481 +0900
 +++ devtools/shared/adb/adb-device.js	2018-08-06 10:18:38.808496752 +0900
 @@ -4,9 +4,7 @@

  "use strict";

 -const { ConnectionManager } =
 -  require("./devtools-require")("devtools/shared/client/connection-manager");
 -const adb = require("./adb");
 +const { ADB } = require("devtools/shared/adb/adb");

  /**
   * A Device instance is created and registered with the Devices module whenever
 @@ -21,34 +19,18 @@ function Device(id) {
  }

  Device.prototype = {
 -  /**
 -   * DEPRECATED: This is specific to how we connect to Firefox OS.  Use cases
 -   * that interact with other kinds of devices should likely use the more
 -   * general |forwardPort| method directly.
 -   */
 -  connect(remotePort) {
 -    let port = ConnectionManager.getFreeTCPPort();
 -    let local = "tcp:" + port;
 -    let remote = "localfilesystem:/data/local/debugger-socket";
 -    if (remotePort) {
 -      remote = "tcp:" + remotePort;
 -    }
 -    return adb.forwardPort(local, remote)
 -              .then(() => port);
 -  },
 -
    type: "adb",

 -  shell: adb.shell.bind(adb),
 -  forwardPort: adb.forwardPort.bind(adb),
 -  push: adb.push.bind(adb),
 -  pull: adb.pull.bind(adb),
 -  reboot: adb.reboot.bind(adb),
 -  rebootRecovery: adb.rebootRecovery.bind(adb),
 -  rebootBootloader: adb.rebootBootloader.bind(adb),
 +  shell: ADB.shell.bind(ADB),
 +  forwardPort: ADB.forwardPort.bind(ADB),
 +  push: ADB.push.bind(ADB),
 +  pull: ADB.pull.bind(ADB),
 +  reboot: ADB.reboot.bind(ADB),
 +  rebootRecovery: ADB.rebootRecovery.bind(ADB),
 +  rebootBootloader: ADB.rebootBootloader.bind(ADB),

    isRoot() {
 -    return adb.shell("id").then(stdout => {
 +    return ADB.shell("id").then(stdout => {
        if (stdout) {
          let uid = stdout.match(/uid=(\d+)/)[1];
          return uid == "0";
 @@ -58,7 +40,7 @@ Device.prototype = {
    },

    summonRoot() {
 -    return adb.root();
 +    return ADB.root();
    },

    getModel() {

MozReview-Commit-ID: FlbKPm6VDs5

--HG--
extra : rebase_source : 92a4d061963a1d261243fb6865cdeea283c8870d
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe 3f97d5b446 Bug 1469054 - ESLint: lint fix for adb-scanner.js. r=jdescottes
MozReview-Commit-ID: 9riT60wVuCe

--HG--
extra : rebase_source : 0054cb81d786d393b7f9e791ff596dc49b6fc7f4
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe e6e3bc21ae Bug 1469054 - Adapt scanner.js in the adbhelper addon into devtools. r=jdescottes
A big difference between them is ADBScanner object itself is exported instead of
exporting unregister() method, since in the new about:debugging we have a toggle
button to install the new adbhelper extension, so that we should observe
uninstalling/installing the new adbhelper extension there, which means when the
adbhelper is removed we have to unregister this scanner there.

The diff;
 --- /home/hiro/adbhelper/scanner.js	2018-08-06 09:47:24.199685034 +0900
 +++ devtools/shared/adb/adb-scanner.js	2018-08-06 11:52:05.423496900 +0900
 @@ -2,19 +2,17 @@
   * 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/. */

 -const { Cu } = require("chrome");
 -const EventEmitter =
 -  require("./devtools-require")("devtools/shared/event-emitter");
 -const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
 -const unload = require("./unload");
 +"use strict";
 +
 +const EventEmitter = require("devtools/shared/event-emitter");
  const { ConnectionManager } =
 -  require("./devtools-require")("devtools/shared/client/connection-manager");
 +  require("devtools/shared/client/connection-manager");
  const { Devices } =
 -  require("./devtools-import")("resource://devtools/shared/apps/Devices.jsm");
 -const Runtimes =
 -  require("./devtools-require")("devtools/client/webide/modules/runtimes");
 +  require("devtools/shared/apps/Devices.jsm");
 +const { RuntimeTypes } =
 +  require("devtools/client/webide/modules/runtime-types");

 -let Scanner = {
 +const ADBScanner = {

    _runtimes: [],

 @@ -41,9 +39,9 @@ let Scanner = {
        return this._updatingPromise;
      }
      this._runtimes = [];
 -    let promises = [];
 -    for (let id of Devices.available()) {
 -      let device = Devices.getByName(id);
 +    const promises = [];
 +    for (const id of Devices.available()) {
 +      const device = Devices.getByName(id);
        promises.push(this._detectRuntimes(device));
      }
      this._updatingPromise = Promise.all(promises);
 @@ -56,13 +54,13 @@ let Scanner = {
      return this._updatingPromise;
    },

 -  _detectRuntimes: Task.async(function* (device) {
 -    let model = yield device.getModel();
 -    let detectedRuntimes = yield FirefoxOSRuntime.detect(device, model);
 +  _detectRuntimes: async function(device) {
 +    const model = await device.getModel();
 +    let detectedRuntimes = await FirefoxOSRuntime.detect(device, model);
      this._runtimes.push(...detectedRuntimes);
 -    detectedRuntimes = yield FirefoxOnAndroidRuntime.detect(device, model);
 +    detectedRuntimes = await FirefoxOnAndroidRuntime.detect(device, model);
      this._runtimes.push(...detectedRuntimes);
 -  }),
 +  },

    scan() {
      return this._updateRuntimes();
 @@ -74,7 +72,7 @@ let Scanner = {

  };

 -EventEmitter.decorate(Scanner);
 +EventEmitter.decorate(ADBScanner);

  function Runtime(device, model, socketPath) {
    this.device = device;
 @@ -83,15 +81,15 @@ function Runtime(device, model, socketPa
  }

  Runtime.prototype = {
 -  type: Runtimes.RuntimeTypes.USB,
 +  type: RuntimeTypes.USB,
    connect(connection) {
 -    let port = ConnectionManager.getFreeTCPPort();
 -    let local = "tcp:" + port;
 +    const port = ConnectionManager.getFreeTCPPort();
 +    const local = "tcp:" + port;
      let remote;
      if (this._socketPath.startsWith("@")) {
 -        remote = "localabstract:" + this._socketPath.substring(1);
 +      remote = "localabstract:" + this._socketPath.substring(1);
      } else {
 -        remote = "localfilesystem:" + this._socketPath;
 +      remote = "localfilesystem:" + this._socketPath;
      }
      return this.device.forwardPort(local, remote).then(() => {
        connection.host = "localhost";
 @@ -108,26 +106,26 @@ function FirefoxOSRuntime(device, model)
    Runtime.call(this, device, model, "/data/local/debugger-socket");
  }

 -FirefoxOSRuntime.detect = Task.async(function* (device, model) {
 -  let runtimes = [];
 -  let query = "test -f /system/b2g/b2g; echo $?";
 -  let b2gExists = yield device.shell(query);
 +FirefoxOSRuntime.detect = async function(device, model) {
 +  const runtimes = [];
 +  const query = "test -f /system/b2g/b2g; echo $?";
 +  let b2gExists = await device.shell(query);
    // XXX: Sometimes we get an empty response back.  Likely a bug in our shell
    // code in this add-on.
    // There are also some Android devices that do not have `test` installed.
    for (let attempts = 3; attempts > 0; attempts--) {
 -    b2gExists = yield device.shell(query);
 +    b2gExists = await device.shell(query);
      if (b2gExists.length == 3) {
        break;
      }
    }
    if (b2gExists === "0\r\n") {
 -    let runtime = new FirefoxOSRuntime(device, model);
 +    const runtime = new FirefoxOSRuntime(device, model);
      console.log("Found " + runtime.name);
      runtimes.push(runtime);
    }
    return runtimes;
 -});
 +};

  FirefoxOSRuntime.prototype = Object.create(Runtime.prototype);

 @@ -142,28 +140,29 @@ function FirefoxOnAndroidRuntime(device,
  }

  // This requires Unix socket support from Firefox for Android (35+)
 -FirefoxOnAndroidRuntime.detect = Task.async(function* (device, model) {
 -  let runtimes = [];
 +FirefoxOnAndroidRuntime.detect = async function(device, model) {
 +  const runtimes = [];
    // A matching entry looks like:
 -  // 00000000: 00000002 00000000 00010000 0001 01 6551588 /data/data/org.mozilla.fennec/firefox-debugger-socket
 -  let query = "cat /proc/net/unix";
 -  let rawSocketInfo = yield device.shell(query);
 +  // 00000000: 00000002 00000000 00010000 0001 01 6551588
 +  //  /data/data/org.mozilla.fennec/firefox-debugger-socket
 +  const query = "cat /proc/net/unix";
 +  const rawSocketInfo = await device.shell(query);
    let socketInfos = rawSocketInfo.split(/\r?\n/);
    // Filter to lines with "firefox-debugger-socket"
    socketInfos = socketInfos.filter(l => l.includes("firefox-debugger-socket"));
    // It's possible to have multiple lines with the same path, so de-dupe them
 -  let socketPaths = new Set();
 -  for (let socketInfo of socketInfos) {
 -    let socketPath = socketInfo.split(" ").pop();
 +  const socketPaths = new Set();
 +  for (const socketInfo of socketInfos) {
 +    const socketPath = socketInfo.split(" ").pop();
      socketPaths.add(socketPath);
    }
 -  for (let socketPath of socketPaths) {
 -    let runtime = new FirefoxOnAndroidRuntime(device, model, socketPath);
 +  for (const socketPath of socketPaths) {
 +    const runtime = new FirefoxOnAndroidRuntime(device, model, socketPath);
      console.log("Found " + runtime.name);
      runtimes.push(runtime);
    }
    return runtimes;
 -});
 +};

  FirefoxOnAndroidRuntime.prototype = Object.create(Runtime.prototype);

 @@ -201,21 +200,4 @@ Object.defineProperty(FirefoxOnAndroidRu
    }
  });

 -exports.register = function() {
 -  // Only register our |Scanner| if the API exists
 -  if (Runtimes && Runtimes.RuntimeScanners) {
 -    // There may be an older ADB scanner registered by default
 -    // If so, we must disable it to avoid duplicate runtimes
 -    if (Runtimes.DeprecatedAdbScanner) {
 -      Runtimes.RuntimeScanners.remove(Runtimes.DeprecatedAdbScanner);
 -      unload(() => {
 -        Runtimes.RuntimeScanners.add(Runtimes.DeprecatedAdbScanner);
 -      });
 -    }
 -    // Add our scanner
 -    Runtimes.RuntimeScanners.add(Scanner);
 -    unload(() => {
 -      Runtimes.RuntimeScanners.remove(Scanner);
 -    });
 -  }
 -};
 +exports.ADBScanner = ADBScanner;

MozReview-Commit-ID: 2PC1ochp19E

--HG--
extra : rebase_source : c89834d973de6afaf76226fe1384cbb5304419f0
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe 0ae3177157 Bug 1469054 - Add async annotation for adb.start(). r=jdescottes
MozReview-Commit-ID: 534q7l33l7o

--HG--
extra : rebase_source : e6805ea7483fa3c2f1f92920a99a0c5c4fbeb745
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe 5528ed6336 Bug 1469054 - ESLint: Add no-fallthrough annotation. r=jdescottes
MozReview-Commit-ID: 5tBviheMTTk

--HG--
extra : rebase_source : e2a3a8fb8b3659711a1187a5d4d72e792417bc4e
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe 194735b065 Bug 1469054 - ESLint: Use integer for the radix on parseInt. r=jdescottes
I am not sure this had caused real issue though.

MozReview-Commit-ID: ISSSJCYcpAm

--HG--
extra : rebase_source : 515934abf244d7cee2605117b3fffc22d88d355b
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe 3f3aca023a Bug 1469054 - ESLint: Drop function name. r=jdescottes
MozReview-Commit-ID: LsUzDI0fkVc

--HG--
extra : rebase_source : 6389a6e724a663df47d5b753a94bfb1060300193
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe b7a7a4008d Bug 1469054 - ESLint: Drop 'a' prefix from argument names. r=jdescottes
MozReview-Commit-ID: J3v5NKglA2B

--HG--
extra : rebase_source : 40c0f3edd904d5ecdd6a8fada20f0fb627c7b759
2018-08-09 14:27:55 +09:00
Hiroyuki Ikezoe a37470bc9c Bug 1469054 - ESLint: Lint fixes. r=jdescottes
Changes are:

- s/let/const/g if applicable
- braces for 'if' block
- identation fixes
- Moved a statement in setTimeout callback on the next line.

MozReview-Commit-ID: HyZ9zrbK3iJ

--HG--
extra : rebase_source : 61f217419778cee2e94786f1a9a6c9647dda0f87
2018-08-09 14:27:55 +09:00
Hiroyuki Ikezoe 897c035cee Bug 1469054 - Make sure the adb server stops. r=jdescottes
Without this change, the test in this patch does fail since when the test
starts, the adb server is still running for the previous test, thus
ADB.start() doesn't start a new adb server, then after that when we check
that the adb server is running by adb-running-checker, it tells us the adb
server is NOT running at that moment.

MozReview-Commit-ID: KRo30WmAsAY

--HG--
extra : rebase_source : 96348d8ee94df375b36b3d68683c292cd770fe86
2018-08-09 14:27:55 +09:00
Hiroyuki Ikezoe e16481514b Bug 1469054 - Adapt implementations for adb.start() and adb.stop() and relevant stuff. r=jdescottes
MozReview-Commit-ID: LF23OQtXxkj

--HG--
extra : rebase_source : 77bf02390cfb7dc9cd12de138bca74c715cdc968
2018-08-09 14:27:55 +09:00
Hiroyuki Ikezoe 49a6bd373e Bug 1469054 - Extract adb binary and related files into local profile directory from the extension. r=jdescottes
The new devtools-adb-extension should have adb.json on the top of the extension
directory, and devtools fetches the adb.json and parses it then copies the blobs
into local profile directory.

NOTE: Though we are going to use the same adb.json for all platforms, we will
pack only the corresponding blobs for each platform.  E.g. the extension for
Linux64 will have only linux64/adb.

The adb.json should look like this;

  {
    "Linux": {
      "x86": [
        "linux/adb"
      ],
      "x86_64": [
        "linux64/adb"
      ]
    },
    "Darwin": {
      "x86_64": [
        "mac64/adb"
      ]
    },
    "WINNT": {
      "x86": [
        "win32/adb.exe",
        "win32/AdbWinApi.dll",
        "win32/AdbWinUsbApi.dll"
      ],
      "x86_64": [
        "win32/adb.exe",
        "win32/AdbWinApi.dll",
        "win32/AdbWinUsbApi.dll"
      ]
    }
  }

unpackFile() here is mostly the same as in binary-manager.js in the adbhelper
addon.

MozReview-Commit-ID: 7aprfaaeTAT

--HG--
extra : rebase_source : 64c55066207a21782c0cbd0ca2294baf1ab61d40
2018-08-09 14:27:55 +09:00
Brendan Dahl 027788b3ce Bug 1481286 - Move command dispatcher from XULDocument to Document. r=bz
Allows non-XUL chrome privilege documents to also use the command
dispatcher. The command dispatcher is created lazily since it will not
always be used.

Update test to reflect removal of the XUL attribute "commandDispatcher"
from content privilege XUL.

MozReview-Commit-ID: HUXMG9kx4ft
2018-08-08 09:02:03 -07:00
Jonathan Watt d1601e1442 Bug 1480073 pt 2. Enable the '-webkit-appearance' alias for '-moz-appearance' for EARLY_BETA_OR_EARLIER. r=emilio 2018-08-01 12:01:33 +01:00
Tom Tromey 1ca6fd6782 Bug 1478184 - fix handling of html comments in parseDeclarations; r=gl
parseDeclarations was ignoring html comment tokens, but in fact they
should not be treated any differently from other CSS tokens.

MozReview-Commit-ID: 27Mxt5zbSSJ

--HG--
extra : amend_source : 91e47bbf6951ac9dd4709ac10c49ff51c1781ce8
2018-08-07 13:03:34 -07:00
Brian Hackett 9844ce064b Bug 1479058 Part 6 - ReplayDebugger and server/client changes to support time warps, r=jimb.
--HG--
extra : rebase_source : 5972ae72f0601e3daa2506e1be3844dc77e3bafc
2018-08-02 23:30:19 +00:00