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

469 Коммитов

Автор SHA1 Сообщение Дата
Perry Jiang 75c94e9b42 Bug 1584007 - initial implementation of FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Also implements SourceTableEntry and nsIDHasher to switch ClientManagerService's
nsDataHashTable to a mozilla::HashMap<nsID, SourceTableEntry> in following
changesets.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 15:16:42 +00:00
Bas Schouten 1bc21ff19c Bug 1563335 - Part 1: Implement mechanism to throttle JS execution. r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D59321

--HG--
extra : moz-landing-system : lando
2020-03-26 00:36:24 +00:00
Daniel Huigens 7f0520ae9a Bug 1598278 - Check that Service Worker controls client in navigate() r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D66040

--HG--
extra : moz-landing-system : lando
2020-03-24 23:35:38 +00:00
Kristen Wright 5094f72a18 Bug 1622111 - Convert security.data_uri.unique_opaque_origin to static pref and remove ClientPrefs. r=njn
Converts security.data_uri.unique_opaque_origin to a static pref. This pref was initialized by the ClientManager in ClientPrefs, so this commit also removes those files. Somehow this pref was getting added in VarCache twice, so it also removes the places where the pref was added in Networking.

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

--HG--
extra : moz-landing-system : lando
2020-03-23 16:08:52 +00:00
Mihai Alexandru Michis b6435f7773 Backed out 5 changesets (bug 1584007) for causing crashes in ClientManagerService.
CLOSED TREE

Backed out changeset e8e6a6bb50ff (bug 1584007)
Backed out changeset 9468d92f2a55 (bug 1584007)
Backed out changeset 19ed74a7ea6f (bug 1584007)
Backed out changeset 6c35d3d0f747 (bug 1584007)
Backed out changeset ea67977a5cdd (bug 1584007)
2020-03-24 11:29:22 +02:00
Perry Jiang 373ae45772 Bug 1584007 - let ClientChannelHelperParent manage FutureClientSourceParent lifetime r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
ClientChannelHelperParent is the thing creating the ClientInfos which aren't
backed by existing ClientSources, so it may make sense for CCHP to tell the
ClientManagerService (CMS) to "expect" or "forget" a "future"
ClientSource(Parent).

When such a ClientInfo is created, CCHP notifies the CMS that a future
ClientSource may be created. This notification has to be observed before any
ClientHandles try to query CMS to a ClientSourceParent, which is the case
because the notification as well as ClientHandleParent constructors occur over
PBackground, and the notification sending method is called first.

CMS is told to forget the future ClientSource whenever a redirect occurs that
would result in the creation of a new ClientSource (i.e. a new ClientInfo). It's
also possible that the ClientInfo's LoadInfo's channel is cancelled. To account
for this, CHCP stores the most recent ClientInfo it's created and tells CMS
to _possibly_ forget the associated future ClientSource in its destructor. It's
possible that the channel completed its load, in which case this notification
is a no-op. This also relies on CHCP being destroyed after the reserved
ClientSource has a chance to both be created and register its
ClientSourceParent.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:20 +00:00
Perry Jiang 54f6dbaac3 Bug 1584007 - allow ClientManager to register "future" ClientSources r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66520

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:12 +00:00
Perry Jiang 6b14fd7ea2 Bug 1584007 - let ClientHandleParents wait on FutureClientSourceParents r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66154

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:10 +00:00
Perry Jiang d1cc3d5d84 Bug 1584007 - let ClientManagerService store FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
The changes only make it possible for ClientManagerService to store
FutureClientSourceParents, but it will not actually store them until
following changesets.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:35 +00:00
Perry Jiang b5b13cec75 Bug 1584007 - initial implementation of FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Also implements SourceTableEntry and nsIDHasher to switch ClientManagerService's
nsDataHashTable to a mozilla::HashMap<nsID, SourceTableEntry> in following
changesets.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 02:33:54 +00:00
Stefan Hindli 5f419e4b50 Backed out 9 changesets (bug 1622111) for causing mochitest failures in dom/animation/test/mozilla/test_restyles.html CLOSED TREE
Backed out changeset c244160797f8 (bug 1622111)
Backed out changeset dd9209f6bd8b (bug 1622111)
Backed out changeset d694c9e7061f (bug 1622111)
Backed out changeset 486aae809f6d (bug 1622111)
Backed out changeset 709266168c41 (bug 1622111)
Backed out changeset ca0d47bb86a8 (bug 1622111)
Backed out changeset caa735c8bb91 (bug 1622111)
Backed out changeset 12397711ab25 (bug 1622111)
Backed out changeset b66002fd1480 (bug 1622111)
2020-03-19 02:47:51 +02:00
Kristen Wright 54ef9a89c8 Bug 1622111 - Convert security.data_uri.unique_opaque_origin to static pref and remove ClientPrefs. r=njn
Converts security.data_uri.unique_opaque_origin to a static pref. This pref was initialized by the ClientManager in ClientPrefs, so this commit also removes those files. Somehow this pref was getting added in VarCache twice, so it also removes the places where the pref was added in Networking.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 22:12:20 +00:00
Kashav Madan 2dbd4a809e Bug 1578070 - Rename ClientOpenWindowInCurrentProcess and unskip test_openWindow.html, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D65232

--HG--
extra : moz-landing-system : lando
2020-03-10 20:27:49 +00:00
Kashav Madan 41ed32b21b Bug 1578070 - Use nsWindowWatcher::GetBrowsingContextByName in GeckoViewOpenWindow, r=farre
This also removes LaunchObserver, which was only needed for Fennec.

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

--HG--
extra : moz-landing-system : lando
2020-03-10 20:27:24 +00:00
Kashav Madan 5f18b14d6d Bug 1578070 - Use the parent process for Clients.openWindow(), r=nika,asuth
Differential Revision: https://phabricator.services.mozilla.com/D64392

--HG--
extra : moz-landing-system : lando
2020-03-10 20:27:01 +00:00
David Teller ecc51cfadf Bug 1605085 - Make ClientManagerService::OpenWindow use non-blocking GetNewOrUsedBrowserProcessAsync;r=baku
Differential Revision: https://phabricator.services.mozilla.com/D57779

--HG--
extra : moz-landing-system : lando
2020-03-10 12:19:33 +00:00
Boris Zbarsky 00cd5d4380 Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug
Callers should pass in UTF-8, since that's what the JS engine ends up with in the end anyway.

The various URL changes are because NS_NewURI converts incoming nsAString to
UTF-8 anyway.  So we might as well do that up-front and then use the UTF-8
string for both the NS_NewURI call and the error-reporting if it fails.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 21:08:02 +00:00
Boris Zbarsky c878a8bb26 Bug 1619112 part 2. Pass char literals instead of char16_t literals into ErrorResult throwing methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65538

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:58 +00:00
Matt Woodrow 4703f7d898 Bug 1617434 - Share code where possible in ClientChannelHelper. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D63810

--HG--
extra : moz-landing-system : lando
2020-03-04 02:51:49 +00:00
Matt Woodrow 17729d1ea4 Bug 1617434 - Simplify ClientChannelHelperChild. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D63809

--HG--
extra : moz-landing-system : lando
2020-03-04 02:47:59 +00:00
Matt Woodrow 0b6366e23e Bug 1617434 - Don't recreate ClientSource when we process switch. r=perry
Now that we're guaranteed to not have an existing ClientSource in the old process, we no longer need to allocate a new ClientInfo in the new process.
This lets us just create a ClientSource around the ClientInfo already on the channel (exactly as we do for same-process loads), and we no longer need to reconcile changes with the parent.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 02:47:57 +00:00
Matt Woodrow 73d8cfc1f5 Bug 1617434 - Move reserved client creation to parent-side with DocumentChannel. r=perry
Rather than creating a ClientSource in the content process for the initial URL, this changes us to just create the ClientInfo in the parent, as we do for redirects.

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

--HG--
extra : moz-landing-system : lando
2020-03-01 04:14:00 +00:00
Matt Woodrow 6831e61636 Bug 1617434 - Split ClientChannelHelper into three separate classes instead of having a mode variable. r=perry
This should be a no-op, but should make the following changes easier to reason about.

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

--HG--
extra : moz-landing-system : lando
2020-03-01 04:13:06 +00:00
Dorel Luca 109ac83385 Backed out 7 changesets (bug 1617500, bug 1617789, bug 1617434) for build bustage in dom/clients/manager/ClientChannelHelper.cpp
Backed out changeset 1a62904bfcb7 (bug 1617500)
Backed out changeset 592a5ddf6acf (bug 1617789)
Backed out changeset 995edb2e7f98 (bug 1617789)
Backed out changeset f3518664d654 (bug 1617789)
Backed out changeset 98ea95f7fe87 (bug 1617789)
Backed out changeset c5f1f70efb88 (bug 1617434)
Backed out changeset 1563faa24d15 (bug 1617434)
2020-03-01 05:57:57 +02:00
Matt Woodrow 78a45f7c57 Bug 1617434 - Move reserved client creation to parent-side with DocumentChannel. r=perry
Rather than creating a ClientSource in the content process for the initial URL, this changes us to just create the ClientInfo in the parent, as we do for redirects.

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

