Closed Bug 1452200 Opened 6 years ago Closed 6 years ago

Improve logging functions in GeckoView JS modules

Categories

(GeckoView :: General, enhancement, P3)

enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(5 files, 1 obsolete file)

There is a lot of boilerplate in existing JS modules. Uncommenting to turn on logging is not the best. Also, log strings are evaluated even if logging is off, so time is unnecessarily spent performing expensive operations like JSON.stringify().
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review240396


Code analysis found 5 defects in this patch:
 - 5 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:298
(Diff revision 1)
> +
> +    // Only provide two levels for simplicity.
> +    // For "info", use "debug" instead.
> +    // For "error", throw an actual JS error instead.
> +    const levels = {
> +      debug: DEBUG_MODULES.test(tag) || scope['DEBUG'] || false,

Error: ["debug"] is better written in dot notation. [eslint: dot-notation]

::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:298
(Diff revision 1)
> +
> +    // Only provide two levels for simplicity.
> +    // For "info", use "debug" instead.
> +    // For "error", throw an actual JS error instead.
> +    const levels = {
> +      debug: DEBUG_MODULES.test(tag) || scope['DEBUG'] || false,

Error: Strings must use doublequote. [eslint: quotes]

::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:300
(Diff revision 1)
> +    // For "info", use "debug" instead.
> +    // For "error", throw an actual JS error instead.
> +    const levels = {
> +      debug: DEBUG_MODULES.test(tag) || scope['DEBUG'] || false,
> +      warn: true,
> +    }

Error: Missing semicolon. [eslint: semi]

::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:323
(Diff revision 1)
> +    if (!config.enabled) {
> +      return;
> +    }
> +
> +    if (!Array.isArray(strings) || strings.length !== (exprs.length + 1)) {
> +      const [_, file, line] =

Error: '_' is assigned a value but never used. [eslint: no-unused-vars]

::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:353
(Diff revision 1)
> +              }
> +            }
> +            msg += value;
> +          } else {
> +            // Otherwise, round number to three decimal places.
> +            msg += expr.toFixed(3).replace(/\.0+$|(\.\d*[1-9])0+$/, "$1")

Error: Missing semicolon. [eslint: semi]
Comment on attachment 8965909 [details]
Bug 1452200 - 2. Convert existing code to use new logging functions;

https://reviewboard.mozilla.org/r/234722/#review240398


Code analysis found 5 defects in this patch:
 - 5 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: mobile/android/components/geckoview/GeckoViewExternalAppService.js:27
(Diff revision 1)
>  
>    doContent(mimeType, request, context, forceSave) {
>      const channel = request.QueryInterface(Ci.nsIChannel);
>      const mm = context.QueryInterface(Ci.nsIDocShell).tabChild.messageManager;
>  
> -    debug(`doContent() URI=${channel.URI.displaySpec}, contentType=${channel.contentType}`);
> +    debug `doContent: uri=${ channel.URI.displaySpec

Error: 'debug' is not defined. [eslint: no-undef]

::: mobile/android/components/geckoview/GeckoViewExternalAppService.js:43
(Diff revision 1)
>      request.cancel(Cr.NS_ERROR_ABORT);
>      Components.returnCode = Cr.NS_ERROR_ABORT;
>    },
>  
>    applyDecodingForExtension(ext, encoding) {
> -    debug(`applyDecodingForExtension() extension=${ext}, encoding=${encoding}`);
> +    debug `applyDecodingForExtension: extension=${ ext

Error: 'debug' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:50
(Diff revision 1)
>      let env = Cc["@mozilla.org/process/environment;1"]
>                .getService(Ci.nsIEnvironment);
>      let dataDir = env.get("MOZ_ANDROID_DATA_DIR");
>  
>      if (!dataDir) {
> -      debug("Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start");
> +      warn `Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start`;

Error: 'warn' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:79
(Diff revision 1)
>        this._listener.portOrPath = aPortOrPath;
>        this._listener.authenticator = authenticator;
>        this._listener.open();
> -      debug(`USB remote debugger - listening on ${aPortOrPath}`);
> +      debug `USB remote debugger - listening on ${aPortOrPath}`;
>      } catch (e) {
> -      debug("Unable to start USB debugger server: " + e);
> +      warn `Unable to start USB debugger server: ${e}`;

Error: 'warn' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:92
(Diff revision 1)
>  
>      try {
>        this._listener.close();
>        this._listener = null;
>      } catch (e) {
> -      debug("Unable to stop USB debugger server: " + e);
> +      warn `Unable to stop USB debugger server: ${e}`;

Error: 'warn' is not defined. [eslint: no-undef]
Attachment #8965909 - Attachment is obsolete: true
Attachment #8965909 - Flags: review?(snorp)
Comment on attachment 8966228 [details]
Bug 1452200 - 2. Convert existing code to use new logging functions;

https://reviewboard.mozilla.org/r/234978/#review240602


Code analysis found 3 defects in this patch:
 - 3 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:50
(Diff revision 1)
>      let env = Cc["@mozilla.org/process/environment;1"]
>                .getService(Ci.nsIEnvironment);
>      let dataDir = env.get("MOZ_ANDROID_DATA_DIR");
>  
>      if (!dataDir) {
> -      debug("Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start");
> +      warn `Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start`;

Error: 'warn' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:79
(Diff revision 1)
>        this._listener.portOrPath = aPortOrPath;
>        this._listener.authenticator = authenticator;
>        this._listener.open();
> -      debug(`USB remote debugger - listening on ${aPortOrPath}`);
> +      debug `USB remote debugger - listening on ${aPortOrPath}`;
>      } catch (e) {
> -      debug("Unable to start USB debugger server: " + e);
> +      warn `Unable to start USB debugger server: ${e}`;

Error: 'warn' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:92
(Diff revision 1)
>  
>      try {
>        this._listener.close();
>        this._listener = null;
>      } catch (e) {
> -      debug("Unable to stop USB debugger server: " + e);
> +      warn `Unable to stop USB debugger server: ${e}`;

Error: 'warn' is not defined. [eslint: no-undef]
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review240604


Code analysis found 3 defects in this patch:
 - 3 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:50
(Diff revision 2)
>      let env = Cc["@mozilla.org/process/environment;1"]
>                .getService(Ci.nsIEnvironment);
>      let dataDir = env.get("MOZ_ANDROID_DATA_DIR");
>  
>      if (!dataDir) {
> -      debug("Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start");
> +      warn `Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start`;

Error: 'warn' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:79
(Diff revision 2)
>        this._listener.portOrPath = aPortOrPath;
>        this._listener.authenticator = authenticator;
>        this._listener.open();
> -      debug(`USB remote debugger - listening on ${aPortOrPath}`);
> +      debug `USB remote debugger - listening on ${aPortOrPath}`;
>      } catch (e) {
> -      debug("Unable to start USB debugger server: " + e);
> +      warn `Unable to start USB debugger server: ${e}`;

Error: 'warn' is not defined. [eslint: no-undef]

::: mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm:92
(Diff revision 2)
>  
>      try {
>        this._listener.close();
>        this._listener = null;
>      } catch (e) {
> -      debug("Unable to stop USB debugger server: " + e);
> +      warn `Unable to stop USB debugger server: ${e}`;

Error: 'warn' is not defined. [eslint: no-undef]
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review240658

I think we need a way to change the logging level/enablement at runtime without having to change the source, otherwise this isn't really much of an improvement. One idea would be to add about:geckoview which would have tools for this, but maybe you have a better idea? System properties would be convenient, but we can't use those anymore.

I'm also not too excited about having our own logging system. Please see if Log.jsm is adequate.

::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:289
(Diff revision 3)
> +   *   warn.config.enabled = false;
> +   *
> +   * @param scope Scope to add the logging functions to.
> +   * @param tag Tag string used for the log.
> +   */
> +  initLogging: function(tag, scope = {}) {

I think we probably want to use (and improve?) Log.jsm instead of adding a big chunk of custom logging stuff.

::: mobile/android/modules/geckoview/GeckoViewUtils.jsm:291
(Diff revision 3)
> +   * @param scope Scope to add the logging functions to.
> +   * @param tag Tag string used for the log.
> +   */
> +  initLogging: function(tag, scope = {}) {
> +    if (tag.startsWith("Gecko")) {
> +      tag = tag.slice(5);

Can we just be consistent about tag strings instead?
Attachment #8965908 - Flags: review?(snorp) → review-
Comment on attachment 8966228 [details]
Bug 1452200 - 2. Convert existing code to use new logging functions;

https://reviewboard.mozilla.org/r/234978/#review240676
Attachment #8966228 - Flags: review?(snorp) → review+
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review240658

> I think we probably want to use (and improve?) Log.jsm instead of adding a big chunk of custom logging stuff.

Now that you mention it, having lazy parameter evaluation available generally through Log.jsm would indeed be nice.
Comment on attachment 8966812 [details]
Bug 1452200 - 1a. Add AndroidAppender for Log.jsm;

https://reviewboard.mozilla.org/r/235492/#review241658

::: toolkit/modules/Log.jsm:684
(Diff revision 1)
>  
>  /**
> + * A formatter that does not prepend time/name/level information to messages,
> + * because those fields are logged separately when using the Android logger.
> + */
> +function AndroidFormatter() {

I don't care much about this, but ISTM that a more generic name (eg, something like MessageOnlyFormatter) might make some sense.
Attachment #8966812 - Flags: review?(markh) → review+
Comment on attachment 8966813 [details]
Bug 1452200 - 1b. Add template literal support to Log.jsm;

https://reviewboard.mozilla.org/r/235494/#review241660

Nice! I'm looking forward to being able to use this.
Attachment #8966813 - Flags: review?(markh) → review+
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review241774

It seems like it would be easier to just put a 'log' method into GeckoViewModule for those cases (or debug, warn methods).

::: mobile/android/modules/geckoview/GeckoViewContentModule.jsm:12
(Diff revision 4)
>  var EXPORTED_SYMBOLS = ["GeckoViewContentModule"];
>  
>  ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
> +ChromeUtils.import("resource://gre/modules/GeckoViewUtils.jsm");
> +
> +GeckoViewUtils.initLogging("GeckoView.Module.[C]", this);

What is the signfigance of the [C]?
Attachment #8965908 - Flags: review?(snorp) → review+
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review241774

> What is the signfigance of the [C]?

They end up in logcat, so we can see the log is from a frame script in the content process.
Comment on attachment 8966814 [details]
Bug 1452200 - 3. Don't limit AndroidLog tag length;

https://reviewboard.mozilla.org/r/235496/#review242454
Attachment #8966814 - Flags: review?(nchen) → review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/225bb7ed5f71
1a. Add AndroidAppender for Log.jsm; r=markh
https://hg.mozilla.org/integration/autoland/rev/8ac249bdc772
1b. Add template literal support to Log.jsm; r=markh
https://hg.mozilla.org/integration/autoland/rev/e4cdad2cd3d2
1c. Inject logging functions into GeckoView JS modules; r=snorp
https://hg.mozilla.org/integration/autoland/rev/b03e9dc6ecd7
2. Convert existing code to use new logging functions; r=snorp
https://hg.mozilla.org/integration/autoland/rev/ed07fb947b5e
3. Don't limit AndroidLog tag length; r=jchen
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review242456


Code analysis found 5 defects in this patch:
 - 5 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: mobile/android/chrome/geckoview/GeckoViewContent.js:200
(Diff revision 5)
>          break;
>      }
>    }
>  }
>  
> -var contentListener = new GeckoViewContent("GeckoViewContent", this);
> +let {debug, warn} = GeckoViewContent.initLogging("GeckoViewContent");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewContentSettings.js:74
(Diff revision 5)
>        docShell.displayMode = aMode;
>      }
>    }
>  }
>  
> -var settings = new GeckoViewContentSettings("GeckoViewSettings", this);
> +let {debug, warn} = GeckoViewContentSettings.initLogging("GeckoViewSettings");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewNavigationContent.js:50
(Diff revision 5)
>      return LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags,
>                                  aTriggeringPrincipal);
>    }
>  }
>  
> -var navigationListener = new GeckoViewNavigationContent("GeckoViewNavigation", this);
> +let {debug, warn} = GeckoViewNavigationContent.initLogging("GeckoViewNavigation");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewScrollContent.js:47
(Diff revision 5)
>          break;
>      }
>    }
>  }
> -var scrollListener = new GeckoViewScrollContent("GeckoViewScroll", this);
> +
> +let {debug, warn} = GeckoViewScrollContent.initLogging("GeckoViewScroll");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewSelectionActionContent.js:261
(Diff revision 5)
>        dump("Unknown reason: " + reason);
>      }
>    }
>  }
>  
> -var selectionActionListener =
> +let {debug, warn} =

