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

6932 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione a737bd2c6a Bug 1604889: Don't rethrow receiveMessage exceptions as NS_ERROR_UNEXPECTED. r=mccr8
When we let the WebIDL callback wrapper report exceptions, it returns an error
result of NS_ERROR_UNEXPECTED, which winds up getting set as a promise
rejection reason or re-reported to the console. This just causes unnecessary
confusion for callers, especially since the error has no location information.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:27:25 +00:00
Andrea Marchesini 502fbbd9f7 Bug 1472158 - Broadcast BlobURLs only to processes with the same loaded origins, r=farre,asuth
Differential Revision: https://phabricator.services.mozilla.com/D57637

--HG--
extra : moz-landing-system : lando
2020-01-09 08:15:49 +00:00
David Parks 198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00
Yaron Tausky 877a273a69 Bug 1603976 - Warn when getting session storage data for discarded browsing context r=dom-workers-and-storage-reviewers,sg,janv
Under some (yet) unclear conditions it's possible for a content
process to send session storage data for a browsing context that's
already been discarded. This leads to an assertion failure when
deserializing the IPC message. This commit works around this issue
by sending the browsing context's ID over IPC and issuing a warning
instead of asserting that the browsing context still exists.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 15:38:34 +00:00
Valentin Gosu c7d9b630cb Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

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

--HG--
extra : moz-landing-system : lando
2020-01-07 20:20:38 +00:00
Matt Woodrow a59b688778 Bug 1598523 - Make DocumentChannelChild/ContentChild QI to the specific interfaces it wants, rather than assuming that only HttpChannelChild will have them. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57890

--HG--
extra : moz-landing-system : lando
2020-01-08 01:00:39 +00:00
Matt Woodrow 87b0e83cf6 Bug 1598523 - Share code for creating a channel for a document between nsDocShell, DocumentChannelChild and ContentChild. r=kmag
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 02:10:54 +00:00
Emilio Cobos Álvarez 86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

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

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Bogdan Tara 4e368405fa Backed out 6 changesets (bug 1598523) for geckoview failures complaining about NavigationDelegateTest.loadUnknownProtocol
Backed out changeset 2e7ea1ae7fa2 (bug 1598523)
Backed out changeset 6adc1062662b (bug 1598523)
Backed out changeset 141372c43f02 (bug 1598523)
Backed out changeset c5abcaabaf2d (bug 1598523)
Backed out changeset 5a22a20dd993 (bug 1598523)
Backed out changeset e0df103c9cf3 (bug 1598523)
2020-01-08 02:56:18 +02:00
Matt Woodrow 93ab0405ec Bug 1598523 - Make DocumentChannelChild/ContentChild QI to the specific interfaces it wants, rather than assuming that only HttpChannelChild will have them. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D57890

--HG--
extra : moz-landing-system : lando
2020-01-07 20:57:13 +00:00
Matt Woodrow 0e8ab1d433 Bug 1598523 - Share code for creating a channel for a document between nsDocShell, DocumentChannelChild and ContentChild. r=kmag
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 21:17:22 +00:00
Matt Woodrow 3687cec8cf Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587

--HG--
extra : moz-landing-system : lando
2020-01-06 21:36:34 +00:00
Matt Woodrow 97c7791de6 Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586

--HG--
extra : moz-landing-system : lando
2020-01-06 21:58:48 +00:00
Emilio Cobos Álvarez 8bf2225b87 Bug 1606659 - Make Browser*::Show take two arguments, one from the parent process, one from the owner of the frame. r=mattwoodrow
This makes clear where the information comes from, and also that there are some
bits of information that we should pass down from the child that we don't, like
allowfullscreen and the frame name.

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

--HG--
extra : moz-landing-system : lando
2020-01-05 20:58:21 +00:00
Jean-Yves Avenard 7d42be93a7 Bug 1603187 - P4. Pass navigation timing info to the new docshell when performing a process switch. r=mattwoodrow,farre
Differential Revision: https://phabricator.services.mozilla.com/D57772