--HG--
extra : moz-landing-system : lando
2020-03-01 01:23:18 +00:00
Matt Woodrow 11dfeb128f Bug 1617434 - Split ClientChannelHelper into three separate classes instead of having a mode variable. r=perry
This should be a no-op, but should make the following changes easier to reason about.

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

--HG--
extra : moz-landing-system : lando
2020-03-01 01:23:05 +00:00
Perry Jiang 235ee6bbd9 Bug 1604847 - let ClientSourceOpChild finish initialization r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D63239

--HG--
extra : moz-landing-system : lando
2020-02-19 17:56:08 +00:00
Simon Giesecke 2cd99c7659 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/clients. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63144

--HG--
extra : moz-landing-system : lando
2020-02-20 16:12:23 +00:00
Boris Zbarsky f781fa6569 Bug 1615022 part 3. Disallow conversion of CopyableErrorResult to ErrorResult&. r=farre
This keeps us from passing it to functions that are planning to throw on the
ErrorResult and might throw a JS exception on it.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 10:19:05 +00:00
Boris Zbarsky 6c66fa85a4 Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 15:42:30 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Boris Zbarsky 747a4d9f0a Bug 1613013 part 1. Annotate DOMExceptions from WebIDL implementations with the method they come from. r=peterv
This adds the name of the interface and method to the beginning of the exception
string when reporting the exception from Web IDL codegen, so it's clearer what
was called.

Some existing error messages are adjusted to not duplicate the information
about which method was called.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 21:16:10 +00:00
Andrea Marchesini b13b3b72d2 Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 2 - CloneDataPolicy in writing, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61182

--HG--
extra : moz-landing-system : lando
2020-02-06 13:46:25 +00:00
Narcis Beleuzu d259fe38d8 Backed out 13 changesets (bug 1611855) for wpt failures on /audioworklet-postmessage-sharedarraybuffer.https.html . CLOSED TREE
Backed out changeset 2b661d588f96 (bug 1611855)
Backed out changeset 16094fc92bc9 (bug 1611855)
Backed out changeset 3f89bbcaff92 (bug 1611855)
Backed out changeset a906501b6d92 (bug 1611855)
Backed out changeset 54738b88425d (bug 1611855)
Backed out changeset d27de910a6c0 (bug 1611855)
Backed out changeset 261902f6336d (bug 1611855)
Backed out changeset 380d83b61e62 (bug 1611855)
Backed out changeset 39aac60ebf5e (bug 1611855)
Backed out changeset 5ea099787376 (bug 1611855)
Backed out changeset d0f58871f838 (bug 1611855)
Backed out changeset e1be102310a9 (bug 1611855)
Backed out changeset 633357835540 (bug 1611855)

--HG--
rename : dom/base/test/test_postMessages_workers.html => dom/base/test/test_postMessages.html
2020-02-06 12:31:36 +02:00
Andrea Marchesini 87b1a8a547 Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 2 - CloneDataPolicy in writing, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61182

--HG--
extra : moz-landing-system : lando
2020-02-05 22:07:34 +00:00
Boris Zbarsky b88d5ac5a8 Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267

--HG--
extra : moz-landing-system : lando
2020-02-03 20:19:11 +00:00
Boris Zbarsky 257ad3a634 Bug 1412856 part 6. Add more useful error messages for serviceworker exceptions. r=dom-workers-and-storage-reviewers,perry?
For some of these I had to take a guess due to lack of familiarity with this
code, so careful review of the actual strings would be much appreciated.

There's still a bunch of code in dom/serviceworkers that constructs a
CopyableErrorResult from just an nsresult, but I don't understand that code well
enough to write good error messages.

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

--HG--
extra : moz-landing-system : lando
2020-02-03 20:09:15 +00:00
Boris Zbarsky 92c3cdecf9 Bug 1412856 part 5. Remove use of NS_ERROR_DOM_TYPE_ERR from Clients.openWindow. r=dom-workers-and-storage-reviewers,perry?
Some of these error messages are not very informative; better ones would be appreciated.

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

--HG--
extra : moz-landing-system : lando
2020-01-30 08:33:32 +00:00
Boris Zbarsky 44423c8ecf Bug 1412856 part 4. Make SourcePromise have CopyableErrorResult as its rejection type. r=dom-workers-and-storage-reviewers,sg?
Differential Revision: https://phabricator.services.mozilla.com/D61199

--HG--
extra : moz-landing-system : lando
2020-01-30 08:54:55 +00:00
Boris Zbarsky 3c46021c3c Bug 1412856 part 2. Stop using NS_ERROR_DOM_TYPE_ERR in Client::Navigate. r=dom-workers-and-storage-reviewers,perry?
Differential Revision: https://phabricator.services.mozilla.com/D61197

--HG--
extra : moz-landing-system : lando
2020-01-30 08:09:38 +00:00
Boris Zbarsky a389959875 Bug 1412856 part 1. Change ClientOpPromise to use a CopyableErrorResult for its rejection type. r=dom-workers-and-storage-reviewers,sg?
Differential Revision: https://phabricator.services.mozilla.com/D61196

--HG--
extra : moz-landing-system : lando
2020-01-30 09:01:26 +00:00
Simon Giesecke b7632583c7 Bug 1539498 - Make SerializedStructuredCloneBuffer move-only. r=asuth,jld,baku
Replace all implicit copies by moves, or explicit clone operations.

Fixed a bug in /home/simon/work/ipdl/ipc/ipdl/ipdl/lower.py _cxxConstRefType,
which caused the const accessor to miss const on its return type for a moveonly
struct member.

Removed unused using directives for SerializedStructuredCloneBuffer in ipdl files.

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

--HG--
extra : moz-landing-system : lando
2020-02-01 15:16:43 +00:00
Oana Pop Rus 3e5b57f2d3 Backed out 3 changesets (bug 1539498, bug 1545196) for build bustages failures in DOMTypes.h on a CLOSED TREE
Backed out changeset 0f906da3634a (bug 1539498)
Backed out changeset ccc2f1aad57a (bug 1545196)
Backed out changeset 15e8d9547568 (bug 1545196)
2020-02-01 17:06:28 +02:00
Simon Giesecke 3c2df87890 Bug 1539498 - Make SerializedStructuredCloneBuffer move-only. r=asuth,jld,baku
Replace all implicit copies by moves, or explicit clone operations.

Fixed a bug in /home/simon/work/ipdl/ipc/ipdl/ipdl/lower.py _cxxConstRefType,
which caused the const accessor to miss const on its return type for a moveonly
struct member.

Removed unused using directives for SerializedStructuredCloneBuffer in ipdl files.

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

--HG--
extra : moz-landing-system : lando
2020-02-01 14:31:56 +00:00
pbz 70e1dba79e Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2020-01-16 14:38:40 +00:00
Oana Pop Rus 661db3a39f Backed out 7 changesets (bug 1432856) for build bustages failures in nsWindow.h on a CLOSED TREE
Backed out changeset 3d08c3cce533 (bug 1432856)
Backed out changeset 49d03dd89b17 (bug 1432856)
Backed out changeset 62fc84c8ce99 (bug 1432856)
Backed out changeset a8a4fa63f5b2 (bug 1432856)
Backed out changeset c81f3d5b9bf3 (bug 1432856)
Backed out changeset 8351a8b1d96a (bug 1432856)
Backed out changeset a303b775a51b (bug 1432856)
2019-12-16 23:53:35 +02:00
pbz e03ecc2171 Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2019-12-16 21:06:11 +00:00
Emilio Cobos Álvarez 25987bb3e9 Bug 1602317 - Remove some useless includes. r=heycam
This intended to fix some windows builds, but that didn't end up working.

This removes some unused members and such, and fixes some missing includes
that they uncover (whoops).

This was needed because some windows headers used in the sandbox redefine STRICT
(which is used by `StyleContain`) and `TRANSPARENT`, which is used by some WR
stuff.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 12:52:53 +00:00
Gabriele Svelto ace6d1063f 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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Liang-Heng Chen 272c2fb1bc Bug 1599083 - remove old ClientSource from ClientManagerService before adding new one; r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D55100

--HG--
extra : moz-landing-system : lando
2019-11-28 20:03:57 +00:00
Andrew Sutherland ff5627bc93 Bug 1583859 - ExecutionReadyPromise should not be exclusive. r=perry
Although many Clients API usages are inherently exclusive (a specific claim
or control request), the execution-ready promise is shared by all requests
to get the state of a client that is not yet execution ready.

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

