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

85351 Коммитов

Автор SHA1 Сообщение Дата
alwu 23c2b98a25 Bug 1565501 - use fallible memory allocation in MediaSpan. r=jya
Use fallible memory allocation in order to avoid the OOM issue.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 11:02:26 +00:00
Thomas Nguyen 9db3c041cf Bug 1566417 - Update to use ReferrerInfo in prefetch and preload URI r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38323

--HG--
extra : moz-landing-system : lando
2019-07-18 20:36:46 +00:00
Christoph Kerschbaumer 1abe58c63c Bug 1550414: Add CSP test for setting parent location to javascript:. r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D31233

--HG--
extra : moz-landing-system : lando
2019-07-18 16:57:54 +00:00
Christoph Kerschbaumer 6f2325a931 Bug 1555043: Perform CSP check against target document's CSP for javascript: URIs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38327

--HG--
extra : moz-landing-system : lando
2019-07-18 16:57:54 +00:00
Mike Conley 6d1794690b Bug 1565927 - Default FrameCrashedEvent's isTopFrame to true if never set. r=nika
This is the safer assumption, since we normally skip setting isTopFrame
explicitly if no BrowsingContext exists (which is the case if, for example,
the crash is due to the fact that creating the top-level browser failed).

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

--HG--
extra : moz-landing-system : lando
2019-07-17 01:50:04 +00:00
Andrew McCreight 8fb21424fa Bug 1510760, part 5 - Support local-to-remote window proxy transplanting. r=tcampbell,peterv
When a BrowsingContext changes from being local to remote, we have to
change all window proxies from being local to remote, using
transplanting. The actual window proxy becomes a remote window
proxy. Cross compartment wrappers (CCWs) to the window proxy also
become remote window proxies in their respective compartments, rather
than CCWs to a remote proxy in the old compartment of the window
proxy, because the window is no longer actually in that
compartment. This also avoids having to figure out what Xray behavior
for remote window proxies should be.

This patch uses the transplanting support I added to
GetRemoteOuterWindowProxy() in the previous patch to ensure that the
remote proxy map holds the correct value after transplanting finishes.

It drops the requirement that both arguments to JS_TransplantObject
have the same class, because we need to transplant a window proxy with
a remote window proxy. It also deals with this by not adding origobj
to the wrapper map unless it is a CCW, to handle transplanting to a
remote proxy.

The core design here, with the remote window proxies in every
compartment, is taken from a patch by peterv.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 19:36:19 +00:00
Andrew McCreight ac69d4bf7b Bug 1510760, part 4 - Add transplant support to GetRemoteOuterWindowProxy(). r=peterv
When we call GetRemoteOuterWindowProxy in the middle of a transplant,
the remote proxy that the function returns will be almost immediately
swapped with some other object. Rather than trying to fix up the
remote proxy map when that happens, this patch adds a new argument
that is a pointer to the object, if any, that the remote proxy is
going to be swapped to. This will be used in the remote proxy map.

Having a value in the remote proxy map that is not a remote proxy
could cause issues if somebody ends up calling
GetRemoteOuterWindowProxy() a second time before the transplant has
finished. To avoid that, my patch asserts that we are returning an
object with the appropriate class.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 19:36:17 +00:00
Andrew McCreight 3c4247618f Bug 1510760, part 2 - Add the remote proxy handler to SetDOMProxyInformation. r=peterv,tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D37596

--HG--
extra : moz-landing-system : lando
2019-07-18 19:36:13 +00:00
Andrew McCreight dd23a020fe Bug 1510760, part 1 - Make GetBrowsingContext and GetOuterWindow callable elsewhere. r=peterv
Also fix an existing formatting issue.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 19:36:11 +00:00
Tom Ritter 87cbad22ea Bug 1564527 - Enable AssertEvalNotUsingSystemPrincipal on Nightly builds r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D37460

