Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Felipe Gomes 03d5c1ef09 Bug 1489780 - Avoid unnecessary clean-up on ActorChild. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D18150

--HG--
extra : moz-landing-system : lando
2019-02-21 20:40:38 +00:00
Andreas Tolfsen 497c69175e bug 1521385: toolkit: export ActorChild in global scope; r=Felipe
JS classes, unlike var or const, are not automatically made part
of the global scope in JSMs.  This makes it impossible to import
ActorChild this way:

	const {ActorChild} = ChromeUtils.import("resource://gre/modules/ActorChild.jsm", {});

By assigning the ActorChild class to this we work around this problem.

Differential Revision: https://phabricator.services.mozilla.com/D17080

--HG--
extra : rebase_source : 88feda088b4e66a1166c7624d834e6a1565ced9b
extra : source : 4b6549b8a6012efa6a3b250b26fff7cf0d1ca564
2019-01-21 00:23:02 +00:00
Dorel Luca e658f2346a Backed out changeset 4b6549b8a601 (bug 1521385) for Android build bustage 2019-01-21 02:47:16 +02:00
Andreas Tolfsen 71ded3b272 bug 1521385: toolkit: export ActorChild in global scope; r=Felipe
JS classes, unlike var or const, are not automatically made part
of the global scope in JSMs.  This makes it impossible to import
ActorChild this way:

	const {ActorChild} = ChromeUtils.import("resource://gre/modules/ActorChild.jsm", {});

By assigning the ActorChild class to this we work around this problem.

Differential Revision: https://phabricator.services.mozilla.com/D17080

--HG--
extra : moz-landing-system : lando
2019-01-21 00:23:02 +00:00
Felipe Gomes 3b972f7f7a Bug 1493984 - Implement Fission-aware message handling to actors. r=mconley
This patch adds a messaging mechanism to actors that work like this:

If browser.fission.simulate is true, messages handled by ActorManagerChild will only be dispatched to an actor tied to a specific frame, specified either by its frameId (outerWindowId) or by its browsingContextId. Messages that lack the information about the destination frame will be considered meant for the top-level frame.

In addition, a sendMessage API is added to ActorChild that automatically adds the id information to the outbound message, making it easier for it to be handled in the parent.

The frameId support is to ease the transition of some code that is already using outerWindowIds. For new code, it is preferred to use the browsing context ids, together with bug 1496840

Differential Revision: https://phabricator.services.mozilla.com/D7933

--HG--
extra : moz-landing-system : lando
2018-10-30 21:47:04 +00:00
Felipe Gomes 51817cd36d Bug 1493984 - Part 0. Fix ActorChild.addEventListener. r=mconley
This fixes the addEventListener in ActorChild that I got wrong on bug 1490810, as it was still directly adding the events to the message manager, instead of going through the dispatcher (which can simulate the Fission process boundaries). ActorChild.addEventListener is meant for actors to add more events after they are constructed (that were not declared in nsBrowserGlue or ActorManagerParent)

Differential Revision: https://phabricator.services.mozilla.com/D7932

--HG--
extra : moz-landing-system : lando
2018-10-30 21:46:55 +00:00
Felipe Gomes 93a0f8e0fd Bug 1490810 - Simulate Fission for browser actors by blocking them from receiving sub-frame events. r=kmag
If the pref browser.fission.simulate is true, the event dispatcher in ActorManagerChild will not dispatch events to actors that aren't associated with the same window as the event's target.

In addition, when that pref is on, the actors associated with sub-frames will have their content property bound to the correct content window, that might differ from the message manager's window (which is always related to the top level).

Then, in order to write Fission-compatible code, that specific actor will need to be declared with allFrames = true, meaning that it wants to be instantiated for every frame, and not just top-level ones

Differential Revision: https://phabricator.services.mozilla.com/D6358

--HG--
extra : moz-landing-system : lando
2018-09-26 21:46:18 +00:00
Kris Maglione 739cafdadd Bug 1472491: Part 4a - Add helper classes for lazily loading JS IPC actors. r=felipe
This adds the basic framework for defining IPC actors which are lazily
instantiated for the appropriate frame loaders based on DOM events, message
manager messages, and observers. Actual actors are defined in follow-up
commits.

MozReview-Commit-ID: Jb6CWWW7v3v

--HG--
extra : rebase_source : 6c465c492ef423616346d70047c4fd4b074af303
2018-08-11 15:27:12 -07:00