--HG--
extra : moz-landing-system : lando
2019-10-23 17:55:38 +00:00
Matt Woodrow 51bb5e05f0 Bug 1583700 - Create a new ClientSource from a parent-allocated ClientInfo even for same-origin redirects, since there might have been a prior cross-origin redirect. r=perry,asuth
We fail navigation-redirect.https.html?client without this (with the subtest to redirects to a cross-origin page and then redirects back again to a same-origin page). In this case the ClientChannelHelper running in the child only sees a same-origin redirect (the first URL to the final one), but we've still allocated a new ClientInfo in the parent and we want to create the corresponding ClientSource.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 01:03:22 +00:00
shindli c5df88ff8f Backed out changeset 87c82b01a388 (bug 1583859) for causing bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h CLOSED TREE 2019-10-22 06:28:42 +03:00
Andrew Sutherland f2143eb0b7 Bug 1583859 - ExecutionReadyPromise should not be exclusive. r=perry
Although many Clients API usages are inherently exclusive (a specific claim
or control request), the execution-ready promise is shared by all requests
to get the state of a client that is not yet execution ready.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 01:55:07 +00:00
Mihai Alexandru Michis f3ba6ba32f Backed out 7 changesets (bug 1583700) for causing raptor dom failures.
Backed out changeset 48ceb0dd5d09 (bug 1583700)
Backed out changeset c662a369062f (bug 1583700)
Backed out changeset dc9e317da307 (bug 1583700)
Backed out changeset 41e07201a158 (bug 1583700)
Backed out changeset 015ec42c311a (bug 1583700)
Backed out changeset cfb571dd120a (bug 1583700)
Backed out changeset b9d06db6d43c (bug 1583700)
2019-10-22 03:57:07 +03:00
Matt Woodrow ac69d4fff8 Bug 1583700 - Create a new ClientSource from a parent-allocated ClientInfo even for same-origin redirects, since there might have been a prior cross-origin redirect. r=perry,asuth
We fail navigation-redirect.https.html?client without this (with the subtest to redirects to a cross-origin page and then redirects back again to a same-origin page). In this case the ClientChannelHelper running in the child only sees a same-origin redirect (the first URL to the final one), but we've still allocated a new ClientInfo in the parent and we want to create the corresponding ClientSource.

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

--HG--
extra : moz-landing-system : lando
2019-10-21 21:47:02 +00:00
Matt Woodrow 70bb7111fa Bug 1578624 - P4: Add an option to set mIsNavigating on the docshell when loading using BrowsingContext. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44760

--HG--
extra : moz-landing-system : lando
2019-10-11 02:27:05 +00:00
Brindusan Cristian ef3c975bc9 Backed out 11 changesets (bug 1578624) for build bustages. CLOSED TREE
Backed out changeset b22733eb880f (bug 1578624)
Backed out changeset cb5e15489635 (bug 1578624)
Backed out changeset f1746b2f9dec (bug 1578624)
Backed out changeset d08a099a22ff (bug 1578624)
Backed out changeset 8ebd563c72a8 (bug 1578624)
Backed out changeset d8bfec2dc9b6 (bug 1578624)
Backed out changeset 591664928bce (bug 1578624)
Backed out changeset 63f5a619b9ef (bug 1578624)
Backed out changeset ff67cc13cdf3 (bug 1578624)
Backed out changeset 43556c937a09 (bug 1578624)
Backed out changeset 49065a55694d (bug 1578624)
2019-10-09 11:50:37 +03:00
Matt Woodrow a48a476531 Bug 1578624 - P4: Add an option to set mIsNavigating on the docshell when loading using BrowsingContext. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44760

--HG--
extra : moz-landing-system : lando
2019-10-09 06:37:50 +00:00
Narcis Beleuzu 3429292547 Backed out 11 changesets (bug 1578624) for bustages on WindowGlobalChild.h . CLOSED TREE
Backed out changeset 478897956ee0 (bug 1578624)
Backed out changeset ab9c09164df0 (bug 1578624)
Backed out changeset f461f10efa46 (bug 1578624)
Backed out changeset 9b958693a003 (bug 1578624)
Backed out changeset 3b8220a15051 (bug 1578624)
Backed out changeset 180407dc57a8 (bug 1578624)
Backed out changeset bb11892e2171 (bug 1578624)
Backed out changeset 4f5c28244290 (bug 1578624)
Backed out changeset 6c02bbe5c1c5 (bug 1578624)
Backed out changeset 1d762fdce921 (bug 1578624)
Backed out changeset 818bc6e20c7d (bug 1578624)

--HG--
extra : histedit_source : ea22e628bf35425402009e9af274602f342a7476
2019-10-09 08:52:25 +03:00
Matt Woodrow 1696b97a9f Bug 1578624 - P4: Add an option to set mIsNavigating on the docshell when loading using BrowsingContext. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44760

--HG--
extra : moz-landing-system : lando
2019-10-09 04:50:16 +00:00
Nick Alexander c46ec74815 Bug 1580356 - Remove Fennec (Firefox for Android). r=snorp,mshal
This does many things:

1) stops producing (and consuming) `FennecJNI*` JNI wrappers
2) removes the :app and :thirdparty Gradle projects
3) removes relevant pieces of the Gradle target configuration
4) updates lints
5) purges old configurations

After this commit, the `mobile/android` project/application builds
only GeckoView.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 20:55:11 +00:00
Bogdan Tara e2c099719a Backed out changeset daecd36223c9 (bug 1584007) for ClientManagerService.cpp failures CLOSED TREE 2019-10-02 14:36:27 +03:00
Perry Jiang 4a333d538b Bug 1584007 - avoid race in ClientManagerService::FindSource r=asuth
This patch introduces the concept of a "future ClientSource" to the
ClientManagerService. A "future ClientSource" is registered/removed
from the ClientManagerService by
ClientManager::{Register,Forget}FutureClientSource and is required
when a ClientInfo is initially created without a backing ClientSource.

As a result, the ClientManagerService can distinguish between a
ClientSourceParent* that has yet to register itself with the
ClientManagerService and a ClientSourceParent* that has already
both registered and removed itself from the ClientManagerService.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:13:26 +00:00
Matt Woodrow f5fb83af9f Bug 1578690 - Only create a new promise in EnsureSource if we didn't already have one. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D47672

--HG--
extra : moz-landing-system : lando
2019-10-01 07:08:53 +00:00
Tom Tung 752128922c Bug 1562663 - P2 - Pass the agent cluster id to the ClientInfo so that we can check whether two clients are in the same agent cluster; r=nika
The agent cluster id is set when the EnsureClientSource is executed;

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

--HG--
extra : moz-landing-system : lando
2019-09-23 09:57:23 +00:00
Boris Zbarsky 12c0fbe48a Bug 927610 part 3. Stop using NS_ERROR_TYPE_ERR in serviceworker code. r=smaug
NS_ERROR_DOM_TYPE_ERR is not much better, but this at least allows us to get
rid of NS_ERROR_TYPE_ERR completely...

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

--HG--
extra : moz-landing-system : lando
2019-09-24 16:53:28 +00:00
Elliot Stirling 374680fc66 Bug 1511033 - Support ServiceWorkerClients.openWindow() r=geckoview-reviewers,snorp,smaug
Adds a ServiceWorkerDelegate to GeckoRuntime that allows GeckoView applications
to handle ServiceWorkerClient.openWindow() requests.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 11:29:30 +00:00
Jean-Yves Avenard 5749840f21 Bug 1556489 - P23 - Only create new ClientSource objects in the content, but use the recreated info from redirects in the parent. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D42260
2019-09-03 10:19:53 +10:00
Matt Woodrow 20e71d4c8a Bug 1556489 - P16. Add AddClientChannelHelperInParent helper method. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D40973
2019-09-03 10:19:37 +10:00
Kris Maglione dd810760b5 Bug 1561015: Part 2 - Return BrowsingContext from openWindow2. r=bzbarsky
There are some unfortunate aspects of openWindow() and openWindow2() that make
this difficult. Namely, they sometimes return top-level chrome windows, and
sometimes a single content window from the top-level chrome window that they
open, depending on how they're called.

There really isn't any reason to return a BrowsingContext rather than a chrome
window in the former case, but there also really isn't a way to make the API
polymorphic in a way that would allow handling the two cases differently. So
at some point, the two cases should ideally be split into separate APIs rather
than separate special cases of a single API.