--HG--
extra : moz-landing-system : lando
2020-01-05 05:44:44 +00:00
Brian Hackett e941f9f74f Bug 1605584 - Create replaying processes in the cloud when requested, r=mccr8.
Differential Revision: https://phabricator.services.mozilla.com/D58436

--HG--
extra : moz-landing-system : lando
2020-01-03 16:47:43 +00:00
Brian Hackett 901e251039 Bug 1603856 Part 2 - Workaround hang when waiting for exception time annotations from a replaying process that isn't actually crashing, r=gsvelto.
Depends on D57200

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

--HG--
extra : moz-landing-system : lando
2020-01-03 16:47:45 +00:00
Dorel Luca 212a51bc09 Backed out 5 changesets (bug 1603856, bug 1606447, bug 1605584, bug 1598951) for build bustages. CLOSED TREE
Backed out changeset cf403935cf9b (bug 1598951)
Backed out changeset af6e8b6be574 (bug 1605584)
Backed out changeset fbfa92bd4ec8 (bug 1603856)
Backed out changeset a6d13450295d (bug 1603856)
Backed out changeset e0b049ff115f (bug 1606447)

--HG--
rename : toolkit/recordreplay/Recording.cpp => toolkit/recordreplay/File.cpp
rename : toolkit/recordreplay/Recording.h => toolkit/recordreplay/File.h
rename : toolkit/recordreplay/ExternalCall.cpp => toolkit/recordreplay/MiddlemanCall.cpp
rename : toolkit/recordreplay/ExternalCall.h => toolkit/recordreplay/MiddlemanCall.h
2020-01-03 18:43:40 +02:00
Brian Hackett af065a244b Bug 1605584 - Create replaying processes in the cloud when requested, r=mccr8.
Differential Revision: https://phabricator.services.mozilla.com/D58436

--HG--
extra : moz-landing-system : lando
2019-12-31 20:12:25 +00:00
Brian Hackett 6560a78618 Bug 1603856 Part 2 - Workaround hang when waiting for exception time annotations from a replaying process that isn't actually crashing, r=gsvelto.
Depends on D57200

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

--HG--
extra : moz-landing-system : lando
2019-12-31 16:11:25 +00:00
alwu bdc6a8cae7 Bug 1571493 - part4 : support 'ControlledMediaState' in media controller r=chunmin
Introduce `ControlledMediaState` to media controller, so now we can now how many controlled media are playing, which allow us to update `mIsPlaying` correctly.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 01:39:33 +00:00
alwu 2d2b857325 Bug 1571493 - part3 : notify media state and audible state changes. r=chunmin
Modify IPC method to support notify `ControlledMediaState` to the media controller, and remove the previous implementation.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 01:34:34 +00:00
Boris Zbarsky 613f2313da Bug 1606672. Change nsIRunnablePriority values so increasing value indicates increased priority. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D58539

--HG--
extra : moz-landing-system : lando
2020-01-02 20:07:40 +00:00
Ciure Andrei bdfec29e90 Backed out changeset 26694602791a (bug 1472158) for causing Bug 1583000 2019-12-22 15:22:58 +02:00
Brian Hackett f06f88d256 Bug 1605129 - Avoid using GetUsedBrowserProcess when recording/replaying, .
Differential Revision: https://phabricator.services.mozilla.com/D57847

--HG--
extra : moz-landing-system : lando
2019-12-19 19:08:09 +00:00
shindli 143073ad50 Backed out changeset bf4b4d3108f9 (bug 1602898) for causing bc failures in browser/components/ssb/tests/browser/browser_ssb_windowlocation.js CLOSED TREE 2019-12-21 02:22:06 +02:00
Kris Maglione a8523a3bae Bug 1602898: Rename Window.getWindowGlobalChild() to .windowGlobalChild. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56609

--HG--
extra : moz-landing-system : lando
2019-12-20 21:41:26 +00:00
shravanrn@gmail.com 3201996fba Bug 1575985 part 1 - Preload RLBox dynamic library before content sandbox to allow subsequent loads r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45941

