Create a WebChannel between Gecko and profiler.firefox.com
Categories
(DevTools :: Performance Tools (Profiler/Timeline), enhancement, P2)
Tracking
(firefox75 fixed)
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: gregtatum, Assigned: gregtatum)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files, 1 obsolete file)
console.log("Hook the WebChannel");
// Create a new WebChannel.
const channel = new WebChannel(
"profiler",
Services.io.newURI("https://profiler.firefox.com")
);
// Listen for messages.
channel.listen(function(id, message, target) {
console.log("Found a message", { id, message, target });
channel.send({ data: "This is the data of the response." }, target);
});
// From profiler.firefox.com
//
// Add a listener:
//
// window.addEventListener("WebChannelMessageToContent", event => {
// console.log(event.detail);
// }, true);
//
// Send a message:
//
// window.dispatchEvent(new CustomEvent("WebChannelMessageToChrome", {
// detail: JSON.stringify({
// id: "profiler",
// message: "Data from profiler.firefox.com,
// }),
// }));
This is a small example showing how we can send events between the browser and the content page. It might be worth removing some of our frame scripts for this, as well as handling the mechanism to to tell profiler.firefox.com
that it can use the profiler popup.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Specifically this is fixing up some issues around loading in JSMs.
Assignee | ||
Comment 2•5 years ago
|
||
This commit adds a WebChannel mechanism to the profiler popup workflow.
This will enable us to provide some configuration operations from the
content page in order to ease user onboarding, as well as a mechanism
to migrate away from the extension.
Depends on D57120
Assignee | ||
Comment 3•5 years ago
|
||
We want to be sure that the URL used for the WebChannel is validated to an
allowed set of domains. This test ensures that we are not allowing unknown
domains through.
Depends on D57121
Assignee | ||
Comment 4•5 years ago
|
||
This test covers the basic enabling of the profiler popup menu button.
Depends on D57122
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Comment on attachment 9115784 [details]
Bug 1606472 - Fixup some typings that were set to any; r?julienw
Revision D57120 was moved to bug 1606472. Setting attachment 9115784 [details] to obsolete.
Comment 8•5 years ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:gregtatum, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 9•5 years ago
|
||
It's waiting on some reviews outside of Bugzilla.
Assignee | ||
Comment 10•5 years ago
|
||
We discussed this during the All Hands, but we are now OK to land this now in Nightly, and do further review before it goes out to a wider audience. I'll land this when I'm back in the office.
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/13f63a885c61
https://hg.mozilla.org/mozilla-central/rev/092b3b9760c9
https://hg.mozilla.org/mozilla-central/rev/79b7b94df8b6
Description
•