Commit Graph

27 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Alex Chronopoulos
a008331435 Bug 1509462 - Make DecoderDoctorLifeLogger constructor/destructor protected. r=gerald
DecoderDoctorLifeLogger is used as a base class in many classes but it does need to have a virtual destructor to avoid adding a vtable in the class. Thus the constructor and destructor become protected to avoid being used as base pointer to delete the real object.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 20:46:19 +00:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

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

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Gabriele Svelto
266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Noemi Erli
06a8cd8e3c Backed out changeset bee1c344cb47 (bug 1491909) for failures in browser/components/extensions/test/xpcshell/test_ext_geckoProfiler_control.js 2018-10-24 04:23:13 +03:00
Denis Palmeiro
fc930ad16f Bug 1491909 - Add an AllocPolicy to mozilla::JSONWriter r=jwalden,mstange
JSONWriter currently calls new and delete indirectly through mozilla::MakeUnique to allocate a buffer.  Becuase of this, the methods of this class cannot be invoked within Spidermonkey due to https://searchfox.org/mozilla-central/source/config/check_vanilla_allocations.py#6-14.  Therefore, JSONWriter needs an AllocPolicy template parameter so that the allocation and deallocation routines can be changed to match the JS AllocPolicy when invoked within SpiderMonkey.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:31 +00:00
Mike Hommey
117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Gerald Squelart
fd5c125559 Bug 1448494 - Use NonDereferenceable in DDLogger - r=froydnj
DecoderDoctorLifeLogger now passes a NonDereferenceable pointer to
LogConstruction/LogDestruction, to avoid UBSan errors. It is possible because
DDLogger only keeps pointer values for logging (the pointer type is converted
to a string), these pointers are never actually dereferenced.

Note that the uintptr_t value() is converted to `const void*` because that's
what DDLogger uses everywhere; an upcoming bug will make DDLogger use
NonDereferenceable everywhere instead.

MozReview-Commit-ID: K5wJrGVCub0

--HG--
extra : rebase_source : cc802706d1c2c5a60ac692d132038c8418f8dedd
2018-03-29 01:18:08 +11:00
Gerald Squelart
9d6a35ba05 Bug 1442819 - Suppress UBSan false positive - r=froydnj
MozReview-Commit-ID: 9pmmYc5gevV

--HG--
extra : rebase_source : 966d42e2a916308097e15d43eb6a8842af3ee961
2018-03-13 08:26:52 +11:00
Nathan Froyd
e7492f2d00 Bug 1443932 - part 1 - add nsIThreadManager::kThreadPoolStackSize; r=erahm
A lot of our thread pools use the default stack size for the platform
they're on, which can be rather large (8MB, usually, on Linux and OS X)
and is probably too much for the typical thread in the thread pool
regardless.  SharedThreadPool already has some logic for selecting a
reasonable stack size for worker threads; let's move that logic to
nsIThreadManager so that logic (and constant) can be shared more
broadly.  (That we already have a couple of instances of
SharedThreadPool usage solely for this constant suggests that it is a
concept that should be available in a more central location.)
2018-03-07 20:33:17 -05:00
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Gerald Squelart
83602b8860 Bug 1407810 - DDMOZ_LOG to replace MOZ_LOG and also output to DDLogger - r=jwwang
This macro may be used to replace MOZ_LOG in most files, where it is used in
non-static member functions of classes that are registered with
DDLoggedTypeTraits.

MozReview-Commit-ID: A8DYmGoMv7f

--HG--
extra : rebase_source : 51d24f53a19fcbcbe42faea668256f1804f0abc9
2017-10-13 16:31:28 +11:00
Gerald Squelart
aa608c873d Bug 1407810 - Enable DDLogging from the beginning if MOZ_LOG contains DDLogger - r=jwwang
This allows logging from the command line without using a webextension.

MozReview-Commit-ID: 6pkDbLXzz3X

--HG--
extra : rebase_source : 92a840d47054e5bef4cd7adf0aadb16f093f7639
2017-12-04 10:52:51 +11:00
Gerald Squelart
5d9cad55f1 Bug 1407810 - DDMediaLogs::SizeOf accounts for shallow message queue size - r=jwwang
MozReview-Commit-ID: 9irARpytVoh

--HG--
extra : rebase_source : a18db325396ca50b9272559b3dcbb7ccc3d63f87
2017-10-17 16:10:05 +11:00
Gerald Squelart
e18e0d36a5 Bug 1407810 - Tweak atomics in MultiWriterQueue - r=jwwang
This queue may be used heavily when multiple threads are running media code
that logs thousands of messages per second, so using less strict memory
ordering can help with speed.
Benchmarks show an improvement of up to twice the queueing speed in some
situations.