--HG--
extra : moz-landing-system : lando
2019-12-20 18:31:27 +00:00
Gabriele Svelto ca8ae39a56 Bug 1544147 - Ensure orphaned crashes are properly notified to the rest of the system r=froydnj
When a content or plug-in process crashes too early we haven't initialized the
CrashReporterHost for that process. This will cause the crash to be orphaned,
i.e. to miss most of its crash annotations. We added code to finalize those
crashes in bug 1282776 so that we wouldn't miss them entirely. This ensured
that crash reports would have both their .dmp and .extra files but the patch
failed to modify the code that notified various listeners about the crash
report's presence.

This changes always send the crash ID alongside the crash notifications, even
for orphaned crashes, so that listeners such as the content crash handler or
the test harnesses can always find the minidump and .extra file. Additionally
orphaned crashes are recorded in the CrashManager and in telemetry just like
normal crashes.

This also re-enables dom/ipc/tests/process_error.xul which failed frequently
because of this bug.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 17:50:45 +00:00
Andrea Marchesini 2702d32141 Bug 1472158 - Broadcast BlobURLs only to processes with the same loaded origins, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D57637

--HG--
extra : moz-landing-system : lando
2019-12-20 04:28:04 +00:00
Razvan Maries 188a114962 Backed out 5 changesets (bug 1598520) for perma fails on test_enumerateDevices_navigation.html. CLOSED TREE
Backed out changeset 583dac2feebc (bug 1598520)
Backed out changeset c769e733f588 (bug 1598520)
Backed out changeset 45287a2ec476 (bug 1598520)
Backed out changeset 59cff6014447 (bug 1598520)
Backed out changeset ddf722557c33 (bug 1598520)
2019-12-20 01:56:55 +02:00
Matt Woodrow 620323f684 Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587

--HG--
extra : source : 10ad2e4d27c3e66b8ce5190377ed672c72010732
2019-12-19 21:48:00 +00:00
Matt Woodrow d67e6c24b8 Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586

--HG--
extra : source : 4a5d10759bf3ad6cb392c7d83cc163e262314eb1
2019-12-19 21:47:10 +00:00
Razvan Maries bfe0632450 Backed out 5 changesets (bug 1598520) for Linting failure. CLOSED TREE
Backed out changeset b4f71abf75fe (bug 1598520)
Backed out changeset 8e3b650d9313 (bug 1598520)
Backed out changeset 73c37ad27d18 (bug 1598520)
Backed out changeset 10ad2e4d27c3 (bug 1598520)
Backed out changeset 4a5d10759bf3 (bug 1598520)
2019-12-20 00:38:32 +02:00
Matt Woodrow fae5ac7731 Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587

--HG--
extra : moz-landing-system : lando
2019-12-19 21:48:00 +00:00
Matt Woodrow eb5ca8b399 Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586

--HG--
extra : moz-landing-system : lando
2019-12-19 21:47:10 +00:00
Kris Maglione 4561642c1f Bug 1588259: Part 2 - Prevent URI loads in partially-initialized BrowsingContexts. r=smaug
When we open a new window from a content process, we create a nested event
loop to wait for it to be initialized by the parent. The problem with this is
that the OpenWindow code which calls the window provider expects the window to
be in-process and uninitialized, so that it can load its own initial URI into
it, and correctly fulfil the spec-codified contract of window.open(). If
another caller initiates a load in the new window during the nested event
loop, those invariants are broken, and any manner of undefined behavior can
occur.

This patch adds a new flag to the BrowsingContext, marking it as uninitialized
until the end of the nested event loop, and blocking any attempts to load a
new URI into it in the meantime.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 22:05:19 +00:00
Kris Maglione 0050975280 Bug 1588259: Part 1 - Suspend windows when spinning event loop for window.open. r=smaug
This doesn't solve all problems with potential reentrancy during window.open
nested event loops, but it does improve the situation somewhat. Since any
window in the same BrowsingContextGroup can target any window in the same
group, we need to suspend all windows in the group, not just the root of the
new window's parent. We also need to make sure we suspend all in-process
windows, even if we have out-of-process frames somewhere in the parent chain.

