Commit Graph

68689 Commits

Author SHA1 Message Date
Shawn Huang
06e22a6819 Bug 1389561 - Part 1: Ensure origin initialized in Maintenance::DirectoryWork. r=janv
Make sure origins had been initialized in Maintenance::DirectoryWork before getting
QuotaObject. It's possible that DatabaseMaintenance::Run before origins initialized.
2017-10-26 16:59:18 +08:00
Edgar Chen
b3157c0147 Bug 1410790 - Add more assertion in CustomElementData::SetCustomElementDefinition and GetCustomElementDefinition; r=smaug
This is a follow-up patch for bug 1392970. Since we only set CustomElementDefinition on a custom element
which is "custom", we could add more assertion to ensure that.

MozReview-Commit-ID: 2sLP53bAYVV

--HG--
extra : rebase_source : 523761aa7312ddfaaf91f79e39c44ddce5cf9335
2017-10-13 11:54:46 +08:00
Kris Maglione
257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07:00
Sebastian Hengst
85c5258052 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-26 00:45:51 +02:00
Sebastian Hengst
e38c4ab9b8 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1LCusZIzMkc
2017-10-26 00:21:53 +02:00
Sebastian Hengst
2c2e866a0b merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 58eV4bGCmDC

--HG--
extra : rebase_source : 703ea22c56ed4aaf0afd7c72bb26f1f2c64a0881
2017-10-25 23:58:17 +02:00
Emilio Cobos Álvarez
24e65c29e3 No bug - Remove FIXME that doesn't really apply. r=comment-only
See the explanation in bug 1404789 comment 53.

DONTBUILD because it's removing a comment.
MozReview-Commit-ID: KJEI3G4Mv96
2017-10-25 23:07:32 +02:00
Jesse Ruderman
8d28e8cb3d Bug 675516 - Add crashtest. r=me 2017-10-25 14:58:33 -04:00
Sebastian Hengst
dd47bee646 Backed out changeset f67f8342b981 (bug 1357082) on request from jmaher for still high frequency. r=backout a=backout
MozReview-Commit-ID: 5aI3SCZVaT9

--HG--
extra : amend_source : eecf508380597815c7ad8199e8f3ac2b8ab53d35
2017-10-25 13:02:51 +02:00
Jonathan Kew
793b63713b Bug 1408612 - patch 1 - Use single-precision floats more consistently for glyph position computations when drawing text. r=jrmuizel 2017-10-24 09:59:09 +01:00
Brian Birtles
ebedef2a25 Bug 849593 - Skip samples of active SMIL timed elements when the sample time precedes the current interval; r=dholbert
In some circumstances it is possible to sample a timed element in the active
state with a time that precedes is current interval.

One possible sequence of steps leading to this situation is as follows:

1. A timed element (e.g. <set>, <animate>) with a non-zero begin time is the
   child of <svg> element A (its "time container") but has yet to be sampled.

2. In order to resolve its initial interval, the timed element registers a
   startup milestone with its time container at time 0.

3. However, before the sample is performed where the timed element's initial
   current interval is resolved, <svg> element A is detached from the document
   tree.

4. The timed element is then attached to a different <svg> element B that has
   a current time greater than the begin time of the timed element and less than
   that of <svg> element A.

5. Since the timed element is still in its startup state it registers its
   startup milestone again, this time with its new time container, i.e. <svg>
   element B.

6. A tick occurs or the document has its style flushed such that a sample is
   performed.

   This includes running the milestone sample which causes the timed element to
   resolve its initial current interval. Furthermore the subsequent regular
   sample of the timed element causes it to transition into its active state
   because the current time of <svg> element B is greater than the begin time of
   the timed element.

7. <svg> element A is re-attached to the document.

8. When we go to run the next sample, we iterate through all time containers
   associated with the document's animation controller which includes both <svg>
   element A, and <svg> element B.

9. <svg> element A renders up its 0 milestone from step (2) since it has yet to
   run it. It converts this to parent time, i.e. the time space of the animation
   controller, which will be zero or less depending on the current time of <svg>
   element A when it was re-attached.

10. Since the milestone from <svg> element A will be the earliest milestone
    time, it will be used as the next milestone sample time.

11. The timed element is then sampled using this time, but first it is converted
    to a time in the time space of the timed element's time container, which is
    now <svg> element B.

    As a result of this conversion, the sample time may end up being *before*
    the beginning of the timed element's current interval. Since timed elements
    never expect the time to go backwards an assertion fails when it detects
    that it is active, but is being sampled before its current interval.

