Bug 442674 - Extension side-effects on unsupported platforms
Summary: Extension side-effects on unsupported platforms
Status: RESOLVED FIXED
Alias: None
Product: plasma-browser-integration
Classification: Plasma
Component: Firefox (show other bugs)
Version: unspecified
Platform: Other macOS
: NOR major
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-18 22:03 UTC by RJVB
Modified: 2021-10-26 09:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2021-09-18 22:03:52 UTC
SUMMARY
Certain browsers, Firefox and Waterfox included have an option to sync installed extensions across hosts and platforms. One an thus end up with the Plasma Integration extension installed on, say, Macintosh.

STEPS TO REPRODUCE
1. Launch the browser (Firefox or Waterfox, possibly any other supported browser) on Mac *from a terminal* 
2. Install the extension (directly or indirectly by installing it on a Linux host where the browser syncs with the Mac in question)
3. Play a video (e.g. on YouTube)

OBSERVED RESULT
The terminal fills with
```
JavaScript error: moz-extension://2651658f-3b08-9242-8969-bbac66dafd06/extension-utils.js, line 0: Error: can't access property "postMessage", port is undefined
JavaScript error: moz-extension://2651658f-3b08-9242-8969-bbac66dafd06/extension-utils.js, line 0: Error: can't access property "postMessage", port is undefined
JavaScript error: moz-extension://2651658f-3b08-9242-8969-bbac66dafd06/extension-utils.js, line 0: Error: can't access property "postMessage", port is undefined
```
It seems 1 such line is printed for every frame in the video.

EXPECTED RESULT
No such pollution, which must have a performance impact on video playback

SOFTWARE/OS VERSIONS
macOS: 10.9.5

ADDITIONAL INFORMATION
I have hardware acceleration disabled in my browser (Waterfox) on Mac but don't think that changes anything for this issue.
Comment 1 Bug Janitor Service 2021-10-25 21:39:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-browser-integration/-/merge_requests/61
Comment 2 Kai Uwe Broulik 2021-10-26 09:54:55 UTC
Git commit be44af3325d23a78b4daf346e33b945c7f447dc4 by Kai Uwe Broulik.
Committed on 26/10/2021 at 09:54.
Pushed by broulik into branch 'master'.

Check port before sending message

On not supported operating systems, we will never create a Port,
and thus potentially spam the console with errors.

M  +7    -1    extension/extension-utils.js

https://invent.kde.org/plasma/plasma-browser-integration/commit/be44af3325d23a78b4daf346e33b945c7f447dc4