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

62624 Коммитов

Автор SHA1 Сообщение Дата
Gabriele Svelto 06a240a0f3 Bug 1628399 - Make sure that the main process can't access a crash report before it's fully populated r=KrisWright
In bug 1614933 we changed the order in which the crash annotations are sent
from a crashed content process to the main process in order to prevent a
deadlock that would arise if the child process would block writing into the
pipe used to sent the annotations.

This unfortunately introduced a race that I had missed. Here's the sequence of
event when generating a crash in the child process:

1) The child process enters the exception handler
2) It requests a dump from the main process and wait
3) Once the dump is written, the child process wakes up again and writes out
   the crash annotations
4) The child process quits

One the main process side it looks like this:

1) The crash generation thread receives a request to generate a dump
2) The dump is written out, the crash generation thread notifies the content
   process that it can resume execution. During this step the finished
   minidump is recorded in the `OnChildProcessDumpRequested()` callback.
3) The crash generation thread reads the crash annotations sent by the content
   process and finalizes the crash report
4) The main process grabs the finalized crash report

The key issue here is that the main process in step 4 is woken up when the
content process dies. Notice how there's no synchronization between the crash
generation thread and the main thread in the main process: if the crash
generation thread takes too long reading the crash annotations the main thread
might see an incomplete or missing crash report; that's because the event that
wakes it up - the content process ending execution - can happen in parallel
with step 3.

This is an issue that was accidentally introduced in Windows by bug 1614933
but was already present in both Linux and macOS. It was just very unlikely to
happen.

This patch fixes the issue by splitting step 3 in the main process in two
different stages: in the main process we grab the generated minidump in
`OnChildProcessDumpRequested()`, Breakpad then unblocks the child process and
we read the annotations in `OnChildProcessDumpWritten()`. We grab the
`dumpMapLock` Mutex in the latter and release it in the former to ensure that
the main process will have to wait for the crash report to be finalized when
`TakeCrashedChildProcess()` is called. This might appear somewhat confusing
and even causes debug builds to spit a harmless warning (we don't want Mutexes
to be taken and released from different scopes if we can help it).

To implement the above behavior in Breakpad a new callback was introduced in
Windows, an existing one was used under macOS and an unused one was used under
Linux. This accounts for the different way in which minidumps are generated on
the three platforms.

Differential Revision: https://phabricator.services.mozilla.com/D74496
2020-05-18 20:34:48 +00:00
Tilden Windsor 6f2e45cfda Bug 1629604 - Fixed phrase not found in visible <script> and added a test for visible <script>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75824
2020-05-18 21:28:46 +00:00
Sam Foster 4409bd4bce Bug 1191591 - Open downloaded PDFs in pdf.js viewer. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D73400
2020-05-18 17:30:26 +00:00
Matthew Noorenberghe ee8c92bf6b Bug 1638493 - Delete telemetry definition for WEAVE_CONFIGURED_MASTER_PASSWORD. r=lina
Bug 1382937 stopped accumulating into the histogram but didn't remove the definition.

Differential Revision: https://phabricator.services.mozilla.com/D75650
2020-05-18 16:53:50 +00:00
Jon Coppeard a7827f949b Bug 1627711 - Remove incremental GC information from about:support r=Gijs,fluent-reviewers
This no longer gets disabled anywhere, so no longer needs reporting here.

Differential Revision: https://phabricator.services.mozilla.com/D75756
2020-05-18 16:09:45 +00:00
Noemi Erli c1cca03e21 Backed out 6 changesets (bug 1002724) for failing in browser_fall_back_to_https.js CLOSED TREE
Backed out changeset e487b4cd9223 (bug 1002724)
Backed out changeset 37473a8ba1fd (bug 1002724)
Backed out changeset e868f1e0af0e (bug 1002724)
Backed out changeset 1c57f8717b15 (bug 1002724)
Backed out changeset 782808a05ff8 (bug 1002724)
Backed out changeset c60c48d170e1 (bug 1002724)
2020-05-18 19:22:19 +03:00
kasun fe85cedb57 Bug 1626754 - ContentBlocking.cpp: removed else after return. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D75704
2020-05-18 15:58:27 +00:00
Sebastian Streich 8d13f589d2 Bug 1633710 - Move js uri.equals to principal r=ckerschb
CLOSED TREE