In the mean time, I've left openWindow() returning local mozIDOMWindowProxy
objects, since it isn't used by the DOM window.open() or openDialog() APIs,
and only updated openWindow2(). As a follow-up, we should remove both
openWindow() and openWindow2(), and replace them with openChromeWindow() and
openContentWindow() (or similar) methods which make it immediately clear what
type of window is being returned.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 20:48:40 +00:00
Kris Maglione 22592538f5 Bug 1561015: Part 1 - Use BrowsingContext in window provider APIs. r=bzbarsky,mossop
This is the first step in making it possible to return remote WindowProxy
objects from window.open() and related APIs.

This patch also incidentally fixes a bug where getContentWindowOrOpenURI
returned the top-level browser window rather than the new content window when
passed OPEN_NEWWINDOW for the `aWhere` parameter. This was not the expected
behavior, and was a potentially major footgun for any new users who expected
to always get the content window for the URL they were loading, rather than
sometimes getting a chrome browser window instead.

For now, that case just returns null, which is only a minor footgun, rather
than the major one we had before.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 20:48:33 +00:00
Perry Jiang bdba1dc9d2 Bug 1557244 - Inherit controllers in parent-intercept mode r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D38686

--HG--
extra : moz-landing-system : lando
2019-07-26 18:40:05 +00:00
Perry Jiang 5cfd14bcfe Bug 1557244 - Inherit controllers for blob URL workers in child-intercept mode r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D38685

--HG--
extra : moz-landing-system : lando
2019-07-26 18:39:58 +00:00
Andrea Marchesini a9f2438114 Bug 1559919 - Finish the WorkerHolder cleanup - part 7 - IPCWorkerRef in ClientManagerChild, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35226

--HG--
extra : moz-landing-system : lando
2019-07-12 11:17:46 +00:00
arthur.iakab 7bc47eec9b Backed out 2 changesets (bug 1552168) for causing mochitest crashes on test_menubar.xul CLOSED TREE
Backed out changeset 83590619ce06 (bug 1552168)
Backed out changeset 7ff83cc5d33a (bug 1552168)
2019-07-03 16:08:23 +03:00
Sebastian Streich e7a3fe847e Bug 1552168 - Remove Pref data_uri.unique_opaque_origin r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35005

--HG--
extra : moz-landing-system : lando
2019-07-03 10:23:29 +00:00
Thomas Nguyen 01ff0bf93f Bug 1534681 Use ReferrerInfo class in document r=ckerschb,baku,Gijs
Also, in many place, we use document uri as referrer. It is not right
for the case srdoc iframe. We should use the last non-srdoc parent
document's uri

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

--HG--
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
extra : moz-landing-system : lando
2019-06-06 07:23:37 +00:00
Emilio Cobos Álvarez b6728cedb7 Bug 1553769 - Have a single way of requesting window focus and switching to a tab. r=NeilDeakin,snorp
Right now there's some duplicated code with the focus manager and the
DOMWindowFocus event.

Android didn't handle the new framefocusrequested event, so the test-cases in
bug 416771 still didn't work there.

I think using the focus manager codepath everywhere is preferable. I confirmed
manually that the stuff that sent DOMWindowFocus events still works as expected
with this patch (i.e., switching to the right tab when you click on a
notification, etc.).

This fixes it so that it works in Fennec, and it sends the focus events right in
GeckoView Example (i.e., we get here[1] properly).

The snippet that Snorp provided on IRC to implement the "bring activity to
front" stuff (`startActivity(getIntent())`) didn't actually work for me, but I
confirmed that the right message is sent when the focus is requested, and that
we get there.

[1]: https://searchfox.org/mozilla-central/rev/952521e6164ddffa3f34bc8cfa5a81afc5b859c4/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#503

Depends on D32353

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

--HG--
extra : moz-landing-system : lando
2019-06-03 19:42:28 +00:00
Ehsan Akhgari 98960a9c41 Bug 1554361 - Move the high-level storage access check APIs to mozilla/StorageAccess.h; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D32556

--HG--
extra : moz-landing-system : lando
2019-05-27 14:06:49 +00:00
Ehsan Akhgari e4067ede93 Bug 1547813 - Part 4: Rename StorageAccess::ePartitionedOrDeny to ePartitionTrackersOrDeny; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29739

--HG--
extra : moz-landing-system : lando
2019-05-25 01:25:35 +00:00
Christoph Kerschbaumer b282f81f84 Bug 965637: Move CSP from Principal into Client, part 2: worker changes. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D27655

--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:50 +00:00
Christoph Kerschbaumer b633427366 Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27654

--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:27 +00:00
Noemi Erli 6430d23336 Backed out 12 changesets (bug 1547813) for failures in browser_partitionedIndexedDB.js CLOSED TREE
Backed out changeset 98989127264b (bug 1547813)
Backed out changeset f9d790139a26 (bug 1547813)
Backed out changeset a29f58cef022 (bug 1547813)
Backed out changeset c1288949de1c (bug 1547813)
Backed out changeset 8cad4fd197b1 (bug 1547813)
Backed out changeset 807ce59e7e6e (bug 1547813)
Backed out changeset 06943593738c (bug 1547813)
Backed out changeset 4ced8d49ddc3 (bug 1547813)
Backed out changeset 77a040f527e9 (bug 1547813)
Backed out changeset b4651cfaff30 (bug 1547813)
Backed out changeset 279c140a4d71 (bug 1547813)
Backed out changeset 0e0241f3d366 (bug 1547813)
2019-05-09 20:04:16 +03:00
Ehsan Akhgari 1b4236b4ee Bug 1547813 - Part 4: Rename StorageAccess::ePartitionedOrDeny to ePartitionTrackersOrDeny; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29739

--HG--
extra : moz-landing-system : lando
2019-05-08 19:37:52 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Ehsan Akhgari 7b7c739afe Bug 1527287 - Add support for "noreferrer" feature argument to window.open(); r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28396
2019-04-24 20:29:19 -04:00
Christoph Kerschbaumer 42672fde72 Bug 1544863: Explicitly pass csp to createContentWindow(). r=Gijs,baku
Differential Revision: https://phabricator.services.mozilla.com/D27871

--HG--
extra : moz-landing-system : lando
2019-04-23 14:37:40 +00:00
Dorel Luca facaf244e4 Backed out changeset 7d3f2f4c53be (bug 1544863) for eslint failure 2019-04-23 17:16:13 +03:00
Christoph Kerschbaumer 73a324ee2d Bug 1544863: Explicitly pass csp to createContentWindow(). r=Gijs,baku
Differential Revision: https://phabricator.services.mozilla.com/D27871

--HG--
extra : moz-landing-system : lando
2019-04-23 13:02:40 +00:00
Andrea Marchesini 57535d8c79 Bug 1536411 - StoragePrincipal - part 0 - WorkerPrivate::StorageAccess, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24024

--HG--
extra : moz-landing-system : lando
2019-04-12 05:31:40 +00:00
Cosmin Sabou af07021e88 Backed out 10 changesets (bug 1536411) for causing leaks in CondVar, MessagePortService, MessagePortServiceData.
Backed out changeset eda5854cd7e8 (bug 1536411)
Backed out changeset f94dfbf2476c (bug 1536411)
Backed out changeset c68dc3152faa (bug 1536411)
Backed out changeset f67d157e8baf (bug 1536411)
Backed out changeset 1107a9767f38 (bug 1536411)
Backed out changeset ccbe1af00fb9 (bug 1536411)
Backed out changeset 552c4b588524 (bug 1536411)
Backed out changeset 2eb20578159b (bug 1536411)
Backed out changeset 45708d22bb6d (bug 1536411)
Backed out changeset 87601ef1d4d4 (bug 1536411)
2019-04-11 22:48:49 +03:00
Andrea Marchesini 4b6aa5b40f Bug 1536411 - StoragePrincipal - part 0 - WorkerPrivate::StorageAccess, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24024

--HG--
extra : moz-landing-system : lando
2019-04-11 16:26:49 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Jan Varga f5f2ed7bcb Bug 1517089 - Part 12: Implement ClientManagerService::HasWindow; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19206
2019-02-08 21:02:06 +01:00
Alex Gaynor 9a784d8ef8 Bug 1533066 - replace OptionalIPCClientInfo with IPCClientInfo? in IPDL; r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D22332