--HG--
extra : moz-landing-system : lando
2019-07-18 18:22:06 +00:00
Noemi Erli 0497bd7b16 Backed out changeset a98b795c2b3c (bug 1100630) for Linting failure CLOSED TREE 2019-07-18 19:19:48 +03:00
Noemi Erli 1916d2be66 Backed out 5 changesets (bug 1510760) for bustages in nsGlobalWindowOuter.cpp
Backed out changeset 19a972ea7855 (bug 1510760)
Backed out changeset 524ac8b3040d (bug 1510760)
Backed out changeset 3bc5442338bc (bug 1510760)
Backed out changeset cb12d4068aca (bug 1510760)
Backed out changeset 75b769608cce (bug 1510760)
2019-07-18 19:18:47 +03:00
Sebastian Streich fa947e166a Bug 1100630 - Print Related JS-Line on CSP Violation (if any) r=ckerschb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D31420

--HG--
extra : moz-landing-system : lando
2019-07-18 15:14:41 +00:00
Andrew McCreight 85f5946629 Bug 1510760, part 5 - Support local-to-remote window proxy transplanting. r=tcampbell,peterv
When a BrowsingContext changes from being local to remote, we have to
change all window proxies from being local to remote, using
transplanting. The actual window proxy becomes a remote window
proxy. Cross compartment wrappers (CCWs) to the window proxy also
become remote window proxies in their respective compartments, rather
than CCWs to a remote proxy in the old compartment of the window
proxy, because the window is no longer actually in that
compartment. This also avoids having to figure out what Xray behavior
for remote window proxies should be.

This patch uses the transplanting support I added to
GetRemoteOuterWindowProxy() in the previous patch to ensure that the
remote proxy map holds the correct value after transplanting finishes.

It drops the requirement that both arguments to JS_TransplantObject
have the same class, because we need to transplant a window proxy with
a remote window proxy. It also deals with this by not adding origobj
to the wrapper map unless it is a CCW, to handle transplanting to a
remote proxy.

The core design here, with the remote window proxies in every
compartment, is taken from a patch by peterv.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 15:02:59 +00:00
Andrew McCreight c7d6336a9d Bug 1510760, part 4 - Add transplant support to GetRemoteOuterWindowProxy(). r=peterv
When we call GetRemoteOuterWindowProxy in the middle of a transplant,
the remote proxy that the function returns will be almost immediately
swapped with some other object. Rather than trying to fix up the
remote proxy map when that happens, this patch adds a new argument
that is a pointer to the object, if any, that the remote proxy is
going to be swapped to. This will be used in the remote proxy map.

Having a value in the remote proxy map that is not a remote proxy
could cause issues if somebody ends up calling
GetRemoteOuterWindowProxy() a second time before the transplant has
finished. To avoid that, my patch asserts that we are returning an
object with the appropriate class.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 15:02:57 +00:00
Andrew McCreight d957b14cdb Bug 1510760, part 2 - Add the remote proxy handler to SetDOMProxyInformation. r=peterv,tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D37596

--HG--
extra : moz-landing-system : lando
2019-07-18 15:02:47 +00:00
Andrew McCreight 6307831c6e Bug 1510760, part 1 - Make GetBrowsingContext and GetOuterWindow callable elsewhere. r=peterv
Also fix an existing formatting issue.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 15:02:45 +00:00
Emilio Cobos Álvarez 1e51ee6ad5 Bug 1564466 - Remove MediaSource::{Enabled,ExperimentalEnabled}, and use [Pref] on the IDL instead. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38098

--HG--
extra : moz-landing-system : lando
2019-07-18 13:06:25 +00:00
Emilio Cobos Álvarez f34964f6bc Bug 1564466 - Make MediaSource not call Preferences::GetBool off-main-thread. r=jya
Preferences::GetBool is not thread-safe, StaticPrefs are.
Also StaticPrefs are nicer anyway.

There's a lot of Preferences:: usage in dom/media which looks suspicious, though
I don't know if all that runs on the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 13:06:17 +00:00
Cosmin Sabou f4d5192efa Merge mozilla-central to autoland. 2019-07-18 13:00:45 +03:00
Cosmin Sabou da855d65d1 Backed out changeset 2095b5ca1769 (bug 1566956) for causing Bug 1567002. a=backout 2019-07-18 12:54:25 +03:00
M. Sirringhaus ab47597a2c Bug 1564900 - [OS.File] Fix size of statvfs::f_frsize;r=Yoric
Make Firefox not assume type of member statvfs::f_frsize from sys head, which may vary

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