Differential Revision: https://phabricator.services.mozilla.com/D73243
2020-05-18 13:17:01 +00:00
Sebastian Streich b70610980a Bug 1633710 - Move js uri.hostPort to principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73240
2020-05-18 13:50:14 +00:00
Sid Stamm 0fb7124e1a Bug 1002724 - use resolvable URL in extension html_detail_view test. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D75088
2020-05-18 15:09:01 +00:00
Luca Greco 7cbc957e8f Bug 1638581 - Deprecate xbl from webRequest ResourceType enum and log a warning if still used by extensions. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D75681
2020-05-18 14:21:53 +00:00
Mihai Alexandru Michis a2026344a1 Backed out 2 changesets (bug 1613609) for causing bustages.
CLOSED TREE

Backed out changeset dd6e395dc342 (bug 1613609)
Backed out changeset 5bcb7b13a4ad (bug 1613609)
2020-05-18 16:38:58 +03:00
Csoregi Natalia 179b0c82b2 Backed out 6 changesets (bug 1002724) for bustage on nsDocShell.cpp. CLOSED TREE
Backed out changeset 56ba616e2644 (bug 1002724)
Backed out changeset d481cf074d3b (bug 1002724)
Backed out changeset da26540ecee5 (bug 1002724)
Backed out changeset 01cbf611158a (bug 1002724)
Backed out changeset b60ba645f1f4 (bug 1002724)
Backed out changeset 4ebad0d2ca0a (bug 1002724)
2020-05-18 16:06:55 +03:00
Sid Stamm aa2df3c53f Bug 1002724 - use resolvable URL in extension html_detail_view test. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D75088
2020-05-18 12:42:21 +00:00
Dimi Lee 5fb184d088 Bug 1624269 - P5. Testcase r=timhuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D74322
2020-05-18 11:04:43 +00:00
Dimi Lee 267aee84fa Bug 1624269 - P4. Not using permission manager to sync HasStorageAccess. r=timhuang,baku
We already have an architecture to sync the storage access granted
result to all 3rd-party frames with the same tracking origin.
We use the same way to sync HasStorageAccess flag instead of relying
on permission manager update permissions to child processes.

Differential Revision: https://phabricator.services.mozilla.com/D73711
2020-05-18 11:04:48 +00:00
Dimi Lee 3cd4188086 Bug 1624269 - P3. Inform all the windows whose storage permission is granted. r=timhuang,baku
Before this patch, we only call StorageAccessGranted on windows that
triggers the storage heuristics. So even if we sync storage permission to the
other frames, their data will not be refreshed. For example, if a document
has a worker, we don't propagate the permission to the worker.

In this patch, we call ::StorageAccessGranted as long as we update
the window's storage permission.

Differential Revision: https://phabricator.services.mozilla.com/D74321
2020-05-18 11:58:25 +00:00
Dimi Lee 3ad661e06a Bug 1624269 - P2. Cache access granted result in the 3rd-party window instead of top-level window in fission mode. r=timhuang,baku
Before this patch, in non-fission mode, we cache storage access granted result
in the top-level window so we don't have to iterate all the browsing contexts
in the same tree while syncing the storage permission granted decision.

However, since we plan to rely on the current update mechanism to sync
mHasStorageAccess flag for different documents in the same tab (instead of using
the syncing mechanism of permission manager), we will eventually need to iterate
the browsing context tree to find all the documents to sync. Base on this,
we no longer have to maintain different method for fission and non-fission.

In this patch, we store the permission granted result in the inner
window instead of using permission key and store the key in the top-level
window.

Differential Revision: https://phabricator.services.mozilla.com/D73710
2020-05-18 11:04:50 +00:00
Dimi Lee 045b7e7096 Bug 1624269 - P1. Only get CookieBehavior once r=timhuang,baku
CookieBehavior should be the same for all the frames in the same tab,
we don't have to get its value for every browsing context in the same
browsing context tree.

Differential Revision: https://phabricator.services.mozilla.com/D73709
2020-05-18 11:04:41 +00:00
Frederik Braun 3baff21cbd Bug 1613609 - Add required loadinfo flag requests initiated with SystemPrincipal r=necko-reviewers,dragana
Adding the flag to existing channel/loadinfo object for:
- PushServices HTTP, WebSocket
- NetworkGeolocationProvider
- NetUtil.jsm's NewChannel
- NetworkConnectivityService
- OCSP
- Portal Detection
- ProductAddonChecker.jsm
- URLClassifier

Differential Revision: https://phabricator.services.mozilla.com/D75063
2020-05-18 10:59:04 +00:00
Emilio Cobos Álvarez f0953195ce Bug 1636998 - Make ::-moz-focus-outer a no-op, and remove it on Nightly. r=jwatt
See https://bugzilla.mozilla.org/show_bug.cgi?id=932410#c2 for the
context for which this pseudo-element was added.

In the previous patch, I had to special-case range appearance because of
this pseudo-class, but that patch makes this pseudo-class completely
redundant, as now all form controls, themed and unthemed, display
outlines, unless the native theme displays a focus indicator on its own.

