Commit Graph

1861 Commits

Author SHA1 Message Date
Simon Giesecke
1fc7f24745 Bug 1597954 - Add a class template for objects that can only be initialized once. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63181

--HG--
extra : moz-landing-system : lando
2020-03-05 17:26:26 +00:00
Andrew McCreight
4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei
00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight
b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Kris Maglione
64a2c8bb8f Bug 1535617: Part 1 - Add macros to clear weak references on unlink. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D63961

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:27 +00:00
Simon Giesecke
b5fae19786 Bug 1617546 - Provide operator== for mozilla::Nothing. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63842

--HG--
extra : moz-landing-system : lando
2020-02-24 17:53:39 +00:00
Eric Rahm
fd0824a8e6 Bug 1617327 - Part 1: Add getter_Transfers to UniquePtrExtensions. r=KrisWright
This adds a `getter_Transfers` implementation for `UniquePtr` suitable as a drop-in replacement for the `nsAutoPtr` variant.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 23:27:56 +00:00
Cosmin Sabou
7f1afff492 Backed out 5 changesets (bug 1617604, bug 1617542, bug 1617546) for causing build bustages on ipc/mscom/Interceptor.cpp.
CLOSED TREE

Backed out changeset 5faa54ad950e (bug 1617542)
Backed out changeset cb38779e1eb6 (bug 1617604)
Backed out changeset 3aea18e0396f (bug 1617542)
Backed out changeset bc3eeefdfb6c (bug 1617542)
Backed out changeset b76a3aa5ff6f (bug 1617546)
2020-02-24 19:50:13 +02:00
Simon Giesecke
24ebaad98d Bug 1617546 - Provide operator== for mozilla::Nothing. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63842

--HG--
extra : moz-landing-system : lando
2020-02-24 16:15:20 +00:00
Sylvestre Ledru
ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
David Major
fe1a68d948 Bug 1617216 - Stop using IsBadXPtr in TestPoisonArea.cpp r=froydnj
Use of Windows' IsBadReadPtr/IsBadWritePtr has long been discouraged, but more pressingly, TestPoisonArea's hand-written IsBadExecPtr breaks CFG rules under clang-10.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 19:23:02 +00:00
Tom Ritter
c660f80b38 Bug 1610017 - Actually taint data when tainted is specified for IPC methods r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60532

--HG--
extra : moz-landing-system : lando
2020-02-21 17:24:17 +00:00
Boris Zbarsky
acaa2133b1 Bug 1616684. Remove implicit integer conversion in CheckedInt constructor r=froydnj
When I try to enable -Wconversion, CheckedInt triggers it because it has an
implicit type conversion in its templated two-arg constructor.

That constructor doesn't really need to be templated, as far as I can tell.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 14:16:03 +00:00
Jeff Walden
ad64e8c503 Bug 1614243 - Make mfbt/DbgMacro.h use standard variadic macro syntax, not gcc/clang extension syntax. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63283

--HG--
extra : moz-landing-system : lando
2020-02-19 10:44:31 +00:00
Boris Zbarsky
8303e25004 Improve documentation for MOZ_CAN_RUN_SCRIPT_BOUNDARY. No bug. r=mbrodesser,nika
Differential Revision: https://phabricator.services.mozilla.com/D62955

--HG--
extra : moz-landing-system : lando
2020-02-19 02:50:58 +00:00
Simon Giesecke
b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
Simon Giesecke
ad6c02c994 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in mfbt. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62542

--HG--
extra : moz-landing-system : lando
2020-02-13 11:20:27 +00:00
shindli
91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke
f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Mihai Alexandru Michis
395eb2050d Backed out changeset f3d9fbb2daf1 (bug 1613985) for causing hazard bustages on Linux.
CLOSED TREE
2020-02-12 16:43:30 +02:00
Simon Giesecke
066ea869b7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in mfbt. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62542

--HG--
extra : moz-landing-system : lando
2020-02-12 11:13:24 +00:00
Emilio Cobos Álvarez
6311bc2129 Bug 1614512 - Give mozilla::Side and mozilla::Corner a fixed underlying type. r=froydnj
So as to avoid UB. It is somewhat unfortunate/dumb the fact that we need to do
this and we can't detect when we forget to do it :(

Give it uint8_t as it's type as that's enough and consistent with LogicalSide.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 14:11:06 +00:00
David Major
c8447603c3 Bug 1614003 - Remove unused file mfbt/NullPtr.h r=froydnj
C++14 has a replacement anyway.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 19:08:17 +00:00
Emilio Cobos Álvarez
33b4cfe736 Bug 1610702 - Generalize Vector::podResizeToFit into Vector::shrinkStorageToFit(). r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61337

--HG--
extra : moz-landing-system : lando
2020-02-03 17:32:12 +00:00
Sylvestre Ledru
9a548aeff7 Bug 1611520 - gcc-10: Include <cstddef> in FunctionTypeTraits.h r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D61014

--HG--
extra : moz-landing-system : lando
2020-02-01 10:23:38 +00:00
Emily McDonough
238df6f736 Bug 1612536 - Make array iterator getters constexpr r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61366

--HG--
extra : moz-landing-system : lando
2020-01-31 14:07:32 +00:00
Simon Giesecke
c7bd77d920 Bug 1612135 - Allow Result<V, E> to be used with a MOZ_NON_PARAM_TYPE E. r=emilio,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61214

--HG--
extra : moz-landing-system : lando
2020-01-29 21:22:39 +00:00
Ting-Yu Lin
8c351e2376 Bug 1610980 Part 2 - Add MakeInclusiveEnumeratedRange(). r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60753

