sailfishos/sailfish-browser

JavaScript Error: Unexpected event profile-after-change

Closed this issue · 1 comments

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

JavaScript Error: "Unexpected event profile-after-change"
    {file: "resource://gre/modules/URLQueryStrippingListService.jsm" line: 224}

I looked into this error in some detail. The service URLQueryStrippingListService is being initialised by the profile-after-change event. The event is being passed to the observe() method, which doesn't recognise the event and so triggers the error.

This seems odd: why be initialised by an event that's going to cause an error? There is some discussion in the bug report and changesets about the fact that the profile-after-change event isn't triggered for content processes in fission, so maybe this is why?

In other situations where gecko is used there are reports of this error appearing, for example on macOS and Thunderbird. However I don't see any changes to address this in the latest gecko version.

The error doesn't itself seem to cause any problems, just messy log output.

Given all this it looks like it must be a case of one of the following:

  1. Upstream are just ignoring the error.
  2. Different ordering of initialisation causing the error, but it doesn't matter.
  3. Different ordering of initialisation causing the error, an indication of some other real problem.

My feeling is that it's probably a case of 1 or 2 and so have added code to suppress the error, see the following commit: llewelld/gecko-dev-mirror@1fe7c56