Remove the special case, and make ranges use outlines like everything
else rather than this bespoke pseudo-element.

Differential Revision: https://phabricator.services.mozilla.com/D74734
2020-05-18 10:54:16 +00:00
Csoregi Natalia 88ab085eff Backed out 5 changesets (bug 1624269) for browser-chrome failures on browser_storageAccessWithHeuristics.js. CLOSED TREE
Backed out changeset 59cdba115447 (bug 1624269)
Backed out changeset 23b5c53f4be8 (bug 1624269)
Backed out changeset be697a5bc0fd (bug 1624269)
Backed out changeset 81420bca683c (bug 1624269)
Backed out changeset 599db5acefe1 (bug 1624269)
2020-05-18 13:59:44 +03:00
Csoregi Natalia f6ee95862e Backed out changeset 62ad26fbfaf8 (bug 1636998) for reftest failures on 1174332-1.html. CLOSED TREE 2020-05-18 13:31:56 +03:00
Csoregi Natalia 5162f86676 Backed out 2 changesets (bug 1613609) for failures on nsXPConnect.cpp. CLOSED TREE
Backed out changeset c593a7296df4 (bug 1613609)
Backed out changeset 72199fc4ea2b (bug 1613609)
2020-05-18 13:05:12 +03:00
Frederik Braun 3b0d63cd07 Bug 1613609 - Add required loadinfo flag requests initiated with SystemPrincipal r=necko-reviewers,dragana
Adding the flag to existing channel/loadinfo object for:
- PushServices HTTP, WebSocket
- NetworkGeolocationProvider
- NetUtil.jsm's NewChannel
- NetworkConnectivityService
- OCSP
- Portal Detection
- ProductAddonChecker.jsm
- URLClassifier

Differential Revision: https://phabricator.services.mozilla.com/D75063
2020-05-18 09:19:17 +00:00
Dimi Lee 1fdb9a573f Bug 1624269 - P5. Testcase r=timhuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D74322
2020-05-18 09:10:16 +00:00
Dimi Lee 76cd40637d Bug 1624269 - P4. Not using permission manager to sync HasStorageAccess. r=timhuang,baku
We already have an architecture to sync the storage access granted
result to all 3rd-party frames with the same tracking origin.
We use the same way to sync HasStorageAccess flag instead of relying
on permission manager update permissions to child processes.

Differential Revision: https://phabricator.services.mozilla.com/D73711
2020-05-18 09:14:09 +00:00
Dimi Lee 1f96287d53 Bug 1624269 - P3. Inform all the windows whose storage permission is granted. r=timhuang,baku
Before this patch, we only call StorageAccessGranted on windows that
triggers the storage heuristics. So even if we sync storage permission to the
other frames, their data will not be refreshed. For example, if a document
has a worker, we don't propagate the permission to the worker.

In this patch, we call ::StorageAccessGranted as long as we update
the window's storage permission.

Differential Revision: https://phabricator.services.mozilla.com/D74321
2020-05-18 09:09:57 +00:00
Dimi Lee 6960df4b88 Bug 1624269 - P2. Cache access granted result in the 3rd-party window instead of top-level window in fission mode. r=timhuang,baku
Before this patch, in non-fission mode, we cache storage access granted result
in the top-level window so we don't have to iterate all the browsing contexts
in the same tree while syncing the storage permission granted decision.

However, since we plan to rely on the current update mechanism to sync
mHasStorageAccess flag for different documents in the same tab (instead of using
the syncing mechanism of permission manager), we will eventually need to iterate
the browsing context tree to find all the documents to sync. Base on this,
we no longer have to maintain different method for fission and non-fission.

In this patch, we store the permission granted result in the inner
window instead of using permission key and store the key in the top-level
window.

Differential Revision: https://phabricator.services.mozilla.com/D73710
2020-05-18 09:14:09 +00:00
Dimi Lee 46dc387c8a Bug 1624269 - P1. Only get CookieBehavior once r=timhuang,baku
CookieBehavior should be the same for all the frames in the same tab,
we don't have to get its value for every browsing context in the same
browsing context tree.

Differential Revision: https://phabricator.services.mozilla.com/D73709
2020-05-18 09:09:37 +00:00
Emilio Cobos Álvarez 36b46408b8 Bug 1636998 - Make ::-moz-focus-outer a no-op, and remove it on Nightly. r=jwatt
See https://bugzilla.mozilla.org/show_bug.cgi?id=932410#c2 for the
context for which this pseudo-element was added.

