Commit Graph
52 Commits
Author SHA1 Message Date
Daniel Holbert 10725540f6 Bug 2037754: Use 'MakeAndAddRef' instead of 'new' when allocating runnable for nsContentUtils::AddScriptRunner. r=dom-core,smaug
MakeAndAddRef ensures that the freshly-allocated object immediately gets a
refcount of 1 (before it's even passed to AddScriptRunner).  This avoids
several potential footguns that otherwise exist with a zero-refcount
freshly-allocated object.

It also makes the ownership-transfer semantics more clear
(via the already_AddRefed type that it produces) - AddScriptRunner is taking
ownership of the object, rather than using it temporarily while the caller
maintains ownership.

Differential Revision: https://phabricator.services.mozilla.com/D299039
2026-05-07 06:35:57 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Nika Layzell c7233601c6 Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu
This patch is to remove the ClonedMessageData type which is currently
frequently used for sending a StructuredCloneData over IPC manually. Instead,
under the new approach, the StructuredCloneData is transferred directly using
its serializer.

This allows for simplification of various types across the codebase which
previously needed complex handling for this manual {de-}serialization step,
especially around keeping the borrowed-from buffers alive in some cases.

As part of this, the type has also been changed to be a threadsafe refcounted
object. This is in part possible due to earlier parts, which have made it safe
to Read() from the same StructuredCloneData object concurrently from multiple
threads (so long as it does not support transferrables).

The underlying data storage within StructuredCloneData was previously already
reference counted (due to SharedJSAllocatedData).

In addition to StructuredCloneData, other data structures (e.g.
nsStructuredCloneContainer and SharedMessageBody) have also been updated to be
serialized directly, avoiding now-unnecessary intermediate objects.

Differential Revision: https://phabricator.services.mozilla.com/D281115
2026-02-12 02:43:41 +00:00
Nika Layzell 2bbd1ac126 Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth
Previously, we would copy the data and deserialize it once for each listener.
This interacts poorly with the actual data which can be sent over the message
manager, as it is possible to include transferables (which must only be
deserialized once).

This new approach ensures that the data structure is always deserialized once
in the shared scope, and then passed to all of the listeners, avoiding issues
with deserializing the same transferable multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D281553
2026-02-12 02:43:38 +00:00
Cristina Horotan 3e788840d2 Revert "Bug 2013389 - Part 12: Restore eager serialization of InputStream, r=asuth" for causing Hazard failure on StructuredCloneHolder.cpp
This reverts commit 72c32e25bf.

Revert "Bug 2013389 - Part 11: Make attachment arrays more consistent in StructuredCloneHolder, r=asuth"

This reverts commit c0912428c7.

Revert "Bug 2013389 - Part 10: Fix version tracking in nsStructuredCloneContainer, r=asuth,extension-reviewers,spidermonkey-reviewers,sfink,robwu"

This reverts commit f2e9691831.

Revert "Bug 2013389 - Part 9: Remove the now-unused ReadFromBuffer method, r=asuth"

This reverts commit 6eb034458e.

Revert "Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu"

This reverts commit 4dd6f1d6ea.

Revert "Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth"

This reverts commit 65d16af619.

Revert "Bug 2013389 - Part 6: Remove weak listener support from MessageManager, r=smaug"

This reverts commit 66f4b308a0.

Revert "Bug 2013389 - Part 5: Broadcasting MessageManagers cannot support transferrables, r=asuth"

This reverts commit e95e1a5a6c.

Revert "Bug 2013389 - Part 4: Avoid depending on mErrorMessage when deserializing StructuredCloneHolder, r=asuth,dom-worker-reviewers"

This reverts commit ae78c69357.

Revert "Bug 2013389 - Part 3: Remove aGlobal argument from StructuredCloneHolder::Read, r=asuth,dom-worker-reviewers"

This reverts commit 066bd37bfd.

Revert "Bug 2013389 - Part 2: Stop tracking mGlobal within StructuredCloneHolder::Read, r=asuth"

This reverts commit 6b4f3a43c0.

Revert "Bug 2013389 - Part 1: Add an Adopt API to StructuredCloneHolder, r=asuth"

This reverts commit 8624db71c2.
2026-02-10 20:11:41 +00:00
Nika Layzell 4dd6f1d6ea Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu
This patch is to remove the ClonedMessageData type which is currently
frequently used for sending a StructuredCloneData over IPC manually. Instead,
under the new approach, the StructuredCloneData is transferred directly using
its serializer.

This allows for simplification of various types across the codebase which
previously needed complex handling for this manual {de-}serialization step,
especially around keeping the borrowed-from buffers alive in some cases.

As part of this, the type has also been changed to be a threadsafe refcounted
object. This is in part possible due to earlier parts, which have made it safe
to Read() from the same StructuredCloneData object concurrently from multiple
threads (so long as it does not support transferrables).

The underlying data storage within StructuredCloneData was previously already
reference counted (due to SharedJSAllocatedData).

In addition to StructuredCloneData, other data structures (e.g.
nsStructuredCloneContainer and SharedMessageBody) have also been updated to be
serialized directly, avoiding now-unnecessary intermediate objects.

Differential Revision: https://phabricator.services.mozilla.com/D281115
2026-02-09 21:23:37 +00:00
Nika Layzell 65d16af619 Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth
Previously, we would copy the data and deserialize it once for each listener.
This interacts poorly with the actual data which can be sent over the message
manager, as it is possible to include transferables (which must only be
deserialized once).

This new approach ensures that the data structure is always deserialized once
in the shared scope, and then passed to all of the listeners, avoiding issues
with deserializing the same transferable multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D281553
2026-02-09 21:23:34 +00:00
Cristina Horotan c262421c6d Revert "Bug 2013389 - Part 11: Make attachment arrays more consistent in StructuredCloneHolder, r=asuth" for causing build bustages at MessageManagerFuzzer.cpp
This reverts commit 5c5cf7465b.

Revert "Bug 2013389 - Part 10: Fix version tracking in nsStructuredCloneContainer, r=asuth,extension-reviewers,spidermonkey-reviewers,sfink,robwu"

This reverts commit c87a327d86.

Revert "Bug 2013389 - Part 9: Remove the now-unused ReadFromBuffer method, r=asuth"

This reverts commit 5adf49e5d8.

Revert "Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu"

This reverts commit f6d12563fe.

Revert "Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth"

This reverts commit 44c1325d76.

Revert "Bug 2013389 - Part 6: Remove weak listener support from MessageManager, r=smaug"

This reverts commit 1d1b495c91.

Revert "Bug 2013389 - Part 5: Broadcasting MessageManagers cannot support transferrables, r=asuth"

This reverts commit e2eb75ff8f.

Revert "Bug 2013389 - Part 4: Avoid depending on mErrorMessage when deserializing StructuredCloneHolder, r=asuth,dom-worker-reviewers"

This reverts commit d9a234ad7b.

Revert "Bug 2013389 - Part 3: Remove aGlobal argument from StructuredCloneHolder::Read, r=asuth,dom-worker-reviewers"

This reverts commit 48279cea50.

Revert "Bug 2013389 - Part 2: Stop tracking mGlobal within StructuredCloneHolder::Read, r=asuth"

This reverts commit 27162e5046.

Revert "Bug 2013389 - Part 1: Add an Adopt API to StructuredCloneHolder, r=asuth"

This reverts commit e3a9f32716.
2026-02-05 22:11:47 +00:00
Nika Layzell f6d12563fe Bug 2013389 - Part 8: Avoid the unnecessary ClonedMessageData intermediate, r=asuth,mccr8,extension-reviewers,dom-worker-reviewers,robwu
This patch is to remove the ClonedMessageData type which is currently
frequently used for sending a StructuredCloneData over IPC manually. Instead,
under the new approach, the StructuredCloneData is transferred directly using
its serializer.

This allows for simplification of various types across the codebase which
previously needed complex handling for this manual {de-}serialization step,
especially around keeping the borrowed-from buffers alive in some cases.

As part of this, the type has also been changed to be a threadsafe refcounted
object. This is in part possible due to earlier parts, which have made it safe
to Read() from the same StructuredCloneData object concurrently from multiple
threads (so long as it does not support transferrables).

The underlying data storage within StructuredCloneData was previously already
reference counted (due to SharedJSAllocatedData).

In addition to StructuredCloneData, other data structures (e.g.
nsStructuredCloneContainer and SharedMessageBody) have also been updated to be
serialized directly, avoiding now-unnecessary intermediate objects.

Differential Revision: https://phabricator.services.mozilla.com/D281115
2026-02-05 21:25:52 +00:00
Nika Layzell 44c1325d76 Bug 2013389 - Part 7: Only deserialize once in nsFrameMessageManager, r=asuth
Previously, we would copy the data and deserialize it once for each listener.
This interacts poorly with the actual data which can be sent over the message
manager, as it is possible to include transferables (which must only be
deserialized once).

This new approach ensures that the data structure is always deserialized once
in the shared scope, and then passed to all of the listeners, avoiding issues
with deserializing the same transferable multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D281553
2026-02-05 21:25:49 +00:00
Andrew McCreight 2d02eabe09 Bug 1977139, part 2 - Don't allow StructuredCloneData to be moved. r=nika
While SCD doesn't have the problems that its parent classes have in terms
of moving, people have done a poor job of keeping the move constructor
updated as they add new auxiliary arrays. This led to strange behavior where
something would work when being sent between processes, but would crash
with a bounds error when being sent within a process.

This patch addresses the problem by preventing SCD from being moved. Instead,
UniquePtr<StructuredCloneData> must be used to move them around.

The dropping of the "using" of SCD from PBrowser means a few related places
have to explicitly qualify SCD with the ipc namespace.

Differential Revision: https://phabricator.services.mozilla.com/D262718
2025-08-29 23:45:31 +00:00
Cristina Horotan 938795eb09 Revert "Bug 1977139, part 2 - Don't allow StructuredCloneData to be moved. r=nika" for causing build bustage at JSActor.cpp
This reverts commit cd2962e220.

Revert "Bug 1977139, part 1 - Use macro for HasClonedDOMObjects and StructuredCloneHolder::Read. r=asuth"

This reverts commit 2cc5ec76dd.
2025-08-29 22:49:12 +00:00
Andrew McCreight cd2962e220 Bug 1977139, part 2 - Don't allow StructuredCloneData to be moved. r=nika
While SCD doesn't have the problems that its parent classes have in terms
of moving, people have done a poor job of keeping the move constructor
updated as they add new auxiliary arrays. This led to strange behavior where
something would work when being sent between processes, but would crash
with a bounds error when being sent within a process.

This patch addresses the problem by preventing SCD from being moved. Instead,
UniquePtr<StructuredCloneData> must be used to move them around.

The dropping of the "using" of SCD from PBrowser means a few related places
have to explicitly qualify SCD with the ipc namespace.

Differential Revision: https://phabricator.services.mozilla.com/D262718
2025-08-29 21:41:29 +00:00
Emilio Cobos Álvarez 791917d8af Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D256800
2025-08-05 11:47:34 +00:00
Artur Iunusov 06d1306fcc Bug 1770944 - Remove nsIMozBrowserFrame. r=smaug
Depends on D155254

Differential Revision: https://phabricator.services.mozilla.com/D170397
2024-03-07 13:04:21 +00:00
Narcis Beleuzu 197b39f007 Backed out 16 changesets (bug 1770944) as req by asuth.
Backed out changeset 61af32f40777 (bug 1770944)
Backed out changeset 4ff0c45db93b (bug 1770944)
Backed out changeset 8a217eff7bcd (bug 1770944)
Backed out changeset 6435f48c96bf (bug 1770944)
Backed out changeset 0d2432765ca0 (bug 1770944)
Backed out changeset 58e02566db85 (bug 1770944)
Backed out changeset 0a8c4c2460ee (bug 1770944)
Backed out changeset 9416bafd9982 (bug 1770944)
Backed out changeset 79de4f83fe2e (bug 1770944)
Backed out changeset 63ac518aceb0 (bug 1770944)
Backed out changeset 14952f872b77 (bug 1770944)
Backed out changeset f65e0967ad75 (bug 1770944)
Backed out changeset bd53c42038f7 (bug 1770944)
Backed out changeset 36c378ba8212 (bug 1770944)
Backed out changeset 9ba54ab06348 (bug 1770944)
Backed out changeset fb5a54b3cbe9 (bug 1770944)
2024-02-23 21:11:08 +02:00
Artur Iunusov 1ce1cdce44 Bug 1770944 - Remove nsIMozBrowserFrame. r=smaug
Depends on D155254

Differential Revision: https://phabricator.services.mozilla.com/D170397
2024-02-22 10:13:13 +00:00
Sandor Molnar 6699491437 Backed out 16 changesets (bug 1770944) for causing asan failures @ dom/base/InProcessBrowserChildMessageManager.cpp
Backed out changeset b73885731e73 (bug 1770944)
Backed out changeset 23d0dc98eb51 (bug 1770944)
Backed out changeset 15661e24d8e1 (bug 1770944)
Backed out changeset 97aa839dc200 (bug 1770944)
Backed out changeset 0d4318bf3239 (bug 1770944)
Backed out changeset be28bb62e9f3 (bug 1770944)
Backed out changeset 708b2671410e (bug 1770944)
Backed out changeset 0a138f3b56b9 (bug 1770944)
Backed out changeset 3a149ef794c2 (bug 1770944)
Backed out changeset 4b6ae7dd0e69 (bug 1770944)
Backed out changeset e3960ad85182 (bug 1770944)
Backed out changeset 9ea253525227 (bug 1770944)
Backed out changeset 1828b66c2f7c (bug 1770944)
Backed out changeset 55b0886f9025 (bug 1770944)
Backed out changeset a4197071d10a (bug 1770944)
Backed out changeset 9b18524f541e (bug 1770944)
2024-02-20 20:34:55 +02:00
Artur Iunusov 8d02dfbc6f Bug 1770944 - Remove nsIMozBrowserFrame. r=smaug
Depends on D155254

Differential Revision: https://phabricator.services.mozilla.com/D170397
2024-02-20 16:53:22 +00:00
Kagami Sascha Rosylight c1e45850a8 Bug 1862244 - Add GlobalTeardownHelper r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D193295
2023-11-23 17:17:39 +00:00
Sylvestre Ledru b0fe72dee5 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 7388749830 Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru 4a97019e39 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Nika Layzell 3652956b7b Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Sandor Molnar f236c54e45 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell d61ced88a2 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Peter Van der Beken 5771bce2ad Bug 1712725 - Stop clearing JS things when calling mozilla::DropJSObjects. r=mccr8
There's a pattern of clearing JS things when calling mozilla::DropJSObjects,
but mozilla::DropJSObjects already clears the JS things itself by calling
CycleCollectedJSRuntime::RemoveJSHolder.

Differential Revision: https://phabricator.services.mozilla.com/D115885
2021-05-27 08:35:40 +00:00
Simon Giesecke 46908cfb51 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Neil Deakin 03f95186c6 Bug 1670134, remove message manager reference from LightweightThemeChild.jsm, by getting chromeOuterWindowId from BrowserChild instead, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D93043
2020-10-09 17:36:22 +00:00
Simon Giesecke a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Nika Layzell f5ba037567 Bug 1638910 - Clear JSActorService EventListener references in Unlink, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D76018
2020-05-26 22:19:31 +00:00
Barret Rennie c6d2cd7cf4 Bug 1635885 - Remove debug assertions that fail during process switch r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D75395
2020-05-18 20:47:56 +00:00
David Teller a3c166eb82 Bug 1580448 - Rename JSWindowActor into JSActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70038
2020-04-30 16:42:53 +00:00
Stefan Hindli 381055231c Backed out 9 changesets (bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
Backed out changeset 6b4db1a501df (bug 1580448)
Backed out changeset 677257a41457 (bug 1580448)
Backed out changeset 6db8de5fc125 (bug 1580448)
Backed out changeset fd7527c86239 (bug 1580448)
Backed out changeset bfbd3330b0a5 (bug 1580448)
Backed out changeset dafa80c63322 (bug 1580448)
Backed out changeset 2a1701831a6a (bug 1580448)
Backed out changeset 9b548bd38671 (bug 1580448)
Backed out changeset 358f764ae48b (bug 1580448)
2020-04-30 10:58:27 +03:00
David Teller 24737a9f47 Bug 1580448 - Rename JSWindowActor into JSActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70038
2020-04-30 07:33:28 +00:00
Gijs Kruitbosch def0a5a477 Bug 1631358 - remove CPOW support in the message manager, r=mccr8
This commit:

- removes sendRpcMessage, which was unused;
- removes the CPOW argument to sendAsyncMessage, broadcastAsyncMessage, and
  sendSyncMessage;
- removes the aIsSync argument used internally to distinguish sendRpcMessage
  and sendSyncMessage;
- removes CPOW tests;
- updates the few remaining callsites that use more than 2 arguments in
  sendAsyncMessage for the removal of the cpows argument.

Differential Revision: https://phabricator.services.mozilla.com/D71514
2020-04-21 14:07:57 +00:00
Kris Maglione 407c2b9912 Bug 1614462: Part 1 - Remove unused message principals. r=nika
These were added for the sake of app browsers, and all of the code which
actually needed them has since been removed.

Differential Revision: https://phabricator.services.mozilla.com/D70741
2020-04-20 22:15:19 +00:00
Ciure Andrei 9957be4184 Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Kris Maglione 5b9aa444d6 Bug 1614462: Part 1 - Remove unused message principals. r=nika
These were added for the sake of app browsers, and all of the code which
actually needed them has since been removed.

Differential Revision: https://phabricator.services.mozilla.com/D70741
2020-04-20 20:11:29 +00:00
Ciure Andrei ea1e3cbe28 Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione 9a9970a74b Bug 1614462: Part 1 - Remove unused message principals. r=nika
These were added for the sake of app browsers, and all of the code which
actually needed them has since been removed.

Differential Revision: https://phabricator.services.mozilla.com/D70741
2020-04-16 16:58:08 +00:00
Kris Maglione 232ff37e9f Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

Differential Revision: https://phabricator.services.mozilla.com/D63962
2020-02-25 19:44:39 +00:00
Gabriele Svelto eb403b8785 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442
2019-12-06 09:24:56 +00:00
Dorel Luca 67889e1013 Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto dc6fa2e86c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442
2019-12-04 15:01:19 +00:00
Nika Layzell 4000819d64 Bug 1581925 - Part 1: Capture parent process JSWindowActor events at InProcessBrowserChildMessageManager, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46864
2019-10-07 19:35:06 +00:00
Brindusan Cristian 818d44c1d7 Backed out 2 changesets (bug 1581925) for devtools failures at browser_toolbox_textbox_context_menu.js. CLOSED TREE
Backed out changeset f79a5830bfef (bug 1581925)
Backed out changeset 2e3b0b1cebea (bug 1581925)
2019-10-02 03:04:43 +03:00
Nika Layzell ee05f8f46f Bug 1581925 - Part 1: Capture parent process JSWindowActor events at InProcessBrowserChildMessageManager, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46864
2019-09-26 21:09:34 +00:00
Bogdan Tara 9f1dfb5ad5 Backed out changeset ac6d8297cdc4 (bug 1581925) for test_bug89419.xul & test_MozDomFullscreen_event.xul failures CLOSED TREE 2019-09-24 21:56:18 +03:00
Nika Layzell 6982b45605 Bug 1581925 - Capture parent process JSWindowActor events at InProcessBrowserChildMessageManager, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46864
2019-09-23 22:31:05 +00:00