Postmortem: The context menu script, ext-contextMenus.js, uses IconDetails to show the extension icon next to the top level menu item. Originally, IconDetails lived in ext-utils.js because it was only used by Desktop. However, in order to make it usable by Fennec for the PageActions API, it was moved into the shared ExtensionUtils.jsm. Since none of the unit tests for ext-contextMenus.js covered the use of IconDetails, when it was moved it broke this part of the code. Switching it to use the version in ExtensionUtils.jsm fixes the issue. Lesson learned: Don't leave anything untested.
MozReview-Commit-ID: I6bFQnKvoMh
--HG--
extra : transplant_source : %140%8As%BC%86%17%0A%FE%85%F2%97P%19i%D8%84%AD%87%ED
The base .eslintrc is essentially a merge of the root Toolkit .eslintrc and
the devtools .eslintrc, with some minor changes to match our prevalent style.
For the most enforces the coding styles that we've been using most
consistently. There are a couple of significant differences, though:
* The rule for opening brace alignment can only be applied globally, and
doesn't make exceptions for top-level functions. I chose to turn it on, and
change the brace style of existing top-level functions that violated it,
since the rule seemed worth using, and that's the direction most Toolkit JS
code has been headed anyway.
* The rule for switch/case statements requires an added indentation level for
case statements. Most of our switch statements did not use an extra level
of indentation, and I initially wrote the rule to enforce that style, until
I came across case statements that used blocks, and required the extra
indentation level for sanity.
--HG--
rename : devtools/.eslintrc => toolkit/components/extensions/.eslintrc
extra : commitid : 4aDZOi5MNPc
extra : rebase_source : f34ba43aeb8046a0c971cb76b76410497bd12b42
extra : source : 2a7eb4ef7b375e5fd52d843ca206a071367a6475