Commit Graph

66211 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Phil Ringnalda
658d75701f Merge m-c to m-i
MozReview-Commit-ID: 8Njn4Fmf9sZ
2017-08-16 21:06:12 -07:00
Phil Ringnalda
478ce5e764 Backed out changeset 6b3566842a84 (bug 1390453) for ASan permaorange in test_eme_canvas_blocked.html
MozReview-Commit-ID: 7kGuQ4YGPuj
2017-08-16 20:58:18 -07:00
Bill McCloskey
9edd615af7 Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:

Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.

Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.

There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.

The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.

One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.

MozReview-Commit-ID: 9Evtr9oIJvx
2017-08-16 20:55:43 -07:00
Wes Kocher
9e13a44b54 Merge inbound to central, a=merge
MozReview-Commit-ID: GEfEDRZk5bo
2017-08-16 16:59:26 -07:00
Henry Chang
d09db9fb2b Bug 1390777 - Use srcdoc to replace src=data:xxx whenever possible. r=ckerschb
MozReview-Commit-ID: 1FeRTmZv46N

--HG--
extra : rebase_source : 1b53de3be3fdb37f2b85550bf2b922d4285721aa
2017-08-17 16:00:29 +08:00
Alastor Wu
d5273690a3 Bug 1388660 - part1 : AudioData::IsAudible() should return false when its data is super small and near to zero. r=jwwang
When the value of data is too small to be heard, AudioData::IsAudible() should return false so that we won't show the sound indicator for silent media.

In this case, the loudness of reported video is -673 dBFS, it's impossible to be heard.

MozReview-Commit-ID: Ewiko7RpkeX

--HG--
extra : rebase_source : 692e1af570648546deabc3fe4ae4c4b36bf8f356
2017-08-17 11:02:11 +08:00
Carsten "Tomcat" Book
c6627dee5c Backed out changeset 57be2e971ae2 (bug 1390748) for bustage
--HG--
extra : rebase_source : d698de5ec05677e010c0a47f27a1753c40acb90d
2017-08-17 08:37:17 +02:00
Carsten "Tomcat" Book
fd8d71864f Backed out changeset b86afd45a710 (bug 1390748)
--HG--
extra : rebase_source : 3567c5675e1506f5c46ffbe626f5f128118cf4c7
2017-08-17 08:35:38 +02:00
Carsten "Tomcat" Book
9619955a2f Backed out changeset ad5c7eb1bfe1 (bug 1390748)
--HG--
extra : rebase_source : 8aaefbb511c4e003a68fe2cf57541d8c3d2d29f2
2017-08-17 08:35:36 +02:00
Carsten "Tomcat" Book
bb63604dba Backed out changeset 2964dba33ef8 (bug 1390748)
--HG--
extra : rebase_source : f42c1924d26ca39d2fbe926055f53ff92bb25b69
2017-08-17 08:35:33 +02:00
Carsten "Tomcat" Book
2b8080e2fc Backed out changeset 4a31e4302e03 (bug 1390748)
--HG--
extra : rebase_source : 9571466ebc151a9788a380008c5d8941e3e24665
2017-08-17 08:35:30 +02:00
Carsten "Tomcat" Book
d559b237c9 Backed out changeset 94c0ec4bf19e (bug 1390748)
--HG--
extra : rebase_source : 2bdfa0f8d9829b6501a068f3c3d046ae4835503c
2017-08-17 08:35:28 +02:00
Carsten "Tomcat" Book
cdf7a88921 Backed out changeset d3c000525403 (bug 1390748)
--HG--
extra : rebase_source : e8fcead7d669d02c1696a522777c83e4b0def623
2017-08-17 08:35:25 +02:00
Carsten "Tomcat" Book
a16900ac51 Backed out changeset 9172b8d6ce3e (bug 1390748)
--HG--
extra : rebase_source : 44c2361c7247fe7d1948ff3e7f47f165e8368483
2017-08-17 08:35:23 +02:00
Carsten "Tomcat" Book
ce6b956372 Backed out changeset 3f9350bf23ff (bug 1390748)
--HG--
extra : rebase_source : 8f8f504428a69d6f91f86fa7bf944402180a6d82
2017-08-17 08:35:20 +02:00
Chris Pearce
343a77339a Bug 1390748 - Remove unnecessary includes in *Decoders. r=jwwang
MozReview-Commit-ID: 3bfAdpopOfp

--HG--
extra : rebase_source : 4a1c9d156c48140196aef219552b1982ad1161d0
2017-08-16 17:19:39 +12:00
Chris Pearce
bd4996facd Bug 1390748 - Remove some unnecessary includes. r=jwwang
MozReview-Commit-ID: J3viRI4Q6LF