--HG--
extra : moz-landing-system : lando
2019-03-06 17:57:04 +00:00
Christoph Kerschbaumer 7c441f1bcb Bug 1518454: Part 1, backend changes, add CSP to loadURIOptions dictionary and pass CSP explicitly from frontend to docshell. r=bz 2019-02-21 16:00:32 +01:00
Christoph Kerschbaumer 54df1cb98c Bug 1528677: Remove nullchecks for loadinfo since we have loadinfo on all channels. r=baku 2019-02-20 13:27:25 +01:00
Thomas Nguyen 92cca5e26c Bug 1517703 - Part 1 - Implement ReferrerInfo class r=smaug
The class contains original full referrer and referrer policy will be
applied to the referrer.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 19:35:32 +00:00
Ehsan Akhgari 4137a92662 Bug 1514340 - Part 2: Break out the content blocking related notifications into nsIWebProgressListener.onContentBlockingEvent(); r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D16052
2019-01-21 09:58:50 -05:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Kyle Machulis 7ce2d5568b Bug 1497995 - Make URI a constructor argument of nsDocShellLoadState; r=bzbarsky
We'll always need a URI for DocShellLoadState, and it should only
change is special circumstances. Construct the object with it, and
then follow up in Bug 1515433 for more cleanup.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 20:17:43 +00:00
Blake Kaplan cb3d965403 Bug 1514894 - Tell the new content process about its principal. r=asuth
By forcing our subject principal to be that of the service worker, we confuse
the permissions-checking code in the new process we create for
clients.openWindow. We need to tell the new process about the principal that's
doing work before it does any work.

Further principals (such as the principal for the loaded page) will be passed
down to the child via the various networking channels that we create for it.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 22:00:09 +00:00
Bogdan Tara 69fe878c79 Backed out changeset ddb6f7d7a0e3 (bug 1514894) for ClientManagerService related build bustages CLOSED TREE 2018-12-18 21:22:18 +02:00
Blake Kaplan ba862815a3 Bug 1514894 - Tell the new content process about its principal. r=asuth
By forcing our subject principal to be that of the service worker, we confuse
the permissions-checking code in the new process we create for
clients.openWindow. We need to tell the new process about the principal that's
doing work before it does any work.

Further principals (such as the principal for the loaded page) will be passed
down to the child via the various networking channels that we create for it.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 18:59:16 +00:00
James Willcox 6042d9482d Bug 1511132 - Disable ServiceWindowClients.openWindow() under GeckoView r=asuth
This also disables test_openWindow.html when running in GeckoView.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 21:28:14 +00:00
Jean-Yves Avenard c9d5db990f Bug 1512456 - P10. Add missing return. r=baku
The missing return would have caused an assertion if OpenWindow had failed as you can't reject a promise twice.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 12:05:03 +00:00
Jean-Yves Avenard b61cc66043 Bug 1512456 - P7. Chain promises so they can be exclusive. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D14031

--HG--
extra : moz-landing-system : lando
2018-12-11 10:54:20 +00:00
Jean-Yves Avenard dc9ee1f6ee Bug 1512456 - P6. Tidy up some MozPromise usage. r=gerald
Make consistent use of MozPromise chaining where possible and remove unnecessary refcount.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 10:54:48 +00:00
Jean-Yves Avenard ebce26bb61 Bug 1512456 - P3. Minor cleanup usage of GenericPromise. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D14026

--HG--
extra : moz-landing-system : lando
2018-12-11 10:46:21 +00:00
Ehsan Akhgari 0dcf936804 Bug 1510911 - Part 2: Backout changeset f8849239da42 (bug 1493563 - Part 5) for regressing performance 2018-12-03 14:27:53 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Gabriele Svelto 566f669d07 Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12728

--HG--
extra : moz-landing-system : lando
2018-11-26 14:49:44 +00:00
Perry Jiang 71c4ea8b76 Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap
- Expose FetchEvent.resultingClientId on non-subresource, non-"report"-destination requests.
- Delay Clients.get(FetchEvent.resultingClientId) resolution until the resulting client is execution ready.
- Add WPTs to test for existence of resultingClientId and Clients.get promise resolution values.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 08:28:23 +00:00
Andrea Marchesini 375ae1c863 Bug 1505212 - Partitioned localStorage for 3rd party tracker pages, r=ehsan, r=asuth
LocalStorage needs to be exposed in every context except for sandboxes and
NullPrincipals (data: URLs, for instance). But we need to keep data
separate in some scenarios: private-browsing and trackers.
In private-browsing, LocalStorage keeps data in memory, and it shares
StorageEvents just with other origins in the same private-browsing
environment.
For Trackers, we expose a partitioned LocalStorage, which doesn't share
data with other contexts, and it's just in memory. Partitioned localStorage
is available only for trackers listed in the
privacy.restrict3rdpartystorage.partitionedHosts pref. See
nsContentUtils::IsURIInPrefList to know the syntax for the pref value.
2018-11-13 09:51:14 +01:00
Kyle Machulis 6d3b4e7492 Bug 1492648 - Move from nsDocShellLoadInfo to nsDocShellLoadState; r=bz, nika
Creates the nsDocShellLoadState object, which is basically
nsDocShellLoadInfo plus a few extra fields to make it usable as a
single argument to nsDocShell::LoadURI (and eventually
nsDocShell::InternalLoad).

Subframe history handling is a huge logic block in
nsDocShell::LoadURI, which is only used on history loads. This patch
also extracts the logic out into its own function to make the body of
LoadURI clearer.
2018-10-29 17:13:29 -07:00
Kyle Machulis ee8ccacb05 Backed out changeset fa8487b94a38 due to a=BUSTAGE on comm-central 2018-10-29 12:28:02 -07:00
Andrea Marchesini 5993c288fc Bug 1502802 - Implement PostMessageOptions for Client and ServiceWorker, r=smaug 2018-10-29 16:26:30 +01:00
Kyle Machulis ca0550b32b Bug 1492648 - Move from nsDocShellLoadInfo to nsDocShellLoadState r=bzbarsky,nika
Creates the nsDocShellLoadState object, which is basically
nsDocShellLoadInfo plus a few extra fields to make it usable as a
single argument to nsDocShell::LoadURI (and eventually
nsDocShell::InternalLoad).

Subframe history handling is a huge logic block in
nsDocShell::LoadURI, which is only used on history loads. This patch
also extracts the logic out into its own function to make the body of
LoadURI clearer.

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

--HG--
rename : docshell/base/nsDocShellLoadInfo.cpp => docshell/base/nsDocShellLoadState.cpp
rename : docshell/base/nsDocShellLoadInfo.h => docshell/base/nsDocShellLoadState.h
extra : moz-landing-system : lando
2018-10-26 03:50:37 +00:00
Narcis Beleuzu 5d00f78a13 Backed out changeset 8dd09fad1f35 (bug 1492648) for bc failures on browser_auto_close_window.js
--HG--
rename : docshell/base/nsDocShellLoadState.cpp => docshell/base/nsDocShellLoadInfo.cpp
rename : docshell/base/nsDocShellLoadState.h => docshell/base/nsDocShellLoadInfo.h
2018-10-19 10:11:33 +03:00
Kyle Machulis 0bb3246aa5 Bug 1492648 - Move from nsDocShellLoadInfo to nsDocShellLoadState r=bzbarsky,nika
Creates the nsDocShellLoadState object, which is basically
nsDocShellLoadInfo plus a few extra fields to make it usable as a
single argument to nsDocShell::LoadURI (and eventually
nsDocShell::InternalLoad).

Subframe history handling is a huge logic block in
nsDocShell::LoadURI, which is only used on history loads. This patch
also extracts the logic out into its own function to make the body of
LoadURI clearer.

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

--HG--
rename : docshell/base/nsDocShellLoadInfo.cpp => docshell/base/nsDocShellLoadState.cpp
rename : docshell/base/nsDocShellLoadInfo.h => docshell/base/nsDocShellLoadState.h
extra : moz-landing-system : lando
2018-10-18 22:14:54 +00:00
Yaron Tausky f6f1bde06f Bug 1263734: Implement ServiceWorkerContainer.startMessages() r=asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D4237

--HG--
extra : moz-landing-system : lando
2018-10-11 12:37:37 +00:00
Dorel Luca 14654707e6 Backed out changeset 2c01f22661fa (bug 1263734) for wpt failures in fetch/api/request/destination/fetch-destination-no-load-event.https.html. CLOSED TREE 2018-10-10 18:31:01 +03:00
Yaron Tausky 286a3c2333 Bug 1263734: Implement ServiceWorkerContainer.startMessages() r=asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D4237