This patch takes care of suspending timeouts and input event handling in all
of these cases. It doesn't block all potential paths for running code in the
suspended windows, though, so the next patch explicitly prevents the
problematic reentrancy.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 21:41:17 +00:00
Razvan Maries 4200948394 Backed out 2 changesets (bug 1588259) for perma fais on 1588259.html. CLOSED TREE
Backed out changeset 62fb499df45a (bug 1588259)
Backed out changeset 34716f07e8cb (bug 1588259)
2019-12-19 23:34:57 +02:00
Andrew McCreight 0162ffca4b Bug 1604609 - Don't send large window actor messages. r=jdai
IPC crashes if you try to send large messages. The message manager
already drops messages that are too big (and used to collect telemetry
for which messages were being dropped).

I think that some message manager messages have been ported over to JS
window actors and started crashing on beta, so let's just give the
same behavior for JS window actors as we do for the message manager.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 21:17:11 +00:00
Kris Maglione e414254fc9 Bug 1588259: Part 2 - Prevent URI loads in partially-initialized BrowsingContexts. r=smaug
When we open a new window from a content process, we create a nested event
loop to wait for it to be initialized by the parent. The problem with this is
that the OpenWindow code which calls the window provider expects the window to
be in-process and uninitialized, so that it can load its own initial URI into
it, and correctly fulfil the spec-codified contract of window.open(). If
another caller initiates a load in the new window during the nested event
loop, those invariants are broken, and any manner of undefined behavior can
occur.

This patch adds a new flag to the BrowsingContext, marking it as uninitialized
until the end of the nested event loop, and blocking any attempts to load a
new URI into it in the meantime.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 19:53:24 +00:00
Kris Maglione 29c31af3ee Bug 1588259: Part 1 - Suspend windows when spinning event loop for window.open. r=smaug
This doesn't solve all problems with potential reentrancy during window.open
nested event loops, but it does improve the situation somewhat. Since any
window in the same BrowsingContextGroup can target any window in the same
group, we need to suspend all windows in the group, not just the root of the
new window's parent. We also need to make sure we suspend all in-process
windows, even if we have out-of-process frames somewhere in the parent chain.

This patch takes care of suspending timeouts and input event handling in all
of these cases. It doesn't block all potential paths for running code in the
suspended windows, though, so the next patch explicitly prevents the
problematic reentrancy.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 19:53:14 +00:00
David Teller a5df8d6fa3 Bug 1602712 - First implementation of GetNewOrUsedBrowserAsync;r=rhunt
Depends on D56961

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

--HG--
extra : moz-landing-system : lando
2019-12-19 10:57:13 +00:00
David Teller 43a338a859 Bug 1602712 - Split the parts of GetNewOrUsedBrowser that can be shared betwen sync and async;r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D56961

--HG--
extra : moz-landing-system : lando
2019-12-19 10:57:13 +00:00
Jean-Yves Avenard b1be794e1b Bug 1598497 - P1. move canceled attribute to nsIChannel. r=mayhemer
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.

However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.

It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 21:13:26 +00:00
Hiroyuki Ikezoe 3e3b2d6ac9 Bug 1596317 - Use EnumerateBrowsers to notify the theme change into all remote documents. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57262

--HG--
extra : moz-landing-system : lando
2019-12-19 07:58:57 +00:00
Bogdan Tara a96ffb25c5 Backed out 7 changesets (bug 1596317) for causing build bustages CLOSED TREE
Backed out changeset 0d3208fcb948 (bug 1596317)
Backed out changeset fe5554dc4115 (bug 1596317)
Backed out changeset 019de59cbc93 (bug 1596317)
Backed out changeset f4851472b087 (bug 1596317)
Backed out changeset a984cf515db8 (bug 1596317)
Backed out changeset d0da5bf9b4d4 (bug 1596317)
Backed out changeset abe5f2030dd9 (bug 1596317)
2019-12-19 06:49:39 +02:00
Hiroyuki Ikezoe 6837a57ea8 Bug 1596317 - Use EnumerateBrowsers to notify the theme change into all remote documents. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57262

