sailfishos / sailfish-browser

Sailfish Browser
https://github.com/sailfishos/sailfish-browser/wiki/Sailfish-Browser-wiki
Mozilla Public License 2.0
307 stars 87 forks source link

JavaScript error TypeError: XPCOMUtils.generateNSGetFactory is not a function #1044

Closed llewelld closed 1 year ago

llewelld commented 1 year ago

Running the browser the following error can be seen in the debug output when running with EMBED_CONSOLE=1:

JavaScript Error: "TypeError: XPCOMUtils.generateNSGetFactory is not a function"
    {file: "file:///usr/lib64/mozembedlite/components/EmbedLiteGlobalHelper.js" line: 108}
llewelld commented 1 year ago

Fixed by the following commit: https://github.com/llewelld/embedlite-components/commit/0bf2601425ec1d8d639255d6a7c32231e7e38eae

This makes three changes:

  1. Use ComponentUtils.generateNSGetFactory() instead of XPCOMUtils.generateNSGetFactory().
  2. Remove call to ActorManagerParent.flush(). See upstream change D95206.
  3. Use L10nRegistry.registerSources() instead of L10nRegistry.registerSource(). See upstream change D81243.