Closed Bug 1261013 Opened 4 years ago Closed 4 years ago

Remove the System Messages API

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: benfrancis, Assigned: fabrice)

References

Details

(Whiteboard: btpp-active)

Attachments

(1 file)

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
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
Closed: 4 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.