--HG--
extra : moz-landing-system : lando
2019-12-19 04:16:59 +00:00
Ehsan Akhgari 1ca91dd7ab Bug 1603969 - Part 1: Remove the concept of granted origins from the anti-tracking backend; r=baku
Granted origins cause a third-party tracker browsing context to not get
full first-party storage access after successfully calling the storage
access API or a heuristic granting ephemeral access.

For example, after https://tracker.example calls the storage access API
successfully in the third-party context, they embed
https://other-tracker.example, and that load fails because of ETP
restrictions.  Here what happens is that https://other-tracker.example
is mistakenly considered the granted origin, and because such a
permission doesn't exist, access is denied.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 02:56:52 +00:00
Gurzau Raul bed8b9f116 Backed out 4 changesets (bug 1603969) for failing at /browser_startup_mainthreadio.js on a CLOSED TREE.
Backed out changeset c4d79087eef1 (bug 1603969)
Backed out changeset 2c0198f3506c (bug 1603969)
Backed out changeset c5ad252c525b (bug 1603969)
Backed out changeset a334451b95eb (bug 1603969)
2019-12-19 02:08:09 +02:00
Alastor Wu dac39bbeb9 Bug 1601144 - use 'MediaControlKeysEvent' to replace 'MediaControlActions'. r=chunmin
They are all used to control media, so we could unify them to one type.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 22:37:39 +00:00
Thomas Wisniewski 1e12d53224 Bug 1553265 - add a document.addCertException function to about:certerror pages and use it there; also treat GeckoView error pages as CallerIsTrusted(Net|Cert)Error; r=snorp,johannh,baku
Add a document.addCertException function to about:certerror pages, and use it on the desktop certerror page.

Also, as the CallerIsTrusted* functions expect URLs like about:certerror, but GeckoView error pages are data URLs, and so need to be handled differently for these special error-page methods to be exposed on their documents.

Example usage of document.addCertException:
  document.addCertException(
    true|false /* true == temporary, false == permanent */
  ).then(
    () => {
      location.reload();
    },
    err => {
      console.error(err);
    }
  );

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

--HG--
extra : moz-landing-system : lando
2019-12-18 21:55:32 +00:00
Ehsan Akhgari 1676da33c8 Bug 1603969 - Part 1: Remove the concept of granted origins from the anti-tracking backend; r=baku
Granted origins cause a third-party tracker browsing context to not get
full first-party storage access after successfully calling the storage
access API or a heuristic granting ephemeral access.

For example, after https://tracker.example calls the storage access API
successfully in the third-party context, they embed
https://other-tracker.example, and that load fails because of ETP
restrictions.  Here what happens is that https://other-tracker.example
is mistakenly considered the granted origin, and because such a
permission doesn't exist, access is denied.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 19:14:53 +00:00
Gurzau Raul e92fa08412 Backed out 4 changesets (bug 1603969) for failing at /browser_startup_mainthreadio.js on a CLOSED TREE.
Backed out changeset 959f12e42db9 (bug 1603969)
Backed out changeset 18bf461b9630 (bug 1603969)
Backed out changeset 8c3bb23a048b (bug 1603969)
Backed out changeset 450eec13d73e (bug 1603969)
2019-12-18 20:53:13 +02:00
Ehsan Akhgari 9852e6494c Bug 1603969 - Part 1: Remove the concept of granted origins from the anti-tracking backend; r=baku
Granted origins cause a third-party tracker browsing context to not get
full first-party storage access after successfully calling the storage
access API or a heuristic granting ephemeral access.

For example, after https://tracker.example calls the storage access API
successfully in the third-party context, they embed
https://other-tracker.example, and that load fails because of ETP
restrictions.  Here what happens is that https://other-tracker.example
is mistakenly considered the granted origin, and because such a
permission doesn't exist, access is denied.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 15:48:29 +00:00
Matthew Noorenberghe 0adf839cb7 Bug 1604366 - Split login manager auth prompt code from DOM/form prompting code. r=sfoster
This makes LoginManagerPrompter.jsm and LoginManagerAuthPrompter.jsm easier to maintain and switches
LoginManagerPrompter.jsm to be a service with static methods which is easier for GeckoView to implement and is cleaner.

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

