Closed Bug 1458215 Opened 2 years ago Closed 2 years ago

"JavaScript strict warning: resource://gre/modules/XPCOMUtils.jsm, line 280: ReferenceError: reference to undefined property 1" after blocklist service changes

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox59 --- unaffected
firefox60 --- unaffected
firefox61 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Keywords: regression)

Attachments

(1 file)

I'm seeing this in the xpcshell test logs, e.g.

$ ./mach xpcshell-test toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js
...
JavaScript strict warning: resource://gre/modules/XPCOMUtils.jsm, line 280: ReferenceError: reference to undefined property 1
...

Seems to be on startup. I added a bit of debug and tracked it down to the changes in bug 1455458.
Assignee: nobody → standard8
Status: NEW → ASSIGNED
Comment on attachment 8972282 [details]
Bug 1458215 - Handle the optional service name in XPCOMUtils.defineLazyServiceGetters.

https://reviewboard.mozilla.org/r/240942/#review246688

::: js/xpconnect/loader/XPCOMUtils.jsm:278
(Diff revision 1)
>      for (let [name, service] of Object.entries(aServices)) {
>        // Note: This is hot code, and cross-compartment array wrappers
>        // are not JIT-friendly to destructuring or spread operators, so
>        // we need to use indexed access instead.
> -      this.defineLazyServiceGetter(aObject, name, service[0], service[1]);
> +      this.defineLazyServiceGetter(aObject, name, service[0],
> +                                   service.length > 1 && service[1]);

This can just be `services[1] || null`
Attachment #8972282 - Flags: review?(kmaglione+bmo) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a3a48defe428
Handle the optional service name in XPCOMUtils.defineLazyServiceGetters. r=kmag
https://hg.mozilla.org/mozilla-central/rev/a3a48defe428
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Can you please add some STRs to this bug and add a test webextension if needed? If no manual QA is required, please set it as "qe-verify-"
Flags: needinfo?(standard8)
This doesn't need testing, this is a common code path covered already by automated testing.
Flags: needinfo?(standard8) → qe-verify-
You need to log in before you can comment on or make changes to this bug.