Error: Parsing error: identifier 'debug' has already been declared [eslint]
Backed out 5 changesets (bug 1452200) for mochitest-chrome failures on Android on a CLOSED TREE

Backout link: https://hg.mozilla.org/integration/autoland/rev/e96685584bf7d3c1d7a4c1861716da89fd650c51

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=ed07fb947b5e6c14b93c00a6596b756b37d306c0

Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=173749842&repo=autoland&lineNumber=2005

Log snippet: 
[task 2018-04-15T05:32:05.008Z] 05:32:05     INFO -  19 INFO TEST-START | mobile/android/tests/browser/chrome/test_android_log.html
[task 2018-04-15T05:32:15.621Z] 05:32:15     INFO -  Buffered messages logged at 05:31:22
[task 2018-04-15T05:32:15.621Z] 05:32:15     INFO -  20 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | AndroidLog is defined
[task 2018-04-15T05:32:15.621Z] 05:32:15     INFO -  21 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | v function found
[task 2018-04-15T05:32:15.622Z] 05:32:15     INFO -  22 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | d function found
[task 2018-04-15T05:32:15.622Z] 05:32:15     INFO -  23 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | i function found
[task 2018-04-15T05:32:15.622Z] 05:32:15     INFO -  24 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | w function found
[task 2018-04-15T05:32:15.623Z] 05:32:15     INFO -  25 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | e function found
[task 2018-04-15T05:32:15.623Z] 05:32:15     INFO -  26 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | verbose bytes correct
[task 2018-04-15T05:32:15.625Z] 05:32:15     INFO -  Buffered messages logged at 05:31:23
[task 2018-04-15T05:32:15.625Z] 05:32:15     INFO -  27 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | debug bytes correct
[task 2018-04-15T05:32:15.625Z] 05:32:15     INFO -  28 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | info bytes correct
[task 2018-04-15T05:32:15.625Z] 05:32:15     INFO -  29 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | warning bytes correct
[task 2018-04-15T05:32:15.625Z] 05:32:15     INFO -  30 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | error bytes correct
[task 2018-04-15T05:32:15.625Z] 05:32:15     INFO -  31 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | verbose bytes correct with bind
[task 2018-04-15T05:32:15.626Z] 05:32:15     INFO -  32 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | debug bytes correct with bind
[task 2018-04-15T05:32:15.626Z] 05:32:15     INFO -  33 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | info bytes correct with bind
[task 2018-04-15T05:32:15.626Z] 05:32:15     INFO -  34 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | warning bytes correct with bind
[task 2018-04-15T05:32:15.626Z] 05:32:15     INFO -  35 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | error bytes correct with bind
[task 2018-04-15T05:32:15.627Z] 05:32:15     INFO -  36 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | verbose bytes correct after bind
[task 2018-04-15T05:32:15.627Z] 05:32:15     INFO -  37 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | debug bytes correct after bind
[task 2018-04-15T05:32:15.628Z] 05:32:15     INFO -  38 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | info bytes correct after bind
[task 2018-04-15T05:32:15.628Z] 05:32:15     INFO -  39 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | warning bytes correct after bind
[task 2018-04-15T05:32:15.629Z] 05:32:15     INFO -  40 INFO TEST-PASS | mobile/android/tests/browser/chrome/test_android_log.html | error bytes correct after bind
[task 2018-04-15T05:32:15.629Z] 05:32:15     INFO -  Buffered messages finished
[task 2018-04-15T05:32:15.630Z] 05:32:15     INFO -  41 INFO TEST-UNEXPECTED-FAIL | mobile/android/tests/browser/chrome/test_android_log.html | verbose message with too-long tag - got 72, expected 73
[task 2018-04-15T05:32:15.630Z] 05:32:15     INFO -  SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:312:5
[task 2018-04-15T05:32:15.630Z] 05:32:15     INFO -  @chrome://mochitests/content/chrome/mobile/android/tests/browser/chrome/test_android_log.html:73:3
Flags: needinfo?(nchen)
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aeb280ada8cb
1a. Add AndroidAppender for Log.jsm; r=markh
https://hg.mozilla.org/integration/autoland/rev/0f1f1f69f5d6
1b. Add template literal support to Log.jsm; r=markh
https://hg.mozilla.org/integration/autoland/rev/401e066b1036
1c. Inject logging functions into GeckoView JS modules; r=snorp
https://hg.mozilla.org/integration/autoland/rev/2627c8b04163
2. Convert existing code to use new logging functions; r=snorp
https://hg.mozilla.org/integration/autoland/rev/7ff499dfcd51
3. Don't limit AndroidLog tag length; r=jchen
Comment on attachment 8965908 [details]
Bug 1452200 - 1c. Inject logging functions into GeckoView JS modules;