In the previous patch, I had to special-case range appearance because of
this pseudo-class, but that patch makes this pseudo-class completely
redundant, as now all form controls, themed and unthemed, display
outlines, unless the native theme displays a focus indicator on its own.

Remove the special case, and make ranges use outlines like everything
else rather than this bespoke pseudo-element.

Differential Revision: https://phabricator.services.mozilla.com/D74734
2020-05-18 07:59:32 +00:00
Dão Gottwald 7dcb084be3 Bug 1636968 - Stop focusing the view-source content window on load. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D75071
2020-05-18 07:23:54 +00:00
Gijs Kruitbosch 72186b2199 Bug 1638092 - do not require a browsingcontext to call the external protocol service's loadURI method, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75543
2020-05-17 22:54:30 +00:00
Nicklas Boman 4f2fa0cfa7 Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D17411
2020-05-17 06:58:48 +00:00
Brindusan Cristian 1fc24bdc27 Bug 1618231 - Disable test_ext_web_accessible_resources.html on linux. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D75669
2020-05-16 10:38:37 +00:00
Dimi Lee 37f9642b16 Bug 1638089 - Don't check skip list when list type is whitelist r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75391
2020-05-16 17:10:22 +00:00
Narcis Beleuzu a5b90dc8d3 Bug 1623427 - Disable test_ext_activityLog.html for frequent failures on OSX. r=egao
Differential Revision: https://phabricator.services.mozilla.com/D75666
2020-05-16 07:19:45 +00:00
Jared Wein 2c619e2a98 Bug 773942 - Create a new init method in nsITransfer that accepts a BrowsingContext and if the download should be handled internally for backwards-compat. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75186
2020-05-16 06:00:08 +00:00
Jared Wein 6eb4c9a1b0 Bug 773942 - Add telemetry to track which PDF viewer was used from the Unknown Content Type dialog. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D73538
2020-05-16 06:00:06 +00:00
Jared Wein 9b0a889740 Bug 773942 - Hide the 'Open with Firefox' option if the download is started from the download button in pdf.js. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72779
2020-05-16 05:59:55 +00:00
Jared Wein 3ab25176e5 Bug 773942 - Use the browsingContext to open the new tab with correct userContextId, private-ness, and ownerTab. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72778
2020-05-16 05:59:53 +00:00
Jared Wein e2e5ff74a3 Bug 773942 - Use a generic string for the PDF description since it is not necessarily tied to the default handler. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72777
2020-05-16 05:59:50 +00:00
Jared Wein 3074d7ebb9 Bug 773942 - Open PDFs using pdf.js in a new tab when the Preview option is selected from the Unknown Content Type dialog. r=Gijs
This is currently preffed off behind the "browser.helperApps.showOpenOptionForPdfJS" pref.

Differential Revision: https://phabricator.services.mozilla.com/D72776
2020-05-16 05:59:43 +00:00
Jared Wein fdcaf6c44a Bug 773942 - Add a radio button to open the PDF in Firefox. r=Gijs,flod,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D72774
2020-05-16 05:59:40 +00:00
Jared Wein cb8b72b2ab Bug 773942 - Remove some dead code and an old hack that isn't necessary anymore. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72773
2020-05-16 05:59:33 +00:00
Narcis Beleuzu 35b6e759f7 Backed out 9 changesets (bug 773942) for xpcshell failure on test_getMIMEInfo_pdf.js
Backed out changeset 6fb0f25b2f5d (bug 773942)
Backed out changeset 27e9fe03a549 (bug 773942)
Backed out changeset ee0ecad5e90a (bug 773942)
Backed out changeset df062e14287b (bug 773942)
Backed out changeset 7da06239ccfb (bug 773942)
Backed out changeset dfedbeeaec66 (bug 773942)
Backed out changeset 286e1be9dc46 (bug 773942)
Backed out changeset f4df0a553bc0 (bug 773942)
Backed out changeset 97f3b96b6be0 (bug 773942)
2020-05-16 08:37:53 +03:00
Robert Helmer a436ea56ac Bug 1638434 - Allow schema name/version to be specified in submitEncryptedPing r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D75615
2020-05-15 20:11:33 +00:00
Jared Wein 788718620f Bug 773942 - Create a new init method in nsITransfer that accepts a BrowsingContext and if the download should be handled internally for backwards-compat. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75186
2020-05-16 04:26:12 +00:00
Jared Wein 6a71aa8029 Bug 773942 - Add telemetry to track which PDF viewer was used from the Unknown Content Type dialog. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D73538
2020-05-16 04:25:25 +00:00
Jared Wein b804d9a64f Bug 773942 - Hide the 'Open with Firefox' option if the download is started from the download button in pdf.js. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D72779
2020-05-16 04:25:06 +00:00