--HG--
extra : rebase_source : 0f2ff9241c643d49c8293bdbfb4ec6adb1e2cd30
2017-08-16 17:18:39 +12:00
Chris Pearce
51800b3d2a Bug 1390748 - Remove ChannelMediaDecoder::CloneImpl() and remove subclasses of ChannelMediaDecoder. r=jwwang
MozReview-Commit-ID: 6nlBArYgwEJ

--HG--
extra : rebase_source : eb7a6fedf7b118e951e5f701b2c9f54459b3f3f0
2017-08-15 17:52:17 +12:00
Chris Pearce
371cb3e4c4 Bug 1390748 - Create DecoderTraits::IsSupportedType(const MediaContainerType&). r=jwwang
Most ChannelMediaDecoder::CloneImpl() functions just check to see whether
their "is enabled" pref is still true, and then clone their true type.

If we had a function to check whether the decoder for an arbitrary type
was still enabled, we'd not need the "is enabled" checks in the CloneImpl()
implementations. We'd then have removed the last custom behaviour in the
ChannelMediaDecoder subclasses.


MozReview-Commit-ID: D7kW6kb6ztW

--HG--
extra : rebase_source : 88f259ea0245a4405897959d5c115b0b79dc45e2
2017-08-15 17:38:16 +12:00
Chris Pearce
60751f0b79 Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge

--HG--
extra : rebase_source : 505f9dce979aad0529b07d2c046dca5028af6de6
2017-08-15 17:09:06 +12:00
Chris Pearce
2e91854fcd Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn

--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
2017-08-15 17:07:13 +12:00
Chris Pearce
0349590c2f Bug 1390748 - Remove unnececssary 'public:' in MediaDecoder.h. r=jwwang
There's an existing 'public:' further up.


MozReview-Commit-ID: 7CMmpVkZ7oz

--HG--
extra : rebase_source : e402ec2efd081c8acee3f46925e167323494377e
2017-08-15 16:38:05 +12:00
Chris Pearce
622ee050c8 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 5a9932bf98992e13ba850dd640d2623ad8bcccbb
2017-08-15 16:37:00 +12:00
Chris Pearce
e238ff328d Bug 1390748 - Remove OggDecoder::CreateStateMachine(). r=jwwang
MozReview-Commit-ID: 2JgZ2Ppv6as

--HG--
extra : rebase_source : 5ce2fe9136dcd32f62f7de0e85523cdcda8fa206
2017-08-15 16:21:35 +12:00
Xidorn Quan
e6414a0a93 Bug 1384001 - Reenable test_intersectionobservers.html. r=xidorn
MozReview-Commit-ID: 1duaKfd8ADd

--HG--
extra : rebase_source : dcfc6afd19b2c9c242f8cc636e10bfd2d326ce61
2017-08-17 13:35:37 +10:00
Phil Ringnalda
38ce1ea2a0 Backed out 10 changesets (bug 1390748) for build bustage
Backed out changeset 02b36ee5fb17 (bug 1390748)
Backed out changeset 84e8bf01c856 (bug 1390748)
Backed out changeset fc8989be30f3 (bug 1390748)
Backed out changeset 14d421ace6cc (bug 1390748)
Backed out changeset 7dadac869038 (bug 1390748)
Backed out changeset 0e77809e7bc2 (bug 1390748)
Backed out changeset bf78a8dce9c5 (bug 1390748)
Backed out changeset 5fa77990472e (bug 1390748)
Backed out changeset 5d3b637d2485 (bug 1390748)
Backed out changeset 634fe076d134 (bug 1390748)

MozReview-Commit-ID: Dxio8vXDCHg
2017-08-16 21:33:10 -07:00
Chris Pearce
162ce2ce95 Bug 1390748 - Remove unnecessary includes in *Decoders. r=jwwang
MozReview-Commit-ID: 3bfAdpopOfp

--HG--
extra : rebase_source : 0696df4f22dd261d245f905db2749ae3323460bc
2017-08-16 17:19:39 +12:00
Chris Pearce
e927f10587 Bug 1390748 - Remove some unnecessary includes. r=jwwang
MozReview-Commit-ID: J3viRI4Q6LF

--HG--
extra : rebase_source : 6661db3a00fc8b378aedd456950fb819f699507b
2017-08-16 17:18:39 +12:00
Chris Pearce
d22c79dd24 Bug 1390748 - Remove ChannelMediaDecoder::CloneImpl() and remove subclasses of ChannelMediaDecoder. r=jwwang
MozReview-Commit-ID: 6nlBArYgwEJ

--HG--
extra : rebase_source : 5a669544b7a9c6f2d4d27a47c621c21b9317f789
2017-08-15 17:52:17 +12:00
Chris Pearce
fa780c5329 Bug 1390748 - Create DecoderTraits::IsSupportedType(const MediaContainerType&). r=jwwang
Most ChannelMediaDecoder::CloneImpl() functions just check to see whether
their "is enabled" pref is still true, and then clone their true type.