--HG--
rename : toolkit/components/passwordmgr/LoginManagerPrompter.jsm => toolkit/components/passwordmgr/LoginManagerAuthPrompter.jsm
rename : toolkit/components/passwordmgr/nsILoginManagerPrompter.idl => toolkit/components/passwordmgr/nsILoginManagerAuthPrompter.idl
extra : moz-landing-system : lando
2019-12-18 15:03:27 +00:00
Andrew McCreight d1d5f1b27f Bug 1604689 - Fix 'identfiers' typos. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D57595

--HG--
extra : moz-landing-system : lando
2019-12-18 04:35:04 +00:00
Cosmin Sabou fbd904633a Backed out changeset b1e1671fd704 (bug 1553265) for gv-unit failures. 2019-12-18 03:18:14 +02:00
Thomas Wisniewski 63935c0afe Bug 1553265 - add a document.addCertException function to about:certerror pages and use it there; also treat GeckoView error pages as CallerIsTrusted(Net|Cert)Error; r=snorp,johannh,baku
Add a document.addCertException function to about:certerror pages, and use it on the desktop certerror page.

Also, as the CallerIsTrusted* functions expect URLs like about:certerror, but GeckoView error pages are data URLs, and so need to be handled differently for these special error-page methods to be exposed on their documents.

Example usage of document.addCertException:
  document.addCertException(
    true|false /* true == temporary, false == permanent */
  ).then(
    () => {
      location.reload();
    },
    err => {
      console.error(err);
    }
  );

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

--HG--
extra : moz-landing-system : lando
2019-12-17 21:54:32 +00:00
Noemi Erli 58bf47752e Backed out 2 changesets (bug 1598497) for causing OSX build bustages CLOSED TREE
Backed out changeset 3b31bbf74a5f (bug 1598497)
Backed out changeset 81beebdc2202 (bug 1598497)
2019-12-18 01:54:56 +02:00
Jean-Yves Avenard c63570cb58 Bug 1598497 - P1. move canceled attribute to nsIChannel. r=mayhemer
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.

However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.

It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.

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

--HG--
extra : moz-landing-system : lando
2019-12-17 23:21:46 +00:00
John Dai cbfb3e24dc Bug 1572560 - Fix intermittent of dom/ipc/tests/JSWindowActor/browser_destroy_callbacks.js; r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57325

--HG--
extra : moz-landing-system : lando
2019-12-17 13:37:22 +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
John Dai cddff0f0b1 Bug 1603598 - Purge pending queries at JSWindowActor destroy; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D57303

--HG--
extra : moz-landing-system : lando
2019-12-16 20:51:21 +00:00
Matt Woodrow e88be9e3a2 Bug 1601743 - Don't apply the referrer header to the referrer that we send back to the content process when converting a DocumentChannel into a real channel. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D56841

--HG--
extra : moz-landing-system : lando
2019-12-16 00:19:03 +00:00
Emilio Cobos Álvarez b2fe832c7b Bug 1603313 - Remove some silly patterns. r=bzbarsky
foo ? true : false

or:

  foo ? false : true

Have always a nicer way to be written.

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