For this particular case, ignoring the "early" sample seems to be the most
appropriate action.

More generally, however, we can anticipate other cases similar to this where
milestones are registered that cause the sample time to temporarily go
backwards. A quick audit of nsSMILTimedElement::DoSampleAt suggests that, with
the code changes from this patch, that is probably ok.

As an alternative we could, perhaps, try to drop and re-create all milestones
when time containers are re-attached to the document tree but that would add
more complexity and would not necessarily cover other similar cases of this
situation.

I have verified that the crashtest included in this changeset fails without the
code changes also in this changeset.

MozReview-Commit-ID: KKGYRayNkpo

--HG--
extra : rebase_source : 832d4b357a2a2fe07abf9eab3a6046599aff3ef5
2017-10-24 13:06:04 +09:00
Tom Ritter
2d9fdd1bcf Bug 1411142 Cast enums to int to silence warning about comparing enums of different types r=jld
MozReview-Commit-ID: LIbuzPuZ2mr

--HG--
extra : rebase_source : ee5d1f4bf6ef4d0d2e0a694988beeea88beddd80
2017-10-23 23:54:21 -05:00
Brian Birtles
db9b84ee6c Bug 1407898 - Check if presContext is null before dereferencing in GetComputedKeyframeValues; r=hiro
There are no reliable steps to make this happen but it appears to have happened
at least twice during fuzzing. As a result, it doesn't matter too much what the
behavior here is as long as we don't crash.

MozReview-Commit-ID: 4gdiBL2wngU

--HG--
extra : rebase_source : 54afce721f8b59c2ad038e0c2222f64e71a9b917
2017-10-25 15:34:50 +09:00
Sebastian Hengst
24b7b2eb7c merge mozilla-central to autoland. r=merge a=merge 2017-10-24 23:59:14 +02:00
Tom Schuster
d3b457113a Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen 2017-10-24 20:48:14 +02:00
Tom Schuster
7a6aff2c7e Bug 638054 - Remove watch class-hook and proxy trap r=jorendorff,bz 2017-10-24 20:48:14 +02:00
Joel Maher
a89ccf49cd Bug 1410306 - Disable dom/canvas/test/webgl-conf/generated/test_2_conformance__glsl__misc__shader-uniform-packing-restrictions.html on win7/debug for frequent failures. r=me, a=testonly 2017-10-24 12:37:25 -04:00
Stone Shih
9ecdd8f6a0 Bug 1398030 Part2: Handle null id of the message for EventSource. r=baku.
When server responses a field value with null, we have to ignore it, or we fail to SetRequestMethod for the http channel.
MozReview-Commit-ID: EW9NHMy22Fc
2017-10-20 10:22:55 +08:00
Stone Shih
169ec81875 Bug 1398030 Part1: Add debug info when EventSource set http request header failed. r=baku.
MozReview-Commit-ID: KLIvkazd8lP
2017-10-17 16:02:58 +08:00
Ben Kelly
6c787835d0 Bug 1410634 P2 Verify ServiceWorkerInfo.lastUpdateTime is not changed when reading from http cache. r=tt 2017-10-24 09:24:53 -04:00
Ben Kelly
fff580cb3d Bug 1410634 P1 Call channel IsFromCache() during OnStartRequest() to determine if update result came from http cache or network. r=tt 2017-10-24 09:24:53 -04:00
Sebastian Hengst
1ead0a96a9 Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 3dc4cb2bbaf55f3f6329687ce64d4e862fc3800b
2017-10-24 21:18:26 +02:00
Valentin Gosu
9dd47ebf50 Bug 1407679 - Merge nsIIOService and nsIIOService2 r=nwgh
Removes deprecated nsIIOService2.newChannelFromURIWithProxyFlags

MozReview-Commit-ID: Gr3nA25kcre

--HG--
extra : rebase_source : 3407b5ed0f8f7067523abee28c137db3cac86b14
2017-10-20 16:41:07 +02:00
Andi-Bogdan Postelnicu
a1d1eceab5 Bug 1411030 - memset only the underlying vector from the Array container. r=froydnj
MozReview-Commit-ID: 5R7ZxMEZdRY

