Lazily create JS Actors when events fire in content
Categories
(Core :: DOM: Content Processes, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: jdai, Assigned: nika)
References
Details
Attachments
(5 files)
| Assignee | ||
Comment 1•7 years ago
|
||
This is a follow-up to the initial JS Actor APIs which will initially only support creation upon calls to getActor.
This will add additional options to WindowActorSidedOptions:
dictionary WindowActorSidedOptions {
// ...
// Mapping from event names to the corresponding AddEventListenerOptions
// object used to configure the event listener.
//
// An event listed here will be listened to by native code, and will
// cause the actor to be created to recieve the event if it is fired.
// Once the actor has been created, it will automatically be delivered
// these events for the duration of its lifetime. When the actor is
// destroyed, it will automatically be unregistered.
//
// If `once` is set, only the first event of the given type will be
// delivered to the JSWindowActor.
record<DOMString, AddEventListenerOptions> events;
// Array of observer topics which should trigger actor creation.
//
// Once an actor has been created, it will automatically be registered
// as an observer for these topics for the duration of its lifetime.
// When the actor is destroyed, it will automatically be unregistered.
//
// WARNING: Observer notifications are global, and can cause creation
// of unnecessary actors! Filtering of messages must be done on a
// per-actor basis.
sequence<DOMString> observers;
};
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 2•7 years ago
|
||
NOTE: The events option should not be valid when used on the parent side, as there is no global to be listening to events from.
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Comment 3•7 years ago
|
||
Separate lazily create JS Actors when observer notifications fire in content to bug 1526406.
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 4•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
Depends on D20012
| Assignee | ||
Comment 6•7 years ago
|
||
Depends on D20013
| Assignee | ||
Comment 7•7 years ago
|
||
Depends on D20014
Updated•7 years ago
|
| Assignee | ||
Comment 8•7 years ago
|
||
This warning (as an error) is showing up with this patch due to the new
use of AddEventListenerOptions in ChromeUtilsBinding.h. That header is
included in some codegen units which have this warning enabled, which
revealed the issue.
I believe the warning is spurious in this case, but fixing it doesn't
seem like a big deal. Requesting review from Boris, as he added the
comment 6 years ago.
Depends on D20015
Comment 10•7 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/2beb789b521f
https://hg.mozilla.org/mozilla-central/rev/3575c9a372e7
https://hg.mozilla.org/mozilla-central/rev/20be5e162a7d
https://hg.mozilla.org/mozilla-central/rev/a3f79e3f59f9
https://hg.mozilla.org/mozilla-central/rev/fd3f6a36c79f
Comment 11•7 years ago
|
||
| bugherder | ||
Updated•7 years ago
|
Description
•