--HG--
extra : moz-landing-system : lando
2019-12-14 05:05:01 +00:00
Kris Maglione 39d7eb39ed Bug 1596918: Part 4g - Misc cleanup/fixes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53748

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:48 +00:00
Kris Maglione 9853440599 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:24 +00:00
Kris Maglione 94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
Yaron Tausky 2381d5552e Bug 1593246 - Part 5: Replicate session storage data r=janv,asuth
This commit implements a simple data replication scheme, where
each content process receives a copy of the relevant session
storage data when navigating, and sending all its session storage
data to the parent process before shutting down.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 09:45:55 +00:00
Oana Pop Rus 53f1ba7c69 Backed out 10 changesets (bug 1599043) for build bustages in nsGlobalWindowOuter.cpp on a CLOSED TREE
Backed out changeset 463b815557e4 (bug 1599043)
Backed out changeset 7c3f0a58cc6c (bug 1599043)
Backed out changeset 1eadd9f5b50e (bug 1599043)
Backed out changeset e4ea0d47136b (bug 1599043)
Backed out changeset 6b97581c33b6 (bug 1599043)
Backed out changeset a68bd2acf5d6 (bug 1599043)
Backed out changeset c8ed9c52508c (bug 1599043)
Backed out changeset aaf83f7806b4 (bug 1599043)
Backed out changeset 0ad30634e416 (bug 1599043)
Backed out changeset 68219c132efc (bug 1599043)
2019-12-12 17:14:54 +02:00
Tim Huang cbe1f7bffd Bug 1599043 - Part 8: Remove the unnecessary OnContentBlockingEvent event in PBrowser. r=dimi,Ehsan
The OnContentBlockingEvent is no longer needed once we make the
OnContentBlockingEvent parent only.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 15:01:41 +00:00
Tim Huang 40be750cfd Bug 1599043 - Part 5: Add an IPC message to allow content process to notify the OnContentBlockingEvent in the parent. r=dimi,Ehsan
This patch adds an IPC message which allows content process to notify
the OnContentBlockingEvent in the parent process. This is needed because
there are some situations that the content blocking happens in content
processes, so we need to tell the parent process to notify it. Such as,
AntiTrackingCommon::AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor().

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

--HG--
extra : moz-landing-system : lando
2019-12-11 15:00:53 +00:00
Tim Huang 620c03a1e9 Bug 1599043 - Part 2: Allow the WindowGlobalParent to send OnContentBlockingEvent in parent. r=dimi,Ehsan
This patch makes the WindowGlobalParent to be able to send the
OnContentBlockingEvent in the parent process.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 08:56:25 +00:00
Tim Huang ea6fa983ca Bug 1599043 - Part 1: Add a ContentBlockingLog into the WindowGlobalParent r=dimi,Ehsan
This adds a ContentBlockingLog into the WindowGlobalParent. This
ContentBlockingLog is bascially a copy of the log in the content
process. This log in parent is needed for the OnContentBlockingEvent in
parent process since we need an overview of the content blocking events
for OnContentBlockingEvent. And the ContentBlockingLog exits in the
content process in this stage, so we need to maintain a copy of it to
get the overview of the blocking events in parent.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 15:00:20 +00:00
Matt Woodrow fc8d68c367 Bug 1603194 - Pass nsDocShellLoadState's load flags to new process when process switching. r=kmag
Depends on D56821

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

--HG--
extra : moz-landing-system : lando
2019-12-12 02:32:29 +00:00
Matt Woodrow 7b9f6cbbdc Bug 1589123 - Do BrowsingContext::LoadURI messages via PContent, not PWindowGlobal since we might not have a current global. r=kmag
Depends on D56818

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

--HG--
extra : moz-landing-system : lando
2019-12-12 02:32:00 +00:00
shindli 91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione cee320b5fb Bug 1596918: Part 4g - Misc cleanup/fixes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53748

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:41 +00:00
Kris Maglione 3ca78ce8e3 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:21 +00:00
Kris Maglione 16a9b29848 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:13 +00:00
Johann Hofmann 749da501d5 Bug 1600942 - Remove userHadInteractedWithDocument and documentDOMContentLoadedTimestamp attributes from nsIContentPermissionPrompt. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D56540

--HG--
extra : moz-landing-system : lando
2019-12-10 14:38:30 +00:00
Masayuki Nakano 8def9ba9e7 Bug 1557587 - part 1: Make `BrowserParent::RecvSetDimensions()` adjust given value with current scale r=jfkthame
If `nsGlobalWindowOuter::ResizeTo()` etc is called before receiving
`BrowserChild::RecvUIResolutionChanged()`, the `aX`, `aY`, `aCx` and `aCy`
values are computed with old scale.