--HG--
extra : rebase_source : 4503bffdc0191f8d3279acc0802bbf2e160cab17
2017-10-24 16:52:20 +03:00
Andi-Bogdan Postelnicu
0653980115 Bug 1411027 - avoid using memset on a not-trivial type like nsTabSizes. r=froydnj
MozReview-Commit-ID: 7bFwF4fs4gj

--HG--
extra : rebase_source : 23ec6f4a3fcfef987338d192577bd8cf3c0dbcba
2017-10-24 12:47:35 +03:00
Sylvestre Ledru
15f2be4d17 Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning r=froydnj
MozReview-Commit-ID: 8BIWJpv9Odz

--HG--
extra : rebase_source : cc7222f056c9eeefd57ecd77f776aa35f080b2ff
2017-10-23 22:40:30 +02:00
Sebastian Hengst
31bf3a1a42 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4Lk5P5UYmTe
2017-10-24 11:52:35 +02:00
Xidorn Quan
a97971e948 Bug 1357082 - Wait until after the next animation frame to trigger mousemove.
MozReview-Commit-ID: 3oVUzPuNGoa

--HG--
extra : source : 67915d1f6a22d8f2b78f03d9b0f0d7e00fbd543d
2017-10-24 15:52:06 +11:00
Yoshi Huang
26c9043304 Bug 1407498 - Don't query loadingprincipal in common case. r=baku
We queried 'loadingprincipal' attribute on the common call path, however
this should be queried if it's loaded by System Principal.

Also rename loadingprincipal to triggeringprincipal
2017-10-24 10:13:31 +08:00
Stone Shih
4274c680a7 Bug 1347689 Intermittent pointerevent_touch-action-button-test_touch-manual.html. r=kats.
The test case uses double intervals to make sure there is enough time to wait for the scroll event before continuing the testing. However, it doesn't work while the first timeout is delayed and the second one isn't. Tweaked the test case to start the second timer when the first one timeout.

MozReview-Commit-ID: gvhtIpzauE
2017-10-19 17:31:33 +08:00
Ryan VanderMeulen
4a8d7024ae Bug 1388764 - Skip test_object_plugin_nav.html on Linux debug builds for frequent mozilla::ipc::MessageChannel::WillDestroyCurrentMessageLoop() shutdown crashes. r=qdot 2017-10-23 21:43:30 -04:00
Sebastian Hengst
8072106c67 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-23 23:55:17 +02:00
Sebastian Hengst
364d36fab2 merge mozilla-inbound. r=merge a=merge
MozReview-Commit-ID: B09kHrHK42C
2017-10-23 23:50:37 +02:00
Sebastian Hengst
736af2bfa1 Backed out changeset 2602e10160a1 (bug 1410482) for leaks in devtools tests. r=backout
--HG--
extra : amend_source : f3e557c54b1f7b5338547100d7edf83b30e96681
2017-10-23 23:02:57 +02:00
Boris Zbarsky
b980d7ce62 Bug 1408444. Flag a few more ErrorResults as would-report-JS-exceptions. r=peterv
MozReview-Commit-ID: 6kx4TOao7nM
2017-10-23 16:30:18 -04:00
Sebastian Hengst
18f1987735 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-23 11:46:34 +02:00
Sebastian Hengst
d30462037f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: BcJNE0poEYk
2017-10-23 11:39:19 +02:00
Ben Kelly
d64c111b67 Bug 1409761 Create dom.serviceWorkers.disable_open_click_delay and set it to a larger value on fennec. r=smaug 2017-10-23 14:24:31 -04:00
Nathan Froyd
4f852fdd0c Bug 1410142 - use NS_NewLocalFile in dom/; r=baku
The interface is nicer, and it is probably slightly faster.
2017-10-23 14:22:14 -04:00
Alexander Surkov
094bc8871f Bug 1410482 - enable AOM for privileged content, r=smaug 2017-10-23 12:18:50 -04:00
Thomas Wisniewski
34162c2171 Bug 1405696 - pass the document encoding to NS_NewURI for XMLHttpRequest; r=bkelly
MozReview-Commit-ID: IZkWHGZacO0

--HG--
extra : rebase_source : 4cffffd6ce76f49f8515a04cd4f7523e5ceabb1f
2017-10-20 20:47:36 -04:00
Nicholas Nethercote
3842370ed8 Bug 1405541 (attempt 2) - Split AUTO_PROFILER_LABEL_DYNAMIC into three macros. r=mstange.
It's easy to mess up the scoping so that (a) the label is pushed and then
immediately popped, and/or (b) the string doesn't live long enough. It's also
easy to do a utf16-to-utf8 conversion unnecessarily when the profiler is
inactive. This patch splits that macro into three new ones that are harder to
mess up.