--HG--
extra : moz-landing-system : lando
2018-10-10 13:55:23 +00:00
Ehsan Akhgari 5f0be07390 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 14:46:02 -04:00
Noemi Erli 4419e20e14 Backed out 12 changesets (bug 1493563) for failures in test_css-logic-getCssPath.html CLOSED TREE
Backed out changeset d2e83655082f (bug 1493563)
Backed out changeset 1ce58f004593 (bug 1493563)
Backed out changeset 344298c73ee7 (bug 1493563)
Backed out changeset 02b8b073f7d7 (bug 1493563)
Backed out changeset 3ef707008502 (bug 1493563)
Backed out changeset bb2720a401fe (bug 1493563)
Backed out changeset ce0211be57a1 (bug 1493563)
Backed out changeset 83d6c2bf8dc6 (bug 1493563)
Backed out changeset 1844af4cc25b (bug 1493563)
Backed out changeset c8ab17addb7a (bug 1493563)
Backed out changeset a1ff0cd62563 (bug 1493563)
Backed out changeset 932b41e211e0 (bug 1493563)
2018-09-28 21:31:18 +03:00
Ehsan Akhgari f0108e78c2 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-28 13:24:41 -04:00
Tiberius Oros 70e8d3a299 Backed out 11 changesets (bug 1493563) for failures on dom/workers/test/test_sharedworker_event_listener_leaks.html on a CLOSED TREE
Backed out changeset 0bb55b604bfd (bug 1493563)
Backed out changeset 8e25c301675a (bug 1493563)
Backed out changeset 4f608b8801d4 (bug 1493563)
Backed out changeset f58d0b1ca088 (bug 1493563)
Backed out changeset eae105f2bf6d (bug 1493563)
Backed out changeset 7a8a0d1cfd69 (bug 1493563)
Backed out changeset dbba8451aab1 (bug 1493563)
Backed out changeset a6141dbd0328 (bug 1493563)
Backed out changeset f4ca3d8fa90e (bug 1493563)
Backed out changeset 56bab7fae64d (bug 1493563)
Backed out changeset 66787e603401 (bug 1493563)
2018-09-26 06:16:22 +03:00
Ehsan Akhgari 4ced8fedcb Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-25 21:02:51 -04:00
Tiberius Oros 8acb878ef1 Backed out 11 changesets (bug 1493563) for failures on browser_blockingCookies.js on a CLOSED TREE
Backed out changeset d755b96837ac (bug 1493563)
Backed out changeset 651f87dca51f (bug 1493563)
Backed out changeset 68de8f0866d0 (bug 1493563)
Backed out changeset 205d69890f50 (bug 1493563)
Backed out changeset 5f922cd6c21e (bug 1493563)
Backed out changeset 84dc54c1a9c1 (bug 1493563)
Backed out changeset 287666ecdd17 (bug 1493563)
Backed out changeset c64a2ea15b7b (bug 1493563)
Backed out changeset 9085269938cd (bug 1493563)
Backed out changeset de06604fefcb (bug 1493563)
Backed out changeset f9bac5e73bd4 (bug 1493563)
2018-09-25 23:12:03 +03:00
Ehsan Akhgari 59e50ba2d0 Bug 1493563 - Part 5: Present the old state and the content blocking log to the web progress listeners; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6595
2018-09-25 13:51:47 -04:00
Margareta Eliza Balazs ffe6eaf2f0 Merge inbound to mozilla-central. a=merge 2018-09-25 12:42:09 +03:00
Christoph Kerschbaumer 60e3239dee Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-25 07:25:05 +02:00
Tim Huang 5b0ad75d1c Bug 680300 - Part 3: Make the client.navigate() not to reference the baseURL if it navigates to a view-source URL r=asuth
The suppressing of the error NS_ERROR_UNKNOWN_PROTOCOL will break the
web-platform-test 'windowclient-navigate.https.html' since navigating
to an invalid view-source url through the client API won't receive
any error due to the suppressing. So the test will time-out since it
waits for an error.

While navigating to an invalid view-source url with its inner url as
relative, this will pass the validity check we have right now and
do the navigation because of it takes account the baseURL while doing
the check. The invalid view-source url will be resolved into a valid
view-source url in the case. Fortunately, we won't encounter any issue
in the test in the past since the docShell will block this loading
because it's loading a view-source url inside an iframe and reports a
NS_ERROR_UNKNOWN_PROTOCOL error. But, we should faild with a
NS_ERROR_MALFORMED_URI error when doing the URL validity check.

For addressing this, this patch makes the client.navigate to not take
the baseURL into account if it is a view-source URL.

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

--HG--
extra : moz-landing-system : lando
2018-09-24 18:22:26 +00:00
shindli 0b6d93ef4d Backed out changeset 510e95767aeb (bug 1490874) for security failures in browser/components/payments/test/mochitest/test_basic_card_form.html CLOSED TREE 2018-09-24 11:43:30 +03:00
Christoph Kerschbaumer 0df81cd9f4 Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-24 09:34:04 +02:00
Gabriele Svelto 6bddc0a55e Bug 1486772 - Refactor the screen-orientation types and headers r=smaug
This patch removes the 'ScreenOrientationInternal' type from
dom/base/ScreenOrientation.h and moves it into the
HalScreenConfiguration.h header, renaming it simply to 'ScreenOrientation'
in the process. This has several knock-off effects:

- It allows files that needed ScreenOrientationInternal to include a much
  smaller header than before

- It greatly reduces the number of headers pulled in when including Hal.h

- It clarifies the role of the type. The 'Internal' part in the name had
  nothing to do with it being part of the implementation. The type was public
  and called that way only to avoid clashing with the 'ScreenOrientation'
  class. Since we moved it into a different namespace it can be renamed
  safely.

- It allows a file that was manually re-declaring 'ScreenConfigurationInternal'
  type to use the original one

- Finally this fixes a few files which were missing headers they actually
  required but that would still build because unified compilation put them into
  units that already had those headers thanks to ScreenConfiguration.h

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

--HG--
extra : moz-landing-system : lando
2018-08-29 20:54:56 +00:00
Jan de Mooij e0ef865217 Bug 1479363 part 5 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in remaining dom/ directories. r=mccr8 2018-08-02 08:49:00 +02:00
Jan de Mooij 80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Brian Hackett 3354a96d8d Bug 1465287 Part 8 - Allow spawning recording/replaying child processes and saving recordings, r=jld,mrbkap.
--HG--
extra : rebase_source : 1da4b1a7e485cfdafb38318860546ce3d0552815
2018-07-22 11:52:42 +00:00
Andrea Marchesini bc5414c5f3 Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
Kyle Machulis 5e51176ffa Bug 1472087 - Remove nsDocShellLoadInfo::LoadTypes; r=nika
We have 2 different LoadType enums with two different values, which
have to be converted between depending on whether we're going to/from
LoadInfo/nsISHEntry/etc. We should be able to just use the same enum
everywhere and not have to deal with conversion, especially since we
don't have any type safety around the enum.

MozReview-Commit-ID: 2t9vVGLpOte
2018-07-11 20:19:18 -07:00
Kyle Machulis 17f492c9c1 Bug 1472087 - deCOMtaminate nsIDocShellLoadInfo; r=nika
Change all references from nsIDocShellLoadInfo to nsDocShellLoadInfo