This patch makes `BrowserChild::SendSetDimensions()` set scale in the
remote process and `BrowserParent::RecvSetDimensions()` recompute each
value with current scale.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 08:23:06 +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
Kagami Sascha Rosylight 23d4bffcad Bug 1596687 - Allow Navigator.share in non-e10s mode r=marcosc
Differential Revision: https://phabricator.services.mozilla.com/D53161

--HG--
extra : moz-landing-system : lando
2019-12-09 03:38:28 +00:00
Noemi Erli 82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione 84fa9ffb2a Bug 1596918: Part 4g - Misc cleanup/fixes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53748

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:35 +00:00
Kris Maglione fa3556c3fc Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione 910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Kris Maglione 7593e70946 Bug 1596918: Part 1e - Correctly handle query handlers throwing uncatchable exceptions. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53738

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:33 +00:00
Kris Maglione e8b0862194 Bug 1588839 - Part 3: Preserve cross-process async stacks in sendQuery/sendAsyncMessage calls. r=bzbarsky
This makes it much simpler to track down the source of message handler errors
by linking the cross-process caller chains which sent the problematic message.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 18:59:23 +00:00
Kris Maglione 7ae4407d5f Bug 1588839 - Part 2: Return the actual rejection value when a sendQuery handler rejects. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50882

--HG--
extra : moz-landing-system : lando
2019-12-07 18:59:21 +00:00
Kris Maglione a71c8e64ff Bug 1588839 - Part 1 - Add helper to allow structured cloning Error/Exception objects. r=bzbarsky
In order to be able to reasonably debug error results from things like
JSWindowActor.sendQuery, we need to be able to clone errors across process
boundaries, so that they can be propagated to the caller that initiated a
query. The standard for the structured clone algorithm does not allow cloning
errors directly, so this patch instead adds a chrome-only wrapper object which
supports structured clone writing, and on reading, automatically decodes to
the error object it wraps. Callers who wish to clone an Error or Exception
object simply need to wrap it in a ClonedErrorHolder before sending.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 18:59:14 +00:00
Ciure Andrei cbb1fe8008 Backed out 4 changesets (bug 1588839) for causing JSWindowActor.cpp failures CLOSED TREE
Backed out changeset 7cfcd0f5da4f (bug 1588839)
Backed out changeset cde41501372a (bug 1588839)
Backed out changeset 65cc1910918c (bug 1588839)
Backed out changeset 2f8b5b48c896 (bug 1588839)
2019-12-07 19:41:36 +02:00
Kris Maglione 56a686929a Bug 1588839 - Part 3: Preserve cross-process async stacks in sendQuery/sendAsyncMessage calls. r=bzbarsky
This makes it much simpler to track down the source of message handler errors
by linking the cross-process caller chains which sent the problematic message.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 18:28:28 +00:00
Kris Maglione 42c0feff20 Bug 1588839 - Part 2: Return the actual rejection value when a sendQuery handler rejects. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50882

--HG--
extra : moz-landing-system : lando
2019-12-07 05:32:51 +00:00
Kris Maglione 32678cd302 Bug 1588839 - Part 1 - Add helper to allow structured cloning Error/Exception objects. r=bzbarsky
In order to be able to reasonably debug error results from things like
JSWindowActor.sendQuery, we need to be able to clone errors across process
boundaries, so that they can be propagated to the caller that initiated a
query. The standard for the structured clone algorithm does not allow cloning
errors directly, so this patch instead adds a chrome-only wrapper object which
supports structured clone writing, and on reading, automatically decodes to
the error object it wraps. Callers who wish to clone an Error or Exception
object simply need to wrap it in a ClonedErrorHolder before sending.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 04:43:24 +00:00
Daniel Varga 84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Aaron Klotz 249f1cca46 Bug 1522830: Part 9 - Add IPC for untrusted modules to Content; r=jmathies
* The parent needs to be able to request the child to provide its untrusted
  modules telemetry. This is done via `GetUntrustedModulesData`.
* The child needs to be able to determine which of its module loads are trusted,
  and which are not. Since the child is sandboxed, it must delegate that work
  to the parent process. This is done via `GetModulesTrust`.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:10:14 +00:00