--HG--
extra : moz-landing-system : lando
2020-01-27 08:01:55 +00:00
Ting-Yu Lin
f5deea0c94 Bug 1610980 Part 1 - Use constexpr for classes and functions in EnumeratedRange.h. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60752

--HG--
extra : moz-landing-system : lando
2020-01-27 08:01:47 +00:00
Tom Ritter
8512ab7c40 Bug 1610039 - Create a Tainted<> class and macros to obtain validated raw values r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60531

--HG--
extra : moz-landing-system : lando
2020-01-23 22:19:32 +00:00
Perry Jiang
c635cee728 Bug 1601024 - ThreadSafeWeakReference::tryDetach must acquire its lock r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60037

--HG--
extra : moz-landing-system : lando
2020-01-21 13:33:04 +00:00
Sylvestre Ledru
187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00
Eric Rahm
1f1fb3adf6 Bug 1610070 - Part 1: Allow comparison of UniquePtr<T> and T*. r=froydnj
This allows us to compare a `UniquePtr` with it's raw pointer type. This allows `nsTArray`'s default comparator to function properly and lets us find/remove items from an nsTArray<UniquePtr<T>> with just a raw pointer.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 20:06:30 +00:00
Emilio Cobos Álvarez
256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Emilio Cobos Álvarez
5cd5e6f148 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:17:06 +00:00
Sylvestre Ledru
cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca
506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Alex Catarineu
bc96439261 Bug 461204 - Improve the random number generator for the boundaries in multipart/form-data r=smaug
Using a weak RNG for the form boundary allows a website operator to perform several
attacks on users (as outlined in https://trac.torproject.org/projects/tor/ticket/22919)

These include:
 - Identifying Windows users based on the unseeded RNG
 - Identify the number of form submissions that have occurred cross-origin between same-origin submissions

Additionally, a predictable boundary makes it possible to forge a boundary in the middle
of a file upload.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 20:41:14 +00:00
Emilio Cobos Álvarez
cde7beaaa4 Bug 1608064 - Replace Is{Rvalue,Lvalue,}Reference with <type_traits> equivalents. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59309

--HG--
extra : moz-landing-system : lando
2020-01-10 10:40:34 +00:00
Sylvestre Ledru
c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
David Parks
198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00
David Major
824b73f655 Bug 1572205 - Use a single-member union as the storage for Maybe r=jwalden
My personal motivation for doing this is to stop the compiler from inserting stack protectors into tons of functions that wouldn't otherwise have them (arrays on the stack are one of the triggers for stack protection). But others see different benefits, such as being able to remove the `MOZ_NON_PARAM` annotation. Also this is the approach recommended by https://github.com/CppCon/CppCon2019/tree/master/Presentations/how_to_hold_a_t.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 23:50:31 +00:00
Emilio Cobos Álvarez
278b36aafb Bug 1607816 - Replace mozilla::{Max, Min}Value with std::numeric_limits. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59153

--HG--
extra : moz-landing-system : lando
2020-01-08 16:30:40 +00:00
Emilio Cobos Álvarez
f210527c4f Bug 1607595 - Manual fixups, and remove mozilla::IsBaseOf. r=froydnj
This is manual, but hopefully trivial.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 14:52:18 +00:00
Emilio Cobos Álvarez
e363a41bd4 Bug 1607595 - Remove uses of mozilla::IsBaseOf. r=froydnj
Automatically generated by:

$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/mozilla::IsBaseOf</std::is_base_of</g'
$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/IsBaseOf</std::is_base_of</g

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

--HG--
extra : moz-landing-system : lando
2020-01-08 14:52:10 +00:00
Brian Hackett
6a51495175 Bug 1606447 - Initial landing for cloud replay, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D58444

--HG--
rename : toolkit/recordreplay/MiddlemanCall.cpp => toolkit/recordreplay/ExternalCall.cpp
rename : toolkit/recordreplay/MiddlemanCall.h => toolkit/recordreplay/ExternalCall.h
rename : toolkit/recordreplay/File.cpp => toolkit/recordreplay/Recording.cpp
rename : toolkit/recordreplay/File.h => toolkit/recordreplay/Recording.h
extra : moz-landing-system : lando
2020-01-03 20:43:08 +00:00
Dorel Luca
212a51bc09 Backed out 5 changesets (bug 1603856, bug 1606447, bug 1605584, bug 1598951) for build bustages. CLOSED TREE
Backed out changeset cf403935cf9b (bug 1598951)
Backed out changeset af6e8b6be574 (bug 1605584)
Backed out changeset fbfa92bd4ec8 (bug 1603856)
Backed out changeset a6d13450295d (bug 1603856)
Backed out changeset e0b049ff115f (bug 1606447)

--HG--
rename : toolkit/recordreplay/Recording.cpp => toolkit/recordreplay/File.cpp
rename : toolkit/recordreplay/Recording.h => toolkit/recordreplay/File.h
rename : toolkit/recordreplay/ExternalCall.cpp => toolkit/recordreplay/MiddlemanCall.cpp
rename : toolkit/recordreplay/ExternalCall.h => toolkit/recordreplay/MiddlemanCall.h
2020-01-03 18:43:40 +02:00
Brian Hackett
47e1b573d0 Bug 1606447 - Initial landing for cloud replay, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D58444

--HG--
rename : toolkit/recordreplay/MiddlemanCall.cpp => toolkit/recordreplay/ExternalCall.cpp
rename : toolkit/recordreplay/MiddlemanCall.h => toolkit/recordreplay/ExternalCall.h
rename : toolkit/recordreplay/File.cpp => toolkit/recordreplay/Recording.cpp
rename : toolkit/recordreplay/File.h => toolkit/recordreplay/Recording.h
extra : moz-landing-system : lando
2020-01-03 15:57:15 +00:00