Open Bug 1689733 Opened 5 years ago Updated 4 years ago

Schemas.jsm mangles helper functions in error function

Categories

(WebExtensions :: General, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: tcampbell, Assigned: zombie)

References

Details

https://searchfox.org/mozilla-central/rev/dd042f25a8da58d565d199dcfebe4f34db64863c/toolkit/components/extensions/Schemas.jsm#604-610

This passes a function to the choicesMessage argument of error which is marked as receiving string|function but error never calls forceString. This results in the arrow function being stringified here which is nonsense.

The reason I noticed is this triggers (in my local debug build) an extra IPC transaction during startup to fetch the source code of Schemas.jsm in order to do this.

I'm also not quite clear why I have these schema errors during startup? I'm not sure if this will help Bug 1620447 by removing this synchronous load of source code.

Oops, thanks Ted.

I'm also not quite clear why I have these schema errors during startup? I'm not sure if this will help Bug 1620447 by removing this synchronous load of source code.

Depending on which process this is happening in, it probably comes from starting up (system?) extensions. The android one is specifically about content scripts which they have running in each page for the browser to function.

Assignee: nobody → tomica
Severity: -- → S4
Priority: -- → P2

I added a printf (of filename) to XPCJSSourceHook to verify this. Still occurs on m-c.

See Also: → 1750430
You need to log in before you can comment on or make changes to this bug.