--HG--
extra : moz-landing-system : lando
2019-07-18 08:55:43 +00:00
Ciure Andrei 3ba5c11f47 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-07-18 06:48:24 +03:00
Ciure Andrei d835b44a76 Merge inbound to mozilla-central. a=merge 2019-07-18 06:46:41 +03:00
Marcos Cáceres 4d6c019baa Bug 1566018 - Return the URL of the manifest from manifest validation in object r=Ola,baku
returns a moz_manifest_url member when `{checkConformance: true}`

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

--HG--
extra : moz-landing-system : lando
2019-07-17 14:04:19 +00:00
Nicholas Nethercote 70de90ef56 Bug 1564724 - Tweak StaticPrefList.h. r=glandium
Minor things to ease the transition to StaticPrefList.yaml.

- Rename apz_touch_drag_enabled() to the correct apz_drag_touch_enabled(), and
  media_mwf_low_latency_force_disabled() to the correct
  media_wmf_low_latency_force_disabled().

- Change some trailing C-style comments to C++-style comments. This makes life
  easier for the script I wrote to convert StaticPrefList.h to
  StaticPrefList.yaml, which will be used for the next patch.

- Avoid comments on #define lines, because they aren't handled in the YAML
  input.

- Convert a multi-line `#if` condition to a single line, because
  Preprocessor.py doesn't handle multi-line conditions.

- Remove one unnecessary `#undef PREF_VALUE` directive.

- Move intl.charset.detector.iso2022jp.allowed to the correct section, so the
  YAML processing script won't complain.

- Change an `int` pref to `int32_t`, again so the YAML processing script won't
  complain.

