Remove the System Messages API

RESOLVED FIXED

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: benfrancis, Assigned: fabrice)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: btpp-active)

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
The handling of system messages is registered at app install time from a mozApp manifest. As we are removing mozApps we also need to remove the System Messages API.

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/API/Navigator/mozSetMessageHandler
(Assignee)

Comment 1

2 years ago
Created attachment 8742619 [details] [diff] [review]
system-messages.patch

With this patch we simply relay all internal calls to sendMessage(), broadcastMessage() and registerPage() to the system app.

It's hard to test because all the users are broken...
Assignee: nobody → fabrice
Attachment #8742619 - Flags: review?(lissyx+mozillians)
Comment on attachment 8742619 [details] [diff] [review]
system-messages.patch

Review of attachment 8742619 [details] [diff] [review]:
-----------------------------------------------------------------

Just a comment about the priorities, but it looks all good :)

::: dom/ipc/ContentParent.cpp
@@ +878,5 @@
>    if (!browserFrame) {
>      return PROCESS_PRIORITY_FOREGROUND;
>    }
>  
> +  return PROCESS_PRIORITY_FOREGROUND;

There is a comment a the start of the function stating: "Frames with mozapptype == critical which are expecting a system message FOREGROUND_HIGH priority". I guess we should remove that statement and even simplify the end of this function because all the return case after the one for "PROCESS_PRIORITY_FOREGROUND_KEYBOARD" are just "PROCESS_PRIORITY_FOREGROUND".
Attachment #8742619 - Flags: review?(lissyx+mozillians) → review+
Whiteboard: btpp-active
Let's see the result
So far on mulet I can see the API is not there anymore and nothing obviously breaks.
And the same on device :)
https://hg.mozilla.org/projects/pine/rev/bd4b256765a4
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.