MozReview-Commit-ID: AyKlZUtSEDD
2018-07-11 20:19:14 -07:00
Ben Kelly 78b42d6228 Bug 1469873 Make ClientSource::Control() fail if storage access is not available and make claim() respect the result. r=mrbkap 2018-06-28 12:58:23 -07:00
Brindusan Cristian c20abdcc34 Backed out changeset b610acdb4ead (bug 1469873) for mochitest crashes on xul.dll. CLOSED TREE 2018-06-28 20:09:59 +03:00
Ben Kelly a17ff40103 Bug 1469873 Make ClientSource::Control() fail if storage access is not available and make claim() respect the result. r=mrbkap 2018-06-28 06:27:57 -07:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Ben Kelly a11f4b5b1d Bug 1469941 Note DOMContentLoaded on the ClientSource and trigger service worker update in appropriate process. r=mrbkap 2018-06-23 10:11:47 -07:00
Ben Kelly 9258565483 Bug 1469882 Don't consult child process ServiceWorkerManager when populating MessageEvent.source with the e10s pref flipped. r=mrbkap 2018-06-23 10:10:53 -07:00
Ben Kelly 05c034e494 Bug 1468853 Note inherited controller in the parent process when the service worker e10s pref is flipped. r=mrbkap 2018-06-22 07:22:59 -07:00
Dorel Luca 535f1df913 Merge mozilla-central to mozilla-inbound 2018-06-04 21:48:29 +03:00
Ben Kelly ac7ea6f3f6 Bug 1441932 P4 Treat same-value assignments to the LoadInfo reserved and initial ClientInfo values as no-op changes. r=mayhemer 2018-06-04 09:26:51 -07:00
Ben Kelly e418cc65b0 Bug 1462069 P2 Make ClientManagerService forward claim() requests to the main thread SWM when the pref is set. r=baku 2018-06-04 09:10:50 -07:00
Ben Kelly f5141d8667 Bug 1462069 P1 Make ServiceWorkerManager::MaybeClaimClient() take a ClientInfo instead of nsIDocument. r=baku 2018-06-04 09:10:50 -07:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Gurzau Raul dd2e67b482 Backed out 3 changesets (bug 1462069) for build bustage on /src/dom/clients/manager/ClientManagerService.cpp on a CLOSED TREE
Backed out changeset 999be9379af3 (bug 1462069)
Backed out changeset 457cb3f8a0d9 (bug 1462069)
Backed out changeset ec66aff745a8 (bug 1462069)
2018-06-01 23:57:36 +03:00
Ben Kelly 9e0e3a5c87 Bug 1462069 P2 Make ClientManagerService forward claim() requests to the main thread SWM when the pref is set. r=baku 2018-06-01 13:39:57 -07:00
Ben Kelly 6d1736c617 Bug 1462069 P1 Make ServiceWorkerManager::MaybeClaimClient() take a ClientInfo instead of nsIDocument. r=baku 2018-06-01 13:39:57 -07:00
Ben Kelly 08be40bcc5 Bug 1465103 Convert service worker and clients release assertions to diagnostic assertions. r=asuth 2018-06-01 13:36:34 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Ben Kelly 96ee01e3b4 Bug 1462077 P2 Add a release assert in ClientHandle::Control() that enforces same-origin policy. r=asuth 2018-05-16 14:18:36 -07:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Ben Kelly 2a66c823ae Bug 1461326 Add some release assertions to dom/clients/manager code. r=baku 2018-05-15 08:53:54 -07:00
Ben Kelly 04944e362f Bug 1458971 P2 Make ClientSourceOpPromise hold the operation promise alive. r=baku 2018-05-09 08:48:01 -07:00
Ben Kelly e2fb37ef0a Bug 1458971 Make operation actors explicitly hold references to the initiating object instead of using an extra MozPromise::Then(). r=baku 2018-05-08 08:11:58 -07:00
Ben Kelly 8ffadd093a Bug 1457157 P5 Make ClientManager keep its actor alive until the worker reaches Terminating. r=baku 2018-05-02 06:29:27 -07:00
Ben Kelly 173b706d4d Bug 1457157 P4 Use DOMMozPromiseRequestHolder in ClientSource. r=baku 2018-05-02 06:29:27 -07:00
Ben Kelly 24a39442fe Bug 1457157 P3 Replace ClientHandleOpChild MozPromise direct std::function callbacks. r=baku 2018-05-02 06:29:27 -07:00
Ben Kelly 0ece66c8ff Bug 1457157 P1 Use DOMMozPromiseRequestHolder in the clients API binding objects. r=baku 2018-05-02 06:29:26 -07:00
Tiberius Oros 78bac61f63 Backed out 7 changesets (bug 1450644, bug 1454633) for for failing browser_storage_permission.js on a CLOSED TREE
Backed out changeset f4989e0da221 (bug 1454633)
Backed out changeset 08239799d43e (bug 1450644)
Backed out changeset cbe3ad4833b6 (bug 1450644)
Backed out changeset 0d2088370d0c (bug 1450644)
Backed out changeset 246fb3ee14cd (bug 1450644)
Backed out changeset 629e499c0f75 (bug 1450644)
Backed out changeset ed93e3547096 (bug 1450644)
2018-04-18 01:10:26 +03:00
Ben Kelly 9fc1327a84 Bug 1452528 Don't clear the controller on non-subresource channel loads when redirect mode is "follow". r=baku 2018-04-17 12:38:34 -07:00
Andrea Marchesini f5dccf62ee Bug 1454633 - Client API doesn't need to use WorkerHolder with status = Closing, r=bkelly 2018-04-17 20:51:04 +02:00
Cosmin Sabou 254334df5b Backed out changeset 64ca4238a420 (bug 1454633) for mochitest failures on dom/workers/test/test_WorkerDebugger.xul. CLOSED TREE 2018-04-17 17:41:02 +03:00
Andrea Marchesini 113e0a55d9 Bug 1454633 Client API doesn't need to use WorkerHolder with status = Closing, r=bkelly
This is not needed because Client API is used in ServiceWorkerGlobalScope where
self.close() doesn't exist.
2018-04-17 15:57:46 +02:00
Nika Layzell da7423dfa5 Bug 1444151 - Part 4: Remove the now-unnecessary xpcom-style segment getters, r=valentin 2018-04-10 17:49:50 -04:00
Boris Zbarsky 4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Andrew Sutherland 4d059b2890 Bug 1446225 - Ensure client id's are consistently {}-less UUIDs. r=catalinb
Our Client.id values were being normalized from "{uuid}" to "uuid", but not
our FetchEvent.clientId values.  Because nsID::Parse accepts both forms,
this was not being caught by any tests.

Although there are ServiceWorker WPT tests that verify consistency of
returned Client.id values across multiple matchAll invocations (ex:
client-id.https.html), there are no tests that compare Client.id with
FetchEvent.clientId.  All the tests largely use Clients.get() to verify
correctness/round-tripping.  I looked into adding WPT tests, but we
quickly run into the test logistics problem where it's preferable to
avoid adding tests that involve effectively global state.

So, this patch:
- Changes Clients::Get() to explicitly treat client id's that start with a
  "{" as invalid.  This causes existing FetchEvent.clientId-related WPT
  tests to fail, as we would hope.
- Duplicates the client id normalization logic that strips {} for the
  FetchEvent.clientId to its point of origin in
  ContinueDispatchFetchEventRunnable::Run.
- Augments our dom/serviceworkers/test/test_match_all_client_properties.html
  test, which has been enforcing {}-less UUIDs for a while, to also test
  FetchEvent.clientId to verify it conforms.  I added some comments to the
  test files too.

--HG--
extra : rebase_source : dd6d07ea880eb2c3115d8810ea246b4469ad5f96
2018-03-22 11:33:13 -04:00
Ben Kelly c7543d428d Bug 1441133 P1 Don't assert storage permission on windows that inherit the service worker. r=asuth 2018-03-01 08:13:56 -08:00
Sebastian Hengst 3eb3941bc5 Backed out 2 changesets (bug 1441133) for build bustage in beta simulations at dom/clients/manager/ClientSource.cpp:402: unused variable 'wp'. a=backout
Backed out changeset 275855621865 (bug 1441133)
Backed out changeset 7a4546e25adc (bug 1441133)

--HG--
extra : histedit_source : d38746923972091f05ad8f435c39e7fe38e57a18
2018-03-01 11:55:28 +02:00
Ben Kelly 8c55bc6898 Bug 1440705 P3 Assert that a client and its controlling service worker have a matching principal. r=asuth 2018-02-28 10:32:50 -08:00
Ben Kelly 0dd1174a39 Bug 1440705 P2 Separate ClientMatchPrincipalInfo() into a separate method and header. r=asuth 2018-02-28 10:32:50 -08:00
Ben Kelly c6a37e4357 Bug 1441133 P1 Don't assert storage permission on windows that inherit the service worker. r=asuth 2018-02-28 10:31:29 -08:00
Ben Kelly e67b89fe1c Bug 1439099 P2 Remove ServiceWorkerRegistrationInfo::GetByID(). r=asuth 2018-02-19 12:06:19 -08:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Boris Zbarsky 478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Nika Layzell 785a14270e Bug 1431867 - Part 2: Add move constructors and assignment operators to IPDL unions, r=mccr8
MozReview-Commit-ID: IQVODEfMGi9
2018-02-01 11:30:50 -05:00
Ben Kelly af73b55e78 Bug 1434342 P7 Use the global to GetOrCreate the ServiceWorker DOM instance. r=asuth 2018-01-31 09:10:27 -08:00
Andrea Marchesini 26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Andrea Marchesini a5bed23bd8 Bug 1432963 - Fixing workers headers - part 15 - static function in a workers namespace, r=smaug 2018-01-31 08:24:30 +01:00
Andrea Marchesini 2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
Andrea Marchesini 063723a1f0 Bug 1432963 - Fixing workers headers - part 13 - WorkerHolder without workers namespace, r=smaug 2018-01-31 08:23:44 +01:00
Andrea Marchesini 528066218f Bug 1432963 - Fixing workers headers - part 8 - WorkerTargetHolder without workers namespace, r=smaug 2018-01-31 08:21:27 +01:00
Andrea Marchesini 9774cec092 Bug 1413112 - Fixing includes in dom/workers, r=bkelly 2018-01-30 10:14:00 +01:00
Ben Kelly e71d8db226 Bug 1430139 P3 Remove workers namespace from service worker code. r=asuth 2018-01-26 13:08:59 -08:00
Ben Kelly 9225189e3a Bug 1231211 P3 Serialize LoadInfo's mClientInfo, mReservedClientInfo, and mReservedClientInfo members across IPC. r=valentin 2018-01-23 10:38:52 -05:00
Boris Zbarsky 16c84b6c1b Bug 1431846 part 2. Rename nsPIDOMWindowInner::GetNavigator() to Navigator(), since it never returns null. r=mystor
Also have it return a dom::Navigator.