https://reviewboard.mozilla.org/r/234720/#review242480


Code analysis found 5 defects in this patch:
 - 5 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: mobile/android/chrome/geckoview/GeckoViewContent.js:200
(Diff revision 6)
>          break;
>      }
>    }
>  }
>  
> -var contentListener = new GeckoViewContent("GeckoViewContent", this);
> +let {debug, warn} = GeckoViewContent.initLogging("GeckoViewContent");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewContentSettings.js:74
(Diff revision 6)
>        docShell.displayMode = aMode;
>      }
>    }
>  }
>  
> -var settings = new GeckoViewContentSettings("GeckoViewSettings", this);
> +let {debug, warn} = GeckoViewContentSettings.initLogging("GeckoViewSettings");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewNavigationContent.js:50
(Diff revision 6)
>      return LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags,
>                                  aTriggeringPrincipal);
>    }
>  }
>  
> -var navigationListener = new GeckoViewNavigationContent("GeckoViewNavigation", this);
> +let {debug, warn} = GeckoViewNavigationContent.initLogging("GeckoViewNavigation");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewScrollContent.js:47
(Diff revision 6)
>          break;
>      }
>    }
>  }
> -var scrollListener = new GeckoViewScrollContent("GeckoViewScroll", this);
> +
> +let {debug, warn} = GeckoViewScrollContent.initLogging("GeckoViewScroll");

Error: Parsing error: identifier 'debug' has already been declared [eslint]

::: mobile/android/chrome/geckoview/GeckoViewSelectionActionContent.js:261
(Diff revision 6)
>        dump("Unknown reason: " + reason);
>      }
>    }
>  }
>  
> -var selectionActionListener =
> +let {debug, warn} =

Error: Parsing error: identifier 'debug' has already been declared [eslint]
Flags: needinfo?(nchen)
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 61 → mozilla61
You need to log in before you can comment on or make changes to this bug.