MozReview-Commit-ID: 70UOL8XAZGp

--HG--
extra : rebase_source : 38de1f6ce8a404e2ccc1591392176151edc8d078
2017-10-11 14:25:21 +11:00
Gerald Squelart
3704f8907e Bug 1407810 - Make DecoderDoctorLogger::sLogState 'ReleaseAcquire' - r=jwwang
sLogState is accessed at least once for every DDLog call, even when logging is
disabled, so we want it to be as quick as possible for minimal impact on most
users.

MozReview-Commit-ID: AMstgXmixrv

--HG--
extra : rebase_source : 475b32f76d9660d03333047eb7e7add62b717a79
2017-10-12 10:45:03 +11:00
Kris Maglione
60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Gerald Squelart
ae565b2faa Bug 1407917 - Simplify DDLogger string-logging functions - r=jwwang
Removed non-eager DDLogValue() functions, too confusing for not much value;
users should use macros first anyway.

Changed `EagerLogValue(..., const char (&aLiteral)[N])` to take `const char*`,
it's cleaner and simpler.


MozReview-Commit-ID: J7xcoPkp6Nf

--HG--
extra : rebase_source : 41040c98b89c3035c823a4a9775e727038c07590
2017-10-12 17:51:41 +11:00
Gerald Squelart
6e866f3624 Bug 1407909 - Rename DDLogClass to DDLogCategory - r=jwwang
MozReview-Commit-ID: GOTQnNM3MrV

--HG--
rename : dom/media/doctor/DDLogClass.cpp => dom/media/doctor/DDLogCategory.cpp
rename : dom/media/doctor/DDLogClass.h => dom/media/doctor/DDLogCategory.h
extra : rebase_source : 6275018142832a46c3ad145dd5f0edbc00501cc2
2017-10-12 16:15:35 +11:00
Sylvestre Ledru
94764c33a9 Bug 1406980 - Fix the -Wunused-lambda-capture warning r=gerald
MozReview-Commit-ID: HtItBaoGenR

--HG--
extra : rebase_source : 3d7c91f2fb4fd067f0ab78e033b5279162658338
2017-10-09 18:36:10 +02:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Gerald Squelart
53d5092208 Bug 1394995 - Initial implementation of DecoderDoctorLogger - r=jwwang
DecoderDoctorLogger and its related classes offer a cheap way to gather log
messages from media stack objects, and then process these messages to extract
object lifetimes and messages related to separate HTMLMediaElement's.

MozReview-Commit-ID: AIf2nAMjoDy

--HG--
extra : rebase_source : cf10185538aded870b9005e88563751f3638ae65
2017-08-28 11:54:12 +12:00
Gerald Squelart
fb0f980782 Bug 1394995 - MultiWriterQueue - r=jwwang
Templated queue allowing safe and fast multi-threaded pushes.
Popping is not thread-safe (but concurrent pushes are still allowed.)

MozReview-Commit-ID: BHQ3nOlHkLX

--HG--
extra : rebase_source : 4a5dd6b603cbfe9bdd86df339469e870761d742a
2017-09-15 15:10:17 +12:00
Gerald Squelart
43a5a26e7b Bug 1394995 - RollingNumber - r=jwwang
Unsigned-number value-class with modified comparison operators that keep
ordering consistent across overflows.
I.e., numbers before the overflow (close to the maximum) will be considered
smaller than numbers after the overflow (close to 0).
(Note that such comparisons break down for numbers separated by more than half
the type range.)

MozReview-Commit-ID: 1hdK2JknlqZ

--HG--
extra : rebase_source : 7be3c1be6bc846e17dd5b396fcf097076b9096c1
2017-09-15 14:31:13 +12:00
Gerald Squelart
00c6bbf432 Bug 1394995 - Moved DecoderDoctor files to dom/media/doctor/ - r=jwwang
MozReview-Commit-ID: 9fEmeizzAAw

--HG--
rename : dom/media/DecoderDoctorDiagnostics.cpp => dom/media/doctor/DecoderDoctorDiagnostics.cpp
rename : dom/media/DecoderDoctorDiagnostics.h => dom/media/doctor/DecoderDoctorDiagnostics.h
extra : rebase_source : 38d149815101f222bd42aec7c2f481768c7ab335
2017-08-28 10:37:44 +12:00