If we had a function to check whether the decoder for an arbitrary type
was still enabled, we'd not need the "is enabled" checks in the CloneImpl()
implementations. We'd then have removed the last custom behaviour in the
ChannelMediaDecoder subclasses.


MozReview-Commit-ID: D7kW6kb6ztW

--HG--
extra : rebase_source : f463785d2975adceffd62037315d169736effbc0
2017-08-15 17:38:16 +12:00
Chris Pearce
a0917579b4 Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge

--HG--
extra : rebase_source : 366d4e34e9c425b478b4c9058e27c9a32de36515
2017-08-15 17:09:06 +12:00
Chris Pearce
ba9eb9c3bb Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn

--HG--
extra : rebase_source : 63513ce3b01546142357182f21fce56932b32f7f
2017-08-15 17:07:13 +12:00
Chris Pearce
68ebdda193 Bug 1390748 - Remove unnececssary 'public:' in MediaDecoder.h. r=jwwang
There's an existing 'public:' further up.


MozReview-Commit-ID: 7CMmpVkZ7oz

--HG--
extra : rebase_source : ff3f35eed59ec37adfa78528e77b80ea06fb876d
2017-08-15 16:38:05 +12:00
Chris Pearce
582456c0a6 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 01b4a59cba8ec64480779fb6849322841646ca3b
2017-08-15 16:37:00 +12:00
Chris Pearce
145246057b Bug 1390748 - Remove OggDecoder::CreateStateMachine(). r=jwwang
MozReview-Commit-ID: 2JgZ2Ppv6as

--HG--
extra : rebase_source : fac9fc0b3904061881bf161aee7223cd5b1d14b9
2017-08-15 16:21:35 +12:00
Chris Pearce
f2902bdf82 Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya
MozReview-Commit-ID: 1aTncGfBicu

--HG--
extra : rebase_source : 8ad085eb81d195732c385718c283b4752e5e3c80
2017-08-15 16:13:00 +12:00
Phil Ringnalda
a81f7092c3 Merge m-c to autoland
MozReview-Commit-ID: 7eiDUrdOIoC
2017-08-16 21:05:21 -07:00
Xidorn Quan
179961b3c9 Bug 1383845 - Enable tests disabled for bug 1383845. r=TYLin
MozReview-Commit-ID: Glao9d9PiUF

--HG--
extra : rebase_source : cfc70fcb350a7ee8e325ba1bda0bcdead62d786e
2017-08-17 10:51:59 +10:00
Tom Prince
ff1583cdb6 Bug 1385950 - Disable test_peerConnection_captureStream_canvas_webgl.html r=kwierso
MozReview-Commit-ID: 3L1v3Mjk29S
2017-08-16 18:30:44 -06:00
Bryce Van Dyk
ae6127795a Bug 1371166 - Explicitly load videos via video.load to get a cross origin requests to take place. r=jib
Change where load calls are used in media recorder principals test to more
reliably force cross origin requests.

MozReview-Commit-ID: 7La6ZIRmsTQ

--HG--
extra : rebase_source : 58b8049de46ad5800300033dd4ee101e68171c70
2017-08-11 12:32:14 +12:00
James Cheng
5f81ad1954 Bug 1390453 - Don't call VerifyCdmHost_0 in non-official builds. r=cpearce
MozReview-Commit-ID: 3eM7pBs6Jr1
2017-08-16 07:28:14 -04:00
Thomas Nguyen
33fb4a1505 Bug 1384493 - LoadStyleLink and LoadInlineStyle should use correct referrer policy. r=heycam
If the link element has referrerpolicy attribute, we should use policy in the
attribute with higher priority

MozReview-Commit-ID: GZZeRaoxPUw
2017-08-15 00:05:00 -04:00
Eden Chuang
97081209f0 Bug 1390737 - Run test_canMakePayment.html in nightly build only because it depends on nightly only UI service. r=btian 2017-08-16 12:53:25 +08:00
Gabor Krizsanits
722233fed1 Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-16 13:00:22 +02:00
Gabor Krizsanits
5acd81eb72 Bug 1376895 - Disable preloaded browser in two mochitests. r=me
nsIIOService based events when used via SpecialPowers in mochitests
combined with the preloaded browser in the same process can cause
IsSafeToRun() assertion in SchedulerGroup.h:81. To avoid that we make sure that
previous tests in the suit do not create a preloaded browser. This cannot happen
in a real life scenario.
2017-08-16 13:00:04 +02:00
Carsten "Tomcat" Book
eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Carsten "Tomcat" Book
1fc6e56a12 merge autoland to mozilla-central a=merge 2017-08-16 11:20:31 +02:00
Carsten "Tomcat" Book
786ca37886 Backed out changeset 6949fdc7f97c (bug 1376895) 2017-08-16 11:16:04 +02:00