- AUTO_PROFILER_LABEL_DYNAMIC_CSTR: same as current.
- AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING: for nsCStrings.
- AUTO_PROFILER_LABEL_DYNAMIC_LOSSY_NSSTRING: for nsStrings.

--HG--
extra : rebase_source : 3e2bbec4737b696e1c86579ae54be4cb3186c100
2017-10-13 16:12:57 +11:00
Paul Adenot
cd9185e874 Bug 1408456 - Convert test_analyserNodeOutput.html to a web-platform-test: test-analyser-output.html. r=karlt
This also brings in and convert some utilities we have in Gecko, that will ease
porting more tests.

MozReview-Commit-ID: 2yPZQO504kH

--HG--
rename : dom/media/webaudio/test/test_analyserNodeOutput.html => testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test-analyser-output.html
extra : rebase_source : 0a9c9c336b1b53120010a081da131c76f103a838
2017-10-17 14:47:44 +02:00
Paul Adenot
23732e9bcc Bug 1408456 - Convert test_analyserNodeMinimum.html to a web-platform-test: test-analyser-minimum.html. r=karlt
MozReview-Commit-ID: F6VNiYBXr7Z

--HG--
rename : dom/media/webaudio/test/test_analyserNodeMinimum.html => testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test-analyser-minimum.html
extra : rebase_source : 4258a557e1bf07e0b1f0cbb3b2e517b2a3c56da9
2017-10-17 14:43:53 +02:00
Paul Adenot
fd0d5e5373 Bug 1408456 - Convert test_analyserScale.html to a web-platform-test: test-analyser-scale.html. r=karlt
MozReview-Commit-ID: CUhtCzfoi95

--HG--
rename : dom/media/webaudio/test/test_analyserScale.html => testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test-analyser-scale.html
extra : rebase_source : caae3eefcc9a1c814083bf7154b30f8b92ae788d
2017-10-17 14:47:32 +02:00
Paul Adenot
03d3466f23 Bug 1408456 - Convert test_analyserNodeWithGain.html to a web-platform-test: test-analyser-gain.html. r=karlt
MozReview-Commit-ID: 7gIj3cdZiZB

--HG--
rename : dom/media/webaudio/test/test_analyserNodeWithGain.html => testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test-analyser-gain.html
extra : rebase_source : 7571e6d2c8413671e20d36f5687df448c8aecca7
2017-10-16 17:04:45 +02:00
Paul Adenot
8f989cdbf4 Bug 1408456 - Convert test_AnalyserNode.html to a web-platform-test. r=karlt
MozReview-Commit-ID: GR3Ze8KIAKB

--HG--
rename : dom/media/webaudio/test/test_analyserNode.html => testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html
extra : rebase_source : fe5552c42600a937c5de004c867bc0e6628b37bc
2017-10-16 17:16:36 +02:00
Makoto Kato
1f86929f6d Bug 1406358 - Keep SpeechDelegate object until speaking is finished. r=eeejay
The delegate property of NSSpeechSynthesizer doesn't seem to add refcount from 10.13, so we have to keep SpeechDelegate object until speech is finished.

MozReview-Commit-ID: EVtMOPytkjR

--HG--
extra : rebase_source : f2a6d97942c19990a16dd68555328ed36280eb4a
2017-10-12 17:17:38 +09:00
Gerald Squelart
d2ed3d6312 Bug 1410252 - Convert 'WrapNotNull(new T(...' to 'MakeNotNull<T*>(...' - r=njn
Most cases where the pointer is stored into an already-declared variable can
trivially be changed to MakeNotNull<T*>, as the NotNull raw pointer will end
up in a smart pointer.

In RAII cases, the target type can be specified (e.g.:
`MakeNotNull<RefPtr<imgFrame>>)`), in which case the variable type may just be
`auto`, similar to the common use of MakeUnique.
Except when the target type is a base pointer, in which case it must be
specified in the declaration.

MozReview-Commit-ID: BYaSsvMhiDi

--HG--
extra : rebase_source : 8fe6f2aeaff5f515b7af2276c439004fa3a1f3ab
2017-10-20 18:25:33 +11:00
Nicholas Nethercote
21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00