MozReview-Commit-ID: 5thGopGWIk9
2018-01-22 12:59:15 -05:00
Andrew Osmond 83aecd3510 Bug 1431079 - Ensure we don't attempt to launch content processes during shutdown. r=smaug 2018-01-22 06:11:46 -06:00
Hiroyuki Ikezoe 7ec737b816 Bug 1431295 - Drop 'undef None' macro in dom/. r=baku
MozReview-Commit-ID: Fmd4A2c7yUu

--HG--
extra : rebase_source : fdad8ac6276efa1a3612eb1c9a2a9478270d426d
2018-01-18 14:12:51 +09:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Ben Kelly b7d9339122 Bug 1425975 P14 Assert that storage is allowed when a ClientSource is both execution ready and controlled. r=asuth 2018-01-05 12:10:22 -05:00
Ben Kelly 423f2202f9 Bug 1425975 P13 Check for a different final document principal and reset the ClientSource when it happens. r=asuth 2018-01-05 12:10:22 -05:00
Ben Kelly ed3bd4b27a Bug 1425975 P1 Add ClientHandle::OnDetach() which returns a MozPromise that resolves on actor destruction. r=asuth 2018-01-05 12:10:20 -05:00
Csoregi Natalia 0bf10c4d4e Backed out 14 changesets (bug 1425975) for M(5) permafails mochitest/test_ext_webrequest_filter.html. r=backout a=backout
Backed out changeset e6f4a2d1df9a (bug 1425975)
Backed out changeset 1e657fa97b71 (bug 1425975)
Backed out changeset 9e1544ec814d (bug 1425975)
Backed out changeset 0e50d9d1d069 (bug 1425975)
Backed out changeset fb89dbd922ba (bug 1425975)
Backed out changeset f2b451ce55d4 (bug 1425975)
Backed out changeset 4ce186c6d8f5 (bug 1425975)
Backed out changeset 6f520ab76d6a (bug 1425975)
Backed out changeset f091f5e182c4 (bug 1425975)
Backed out changeset 82d39ed8c831 (bug 1425975)
Backed out changeset df13eba47970 (bug 1425975)
Backed out changeset 553628a56e6a (bug 1425975)
Backed out changeset acf4d61babab (bug 1425975)
Backed out changeset b7ae11b5bce8 (bug 1425975)
2017-12-24 00:23:57 +02:00
Ben Kelly e6fd22c374 Bug 1425975 P14 Assert that storage is allowed when a ClientSource is both execution ready and controlled. r=asuth 2017-12-22 21:09:20 -05:00
Ben Kelly 8a4820ecbd Bug 1425975 P13 Check for a different final document principal and reset the ClientSource when it happens. r=asuth 2017-12-22 21:09:20 -05:00
Ben Kelly 8e2abf779f Bug 1425975 P1 Add ClientHandle::OnDetach() which returns a MozPromise that resolves on actor destruction. r=asuth 2017-12-22 21:09:17 -05:00
Ben Kelly 0c4c26f91f Bug 1426253 P4 Assert that ClientSource::SetController() is never called on a client in private browsing mode. r=asuth 2017-12-20 10:53:19 -05:00
Ben Kelly 7c2e00408e Bug 1426253 P2 Use nsIDocument::GetClientInfo() where possible. r=asuth 2017-12-20 10:53:18 -05:00
Ben Kelly 36ae9f5253 Bug 1425316 P4 Note that a ClientSource has called register() for a SW scope and use it to match window console reports. r=asuth 2017-12-19 10:04:48 -05:00
Ben Kelly 13b91bfce7 Bug 1425614 P2 Make ClientManager and ClientHandle operation promises reject if called on a worker thread already shutting down. r=asuth 2017-12-18 16:42:10 -05:00
Ben Kelly 90251dcbd7 Bug 1425614 P1 Make ClientThing::MaybeExecute() call an optional failure callback. r=asuth 2017-12-18 16:42:10 -05:00
Ben Kelly 41971c4dc5 Bug 1425704 Fix nullptr deref in android-only Clients.openWindow() when browser is not running. r=asuth 2017-12-18 11:55:18 -05:00
Ben Kelly 63c97930f1 Bug 1293277 P7 Make ServiceWorkerManager use ClientHandle::Control() for claiming and ClientSource::SetController() fire the controller change event. r=baku 2017-12-12 15:44:48 -05:00
Ben Kelly cfb0e62f7b Bug 1293277 P5 Switch bindings over to new Client and Clients classes. r=baku 2017-12-12 15:44:47 -05:00
Ben Kelly 4bede347d6 Bug 1293277 P4 Add Client and Clients DOM classes, but don't hook them into bindings yet. r=baku 2017-12-12 15:44:47 -05:00
Ben Kelly 64d85c2b66 Bug 1293277 P1 Capture StorageAccess when snapshoting ClientSource state. r=baku 2017-12-12 15:44:46 -05:00
Ben Kelly 3816f9801c Bug 1424338 P7 Remove the ClientEndPoint union type for now. r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly 32b65c1d6c Bug 1424338 P6 Implement ClientHandle::PostMessage() r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly daf4ea918b Bug 1424338 P5 Implement ClientHandle::Focus(). r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly 280fdf002f Bug 1424338 P4 Implement ClientManager::OpenWindow(). r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly 80571616a2 Bug 1424338 P3 Add ClientManager::Navigate() method. r=baku 2017-12-08 14:46:42 -05:00
Ben Kelly c911e0c6bb Bug 1424338 P2 Add ClientManager::Claim() message to matching ClientSource objects. r=baku 2017-12-08 14:46:42 -05:00
Ben Kelly 783e26e13e Bug 1424338 P1 Implement ClientManager::MatchAll() to support clients.matchAll() WebAPI. r=baku 2017-12-08 14:46:42 -05:00
Ben Kelly 4e2dc7e51f Bug 1423913 P3 Don't register more shutdown handle if we create more than one ClientManagerService instance. r=baku 2017-12-08 11:52:07 -05:00
Ben Kelly 65e9628fa6 Bug 1423913 P2 Make callers expect infallble CreateSource() and CreateHandle(). r=baku 2017-12-08 11:52:07 -05:00
Ben Kelly 10e891e2d2 Bug 1423913 P1 Make ClientManager::CreateSource() and CreateHandle() infallible. Errors result in a detached object instead of nullptr. r=baku 2017-12-08 11:52:06 -05:00
Ben Kelly 45d997d075 Bug 1423412 P4 Add a ClientManager::GetInfoAndState() that retrieves the ClientInfo and ClientState for a given ID. r=baku 2017-12-05 20:45:23 -05:00
Ben Kelly dc20c8c537 Bug 1423412 P2 Copy the service worker controller across redirects by default and clear it explicitly for non-subresource redirects. r=baku 2017-12-05 20:45:23 -05:00
Ben Kelly fb38b7b228 Bug 1423412 P1 Actually mark window/worker ClientSource objects controlled when loaded with a controlling service worker. r=baku r=jld 2017-12-05 20:45:22 -05:00
Ben Kelly bdf8207a0f Bug 1423328 Allow a caller to set a ClientSource controlled by a service worker using a ClientHandle. r=baku 2017-12-05 14:54:10 -05:00
Ben Kelly 2982dea3de Bug 1422983 Cycle collect the ClientSource object when owned by an nsGlobalWindowInner or nsDocShell object. r=mccr8 2017-12-04 22:13:33 -05:00
Ben Kelly ae0ac28105 Bug 1420594 P2 Eagerly shutdown ClientManagerService. r=baku 2017-12-04 09:51:32 -05:00
Ben Kelly 73afebbc88 Bug 1420594 P1 Make ClientManagerService track active ClientManagerParent actors. r=baku 2017-12-04 09:51:32 -05:00
Dorel Luca ba2b0cf4d1 Backed out 3 changesets (bug 1422314, bug 1420594) for failing xpcshell/test_ext_contentScripts_register.js on Android debug r=backout a=backout
Backed out changeset f5a3054a4c38 (bug 1420594)
Backed out changeset 7908b821ad3f (bug 1420594)
Backed out changeset b89daf5c23b8 (bug 1422314)
2017-12-04 15:35:07 +02:00
Ben Kelly 76d6394334 Bug 1420594 P2 Eagerly shutdown ClientManagerService. r=baku a=aryx on CLOSED TREE 2017-12-01 14:48:11 -05:00
Ben Kelly 5bd2e38996 Bug 1420594 P1 Make ClientManagerService track active ClientManagerParent actors. r=baku 2017-12-01 14:48:11 -05:00
shindli 268bcd38b5 Backed out 2 changesets (bug 1420594) for leaks in browser-chrome tests r=backout on a CLOSED TREE
Backed out changeset 007fde92382e (bug 1420594)
Backed out changeset ff3ee0cc91ab (bug 1420594)
2017-11-30 18:24:52 +02:00