<div dir="ltr">Great! :)<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, May 18, 2018 at 2:58 PM Kris Maglione <<a href="mailto:kmaglione@mozilla.com">kmaglione@mozilla.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Already done. :) <a href="https://bugzil.la/1460092" rel="noreferrer" target="_blank">https://bugzil.la/1460092</a><br>
<br>
On Fri, May 18, 2018 at 02:48:20PM -0400, Jared Wein wrote:<br>
>Have you looked in to adding an eslint rule for this? The eslint rule[1]<br>
>that recommends usage of ChromeUtils.defineModuleGetter instead of<br>
>XPCOMUtils.defineLazyModuleGetter has been very useful.<br>
><br>
>[1]<br>
><a href="https://searchfox.org/mozilla-central/rev/da499aac682d0bbda5829327b60a865cbc491611/tools/lint/eslint/eslint-plugin-mozilla/lib/rules/use-chromeutils-import.js#2" rel="noreferrer" target="_blank">https://searchfox.org/mozilla-central/rev/da499aac682d0bbda5829327b60a865cbc491611/tools/lint/eslint/eslint-plugin-mozilla/lib/rules/use-chromeutils-import.js#2</a><br>
><br>
>Thanks,<br>
>Jared<br>
><br>
><br>
>On Tue, May 8, 2018 at 3:26 PM Kris Maglione <<a href="mailto:kmaglione@mozilla.com" target="_blank">kmaglione@mozilla.com</a>> wrote:<br>
><br>
>> Bug 1456035 added a ChromeUtils.generateQI helper to create<br>
>> QueryInterface methods for JS objects. The QueryInterface methods<br>
>> generated by this function are highly optimized, and have a fast path<br>
>> for calls from XPConnect.<br>
>><br>
>> Which is to say, please use this method rather than manually writing<br>
>> your QueryInterface functions, or using XPCOMUtils.generateQI.<br>
>> QueryInterface methods tend to be very hot code, and all of the extra<br>
>> overhead from JS implementations adds up fast.<br>
>><br>
>> -Kris<br>
>> _______________________________________________<br>
>> firefox-dev mailing list<br>
>> <a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
>> <a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
>><br>
<br>
-- <br>
Kris Maglione<br>
Senior Firefox Add-ons Engineer<br>
Mozilla Corporation<br>
<br>
The first principle is that you must not fool yourself — and you are<br>
the easiest person to fool.<br>
        --Richard Feynman<br>
<br>
</blockquote></div>