- Change OS_OPENBSD to XP_OPENBSD, because the former isn't defined for
  preprocessor.py. (It's also only defined in C/C++ when chromium-config.h is
  included, which isn't always the case.)

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

--HG--
extra : moz-landing-system : lando
2019-07-17 22:36:35 +00:00
Kris Maglione 0962c2b731 Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

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

--HG--
extra : rebase_source : 39ba8fec2e882cfe577c5f2b58ab7e4b461f1178
2019-07-15 16:19:32 -07:00
Daniel Varga fdca87c5b8 Merge mozilla-inbound to mozilla-central. a=merge 2019-07-17 18:53:21 +03:00
Mirko Brodesser de74655cfa Bug 1566751: update description of `nsINode::ComputeIndexOf` about anonymous content. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38288
2019-07-17 12:59:08 +02:00
Gurzau Raul 21df1f7413 Merge inbound to mozilla-central. a=merge 2019-07-17 06:48:50 +03:00
Christian Holler 8cfda79e0d Bug 1465407 - Add media fuzzing targets. r=jya
Depends on D35776

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

--HG--
extra : moz-landing-system : lando
2019-07-16 14:50:17 +00:00
Jan-Ivar Bruaroey 3aef894f49 Bug 1551316 - Add pc.restartIce() method. r=bwc,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30976

--HG--
extra : moz-landing-system : lando
2019-07-17 21:19:51 +00:00
Matt Woodrow e6b8f44989 Bug 1566956 - Wait for a response from the VideoBridge to ensure textures are available before telling the content process about them. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D37781

--HG--
extra : moz-landing-system : lando
2019-07-17 20:17:45 +00:00
Razvan Maries adc6758e36 Backed out 2 changesets (bug 1564466) for perma fails on EnsureMTA.h. CLOSED TREE
Backed out changeset 8011dd41d7d3 (bug 1564466)
Backed out changeset b162d0e42bee (bug 1564466)
2019-07-17 22:48:41 +03:00
Karl Tomlinson 35faeb0880 bug 1558123 call AudioWorkletProcessor.process() r=padenot,bzbarsky
https://heycam.github.io/webidl/#call-a-user-objects-operation may be a
simpler option here, but there are some small optimizations possible with
using JS::Call() directly:
JS::ExposeObjectToActiveJS() is not necessary because parameters are
PersistentRooted and so won't be gray.  MaybeWrapObjectValue() is not
necessary because parameters are already in the appropriate compartment.

See also https://github.com/WebAudio/web-audio-api/issues/1967 and
https://github.com/WebAudio/web-audio-api/issues/1933

Microtask support is tracked in
https://bugzilla.mozilla.org/show_bug.cgi?id=1566312

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

--HG--
extra : moz-landing-system : lando
2019-07-17 08:20:45 +00:00
Karl Tomlinson 87d828f979 Bug 1558123 copy audio samples to/from JS arrays r=padenot
Direct use of aInput buffers for ArrayBuffer elements is not possible in
general.  aInput buffers are const because they may be used elsewhere but
ArrayBuffer elements may be modified by script.  If necessary, it would be
possible to later add a mechanism to mix inputs directly into the ArrayBuffer,
but often no mixing is required.

Direct use of output ArrayBuffer elements would require DetachArrayBuffer to
ensure the elements are not modified by script, but that would require
creation of a new ArrayBuffer JS object on each call.

https://github.com/WebAudio/web-audio-api/issues/1932 tracks specification of
making output data available for reading (for downstream node input).

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

--HG--
extra : moz-landing-system : lando
2019-07-17 06:36:43 +00:00
Karl Tomlinson 44690447a6 bug 1558123 create JSObjects for inputs/outputs AudioWorkletProcessor.process() parameters r=padenot,bzbarsky
Objects are retained for re-use so as to reduce garbage generation and other
performance benefits.  This is currently unspecified.

https://github.com/WebAudio/web-audio-api/issues/1934
https://github.com/WebAudio/web-audio-api/issues/1933

https://github.com/WebAudio/web-audio-api/issues/1935 tracks specification of
zero-channels of input when inputs are not actively processing.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 20:27:39 +00:00
Karl Tomlinson 46486e57c9 bug 1558123 set AudioWorkletNode output channel counts r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D34835

--HG--
extra : moz-landing-system : lando
2019-07-16 04:40:33 +00:00
Ryan Hunt 18c49c3c24 Bug 1562493 - Clear out pointer to parent BrowserBridgeParent or BrowserHost when strong-ref from parent to child is released. r=nika
The ipc::browser-destroyed message must be sent when a top-level remote browser is destroyed.

Currently this is done by BrowserParent::ActoryDestroy and relies on having access to
mBrowserHost. This can break if we start clearing out this pointer. This commit moves
the trigger to fire in BrowserHost::DestroyComplete. Semantically this is different,
but from the users of this observer, I don't see any risk.

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

--HG--
extra : rebase_source : c863fb8d8a3a540d3dec42472c71342bed8ba541
extra : amend_source : aae3d054d453e63c10fec8707c8cda0497580a87
2019-07-07 11:02:11 -05:00
Mirko Brodesser 8135a5859f Bug 1566046: move `nsContentUtils::ContentIsShadowIncludingDescendantOf` to `nsINode::IsShadowIncludingInclusiveDescendantOf`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38079
2019-07-16 09:25:02 +02:00
Mirko Brodesser 1669cc6770 Bug 1566046: rename `GetParentOrHostNode` to `GetParentOrShadowHostNode`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38078
2019-07-16 09:25:02 +02:00
Noemi Erli 2f99f5d875 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-07-16 00:48:17 +03:00
Noemi Erli af897e281a Merge inbound to mozilla-central. a=merge 2019-07-16 00:42:51 +03:00
Nika Layzell 716af7c4d4 Bug 1563604 - Part 1: Confirm detach calls before dropping refs, r=peterv
This ensures that the object is not discarded while there are still in-flight
messages from the parent process, and vice-versa, which could cause crashes if a
CC was run before any pending messages have arrived.

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

--HG--
extra : moz-landing-system : lando
2019-07-15 20:44:50 +00:00
Mihai Alexandru Michis 71a457f2bf Backed out changeset c06eb27d0c64 (bug 1561964) for mochitest failures CLOSED TREE 2019-07-15 23:55:52 +03:00
soniasingla f52cea06ac Bug 1556849 - Enable ESLint for dom/base/. r=Standard8,mccr8
# ignore-this-changeset

These are all automatic changes via ESLint/prettier.

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

--HG--
extra : moz-landing-system : lando
2019-07-15 17:22:45 +00:00
Kashav Madan e7ad7b7104 Bug 1543251 - Move hasBeforeUnload from PBrowser to PWindowGlobal, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D37003

--HG--
extra : moz-landing-system : lando
2019-07-15 17:30:26 +00:00
Razvan Maries dc7ff541ae Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-07-15 18:26:45 +03:00
Razvan Maries e68758765e Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-07-15 12:35:40 +03:00
Mirko Brodesser 2f40f072ab Bug 1565584: move `nsIContentUtils::ContentIsDescendantOf` to `nsINode::IsInclusiveDescendantOf`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37880
2019-07-15 10:02:21 +02:00
longsonr 7cf71757bf Bug 1353164 Part 1 - Remove dominant-baseline values that no longer exist r=heycam 2019-07-13 15:35:08 +01:00
Razvan Maries affddc7861 Backed out changeset 6e4d13741a0f (bug 1564527) for perma AddressSanitizer failures. CLOSED TREE 2019-07-13 02:05:25 +03:00
Niklas Hambüchen b1eb1b43ef Bug 1564930 - Improve "XHR must not be LOADING or DONE" error messages. r=baku
The previous error message suggested that this is an internal error message
pointing out a bad state in the XHR state machine, when in fact this is
a user error (calling `overrideMimeType()` or setting `responseType()` after
`send()`).

This commit improves and disambiguates the error messages, pointing out to
the user what they did wrong, like other browsers do.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 22:51:10 +00:00
alwu ac67bcfa81 Bug 1545970 - make sure we only divide or modular TimeUnit on unsigned int32. r=jya
The way we use `operator/` on TimeUnit is usaually to divide 2 for the fuzz or to divide the playback rate, and the rate is always a unsigned int.

The `operator%` should also have same constraint, because there is meaningless to do such a operation on a negative value.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 22:05:06 +00:00
Andrea Marchesini 33eb80d210 Bug 1564821 - Response must call JS::ReadableStreamReleaseCCObject() if ::GetBody() fails, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37711

--HG--
extra : moz-landing-system : lando
2019-07-12 23:43:16 +00:00
Jean-Yves Avenard db6ecd1b6e Bug 1560440 - Don't attempt to set sample's duration. r=bryce
This is a partial revert of bug 1524890 - P17.

When setting the duration, with some videos, on output WMF set nonsensical values. Sometimes the duration read is equal to the timestamp of the previous frame leading to broken A/V sync.

In bug 1222874, we will remove the entire concept of video frame's duration.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 15:50:09 +00:00
Tom Ritter 0ca0f2dea1 Bug 1564527 - Enable AssertEvalNotUsingSystemPrincipal on Nightly builds r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D37460

--HG--
extra : moz-landing-system : lando
2019-07-11 08:46:18 +00:00
Andreea Pavel c8af1a97a0 Merge mozilla-central to autoland on a CLOSED TREE 2019-07-13 00:53:27 +03:00
Andreea Pavel 3fed932eaa Merge mozilla-inbound to mozilla-central a=merge 2019-07-13 00:45:18 +03:00
Byron Campen [:bwc] 88c34e7b3f Bug 1559512: Make sure that we grab the first RTP packet when checking RTP extensions, because the mid extension is only used in the first several. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D37884

--HG--
extra : moz-landing-system : lando
2019-07-12 21:36:16 +00:00
Dorel Luca 77d61d6a6f Backed out 5 changesets (bug 1560178) for Browser-chrome failures in builds/worker/workspace/build/src/dom/base/Document.cpp. CLOSED TREE
Backed out changeset 1ff8a41dd3c1 (bug 1560178)
Backed out changeset 4aaeda889656 (bug 1560178)
Backed out changeset b1dfc0b5a14c (bug 1560178)
Backed out changeset 45fca0f1b675 (bug 1560178)
Backed out changeset fc2be64e4ece (bug 1560178)
2019-07-12 18:38:34 +03:00
Jon Coppeard eb473b5dda Backed out changeset ec4aac5a6c9f (bug 1557771) for performance regressions a=backout 2019-07-12 15:08:24 +01:00
Daniel Varga 883bfd385e Merge mozilla-inbound to mozilla-central. a=merge 2019-07-12 12:58:03 +03:00
Mihai Alexandru Michis e0b0dfa5eb Backed out 15 changesets (bug 1014393) for causing bustages in TestMuxer.cpp and gmock-internal-utils.h CLOSED TREE
Backed out changeset 0ddbdbfa87f6 (bug 1014393)
Backed out changeset 37399c83d3bf (bug 1014393)
Backed out changeset fe652475a785 (bug 1014393)
Backed out changeset 2812ca77d87d (bug 1014393)
Backed out changeset 6755ef7b361c (bug 1014393)
Backed out changeset 72e545bdcce3 (bug 1014393)
Backed out changeset 2f030ee55722 (bug 1014393)
Backed out changeset e9416b502170 (bug 1014393)
Backed out changeset 5a01d6d44634 (bug 1014393)
Backed out changeset 3457a5065dc4 (bug 1014393)
Backed out changeset 2a4999e0475b (bug 1014393)
Backed out changeset 0be3804dc04e (bug 1014393)
Backed out changeset 234994d8f136 (bug 1014393)
Backed out changeset d17f91ff2014 (bug 1014393)
Backed out changeset 25f58baa8159 (bug 1014393)

--HG--
rename : dom/media/encoder/EncodedFrame.h => dom/media/encoder/EncodedFrameContainer.h
2019-07-12 17:18:23 +03:00
Andreas Pehrson 221a8dfeca Bug 1014393 - Use undef-after-def pattern in MediaRecorder and related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D37700

--HG--
extra : moz-landing-system : lando
2019-07-12 13:42:00 +00:00
Andreas Pehrson a80b26a3f5 Bug 1014393 - Minor mochitest fixes. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D35311

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:45 +00:00
Andreas Pehrson 8d5c8d17a4 Bug 1014393 - Add Blob::CreateEmptyBlob. r=baku
I needed empty blobs in MediaRecorder and seeing that there was no
Blob::CreateEmptyBlob, nor an export of EmptyBlobImpl, I thought
Blob::CreateEmptyBlob would be the cleaner solution, so here it is.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:48 +00:00
Andreas Pehrson 25e0a96f86 Bug 1014393 - Unify MediaRecorder session shutdown paths and fix event timing when stopping per spec. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D17814

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:32 +00:00
Andreas Pehrson 4eb24d2d87 Bug 1014393 - Remove MediaRecorder::GetParentObject. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D35308

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:27 +00:00
Andreas Pehrson 4ce75e7e63 Bug 1014393 - Remove MediaRecorder::Session::PushBlobRunnable. r=bryce
This moves the impl of PushBlobRunnable from a runnable to MozPromise, which
let's us more easily modularize it's parts (gather the blob, fire dataavailable)
to make individual code paths more explicit.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:24 +00:00
Andreas Pehrson aa33941822 Bug 1014393 - Add gtests for the standalone muxer. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D35307

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:15 +00:00
Andreas Pehrson 2e37cdaa99 Bug 1014393 - Break out muxing and queueing of track data from MediaEncoder to new Muxer class. r=bryce
This first of all does some refactoring of how metadata is encoded in
MediaEncoder. This is now guided by the new Muxer class. If we're ready to pass
data to the muxer and it does not have metadata yet, we provide metadata before
giving it any media data. This metadata is passed to the muxer in a single call.
The metadata provided in this call must stay valid for the entire recording.
This removes MediaEncoder::GetEncodedMetadata().

This also removes the ctor argument from the WebMWriter since it can now rely on
the single SetMetadata() instead.
To comply with the ContainerWriter::SetMetadata() docs,
WebMWriter::SetMetadata() will now also sanity check metadata.

ContainerWriter instances are updated somewhat, to accommodate these changes.

Lastly, and most important, the new Muxer class manages muxing of the (up to)
two tracks into a single container, ensuring that timestamps increase
monotonically throughout a recording.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:15 +00:00
Bryce Van Dyk a539255bf2 Bug 1014393 - Move AudioGenerator to its own files so it can be used in more media gtests. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D35389

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:08 +00:00
Bryce Van Dyk 4cad8c0a53 Bug 1014393 - MediaEncoder better orders frames passed to the muxer. r=pehrsons
Update MediaEncoder to pass frames to the muxer in order of their time stamps.
This should prevent the currently possible scenario where audio and video
frames are written with non-monotonically increasing timestamps (in violation
of the webm spec).

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:01 +00:00
Bryce Van Dyk b0e3afd09f Bug 1014393 - Use MediaQueue to store frames pending write to muxer in MediaEncoder. r=pehrsons
MediaQueue provides a better interface for interleaving frames when writing to
the muxer (this change will follow in another changeset). The queue interface
provides a nicer abstraction than manually managing a nsTArray.

MozReview-Commit-ID: 5V5XmYODFdA

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:40:54 +00:00
Bryce Van Dyk f767feb399 Bug 1014393 - Update EncodedFrame class to more closely resemble MediaData class. r=pehrsons
This changes EncodedFrame to behave more like MediaData, so that EncodedFrame
can be used with the MediaQueue data structure. It also provides a somewhat
more consistent interface across media data types.

MozReview-Commit-ID: I2o6n30ErxB

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:40:47 +00:00
Bryce Van Dyk 8dde6a0048 Bug 1014393 - Shift responsibility of adjusting packets with opus codec delay to MediaEncoder. r=pehrsons
Move the responsibility of adjusting opus frame timestamps to the MediaEncoder.
This was previously done by the EbmlComposer, but doing so in the MediaEncoder
means we can have greater control over handling of time codes and interleaving
of frames.

MozReview-Commit-ID: 2g9cy1IqOph

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:40:40 +00:00
Bryce Van Dyk 79c5e43bd4 Bug 1014393 - Remove EncodedFrameContainer. r=pehrsons
Remove EncodedFrameContainer and clean up areas where it was used.
EncodedFrameContainer provided a wrapper around an
nsTArray<RefPtr<EncodedFrame>>, but it simplifies the code to simply expose
this array. Also clean up unused enums in EncodedFrame, and clean up some of
the outdated comments for our encoded frame handling.

MozReview-Commit-ID: Bh3VKesVoJE

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

--HG--
rename : dom/media/encoder/EncodedFrameContainer.h => dom/media/encoder/EncodedFrame.h
extra : moz-landing-system : lando
2019-07-12 13:40:33 +00:00
Bryce Van Dyk c949841839 Bug 1014393 - Separate MediaEncoders encode and mux steps. r=pehrsons
Separating the encode and mux steps allows for better control over interleaving
audio and video data. If encode and mux are done in a single step it's possible
to mux large amounts of audio or video data which should have been interleaved
with the other data type to give correctly ordered time stamps in the target
container.

MozReview-Commit-ID: CBYemrkpyF5

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:40:25 +00:00
Andreas Pehrson 83ae7ef921 Bug 1565317 - Handle missing mMediaSource in ReduceConstraint. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D37778

--HG--
extra : moz-landing-system : lando
2019-07-12 13:04:14 +00:00
Andreas Pehrson 8a56ba7a99 Bug 1560979 - Account for video element's intrinsic size in CanvasRenderingContext2D::DrawImage. r=jib,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D35782

--HG--
extra : moz-landing-system : lando
2019-07-12 12:46:03 +00:00
Gijs Kruitbosch 8b9bc73770 Bug 1560178 - fix miscellaneous tests to allow them to keep working when disallowing remote content in the parent process, r=aswan,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D36310

--HG--
extra : moz-landing-system : lando
2019-07-12 12:35:59 +00:00
Ehsan Akhgari 1000118805 Bug 1565373 - Use the intrinsic storage principal when inheriting directly; r=baku
We shouldn't perform an anti-tracking check here, since that may result
in us picking the node principal unintentionally.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 09:08:38 +00:00
Paul Adenot c74b95c375 Bug 1350973 - Implement new attributes MediaStreamAudioSourceNode.mediaStream and MediaElementAudioSourceNode.mediaElement. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37283

--HG--
extra : moz-landing-system : lando
2019-07-11 20:09:58 +00:00
Paul Adenot 6d8671ebb8 Bug 1564422 - Change `outputLatency` and `getOutputTimestamp` when `resistFingerPrinting` is enabled. r=tjr
When Firefox is configured to resist fingerprinting, the latency figure returned
is the most commonly found on a particular OS.

For Android, I got data from [0], roughly copy/pasted the table into a file and
did:

```
cat file | cut -d $'\t' -f4 | grep "^[[:digit:]]" | cut -d ' ' -f 1 | sort -h
| uniq -c | sort -h
```

which indicated that 40ms was a good number for round trip latency (input to
output). Since this is for output latency only and the audio path
is roughly symmetrical in terms of duration, we report 20ms.

For OSX, 512 is always used with the default hardware in Firefox, with this
patch, it's always 512 regardless of the setup.

On Linux/Pulse, we use 25ms [1] always, and this is adjusted by PulseAudio. This
makes it always return 25ms.

On Windows, there is a wide variety of configurations, but it's common to be in
the ballpark of 80ms output (this is very empirical, by testing a bunch of
hardware over the years).

For other OSes, we use 2048 frames (adjusted to the sample-rate).

[0]: https://superpowered.com/latency
[1]: https://searchfox.org/mozilla-central/source/media/libcubeb/src/cubeb_pulse.c#725

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

--HG--
extra : moz-landing-system : lando
2019-07-12 11:27:25 +00:00
Paul Adenot 553f80fde6 Bug 1324545 - Implement AudioContext getOutputTimestamp(). r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37281

--HG--
extra : moz-landing-system : lando
2019-07-12 11:27:25 +00:00
Paul Adenot 8c692f2f23 Bug 1324552 - Implement AudioContext baseLatency and outputLatency attributes. r=pehrsons,baku
Differential Revision: https://phabricator.services.mozilla.com/D37280

--HG--
extra : moz-landing-system : lando
2019-07-12 11:28:03 +00:00
Andrea Marchesini 2a3e21430e Bug 1559919 - Finish the WorkerHolder cleanup - part 11 - WorkerHolder replaced by WorkerRef, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35230

--HG--
extra : moz-landing-system : lando
2019-07-12 11:18:17 +00:00
Andrea Marchesini 46c41f3318 Bug 1559919 - Finish the WorkerHolder cleanup - part 10 - CacheWorkerHolder ported to WorkerRef, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35229

--HG--
rename : dom/cache/CacheWorkerHolder.cpp => dom/cache/CacheWorkerRef.cpp
rename : dom/cache/CacheWorkerHolder.h => dom/cache/CacheWorkerRef.h
extra : moz-landing-system : lando
2019-07-12 11:17:59 +00:00
Andrea Marchesini 839b9341d1 Bug 1559919 - Finish the WorkerHolder cleanup - part 9 - Notification API ported to WorkerRef, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35228

--HG--
extra : moz-landing-system : lando
2019-07-12 11:17:52 +00:00
Andrea Marchesini 1d8a0b716c Bug 1559919 - Finish the WorkerHolder cleanup - part 8 - Get rid of WorkerHolderToken, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35227

--HG--
extra : moz-landing-system : lando
2019-07-12 11:17:50 +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
Andrea Marchesini f3428b3c3c Bug 1559919 - Finish the WorkerHolder cleanup - part 6 - IPCWorkerRef in ServiceWorkerChild, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35225

--HG--
extra : moz-landing-system : lando
2019-07-12 11:16:52 +00:00
Andrea Marchesini dda55c2dec Bug 1559919 - Finish the WorkerHolder cleanup - part 5 - IPCWorkerRef in ServiceWorkerRegistrationChild, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35224

--HG--
extra : moz-landing-system : lando
2019-07-12 11:16:34 +00:00
Andrea Marchesini dfb7f820f8 Bug 1559919 - Finish the WorkerHolder cleanup - part 4 - IPCWorkerRef in ServiceWorkerContainerChild, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35223

--HG--
extra : moz-landing-system : lando
2019-07-12 11:16:15 +00:00
Andrea Marchesini 6e86832cf2 Bug 1559919 - Finish the WorkerHolder cleanup - part 3 - IPCWorkerRef r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35222

--HG--
extra : moz-landing-system : lando
2019-07-12 11:16:03 +00:00
Andrea Marchesini 492ae88ae0 Bug 1559919 - Finish the WorkerHolder cleanup - part 2 - Remove dead code in PerformanceStorageWorker, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35221

--HG--
extra : moz-landing-system : lando
2019-07-12 11:15:46 +00:00
Andrea Marchesini 7afa8dc82b Bug 1559919 - Finish the WorkerHolder cleanup - part 1 - IndexedDB doesn't use WorkerHolder, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35220

--HG--
extra : moz-landing-system : lando
2019-07-12 11:15:33 +00:00
Daniel Varga cf2048abd6 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-07-12 13:03:23 +03:00
Jan Andre Ikenmeyer a216f3dde7 Bug 1565365 - Let webgl.force-enabled apply to WebGL2 as well r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D37821

--HG--
extra : moz-landing-system : lando
2019-07-12 02:34:19 +00:00