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

488 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Bryce Seager van Dyk 94c26b235a Bug 1646553 - Don't pass the main thread as an argument when creating CDM proxies. r=alwu
CDMProxy stores a reference to the main thread. We'd been passing this in as an
argument. This patch changes the proxy to just fetch the main thread upon
construction. This avoids passing arguments around and also removes the risk of
passing a non-main thread arg.

Depends on D87788

Differential Revision: https://phabricator.services.mozilla.com/D87878
2020-08-24 03:24:54 +00:00
Bryce Seager van Dyk 1a16e898b2 Bug 1646553 - Rework MediaKeys to be fission friendly. r=kmag
This patch reworks how the MediaKeys does 2 things:
1. Listens for documents becoming inactive. Mediakeys will no longer listen
on the top document in the process, and will now instead listen to their own
document.
2. Obtains the top level principal used to create the media keys. Instead of
grabbing the principal from the top document, the MediaKeys will now use their
document's channel's LoadInfo and query the principal from that.

1 will change how the keys behave in iframes -- keys will now shutdown if their
iframe doc becomes inactive, rather than the top in process document. This is
likely to only matter in very niche cases as EME is almost always used in a top
level context.

2 seeks to retain the previous behaviour, but does so in a fission compatible
way.

Differential Revision: https://phabricator.services.mozilla.com/D87788
2020-08-25 18:03:48 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Simon Giesecke e443211b53 Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D83771
2020-07-22 15:12:10 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Peter Van der Beken af82496fc7 Bug 1639310 - Remove unnecessary implicitJSContext annotations. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D76020
2020-05-19 20:48:21 +00:00
Aaron Klotz 0894f56add Bug 1637452: Part 11 - Fix JNI includes in dom/media; r=jya
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75374
2020-05-15 17:05:12 +00:00
Jeff Walden b38fe47182 Bug 1636252 - Handle JSAPI-created errors better a few places in EME code. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D74303
2020-05-12 07:58:10 +00:00
Jeff Walden 9542e5adb2 Bug 1633598 - Add a user of |JS::CopyArrayBuffer|. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D73745
2020-05-07 23:47:21 +00:00
Razvan Maries 76e77d8f44 Backed out 3 changesets (bug 1633598) for build bustages. CLOSED TREE
Backed out changeset a2abc7629ec4 (bug 1633598)
Backed out changeset 78ae14106ac7 (bug 1633598)
Backed out changeset 414d909e053a (bug 1633598)
2020-05-08 00:17:47 +03:00
Jeff Walden a12dd50291 Bug 1633598 - Add a user of |JS::CopyArrayBuffer|. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D73745
2020-05-07 20:53:13 +00:00
Razvan Maries da863180d7 Backed out 3 changesets (bug 1633598) for build bustages at ArrayBufferObject.cpp. CLOSED TREE
Backed out changeset db1e6c4924ef (bug 1633598)
Backed out changeset c5804fffaf32 (bug 1633598)
Backed out changeset f2dc493d99fb (bug 1633598)
2020-05-07 23:41:05 +03:00
Jeff Walden 1273f937bf Bug 1633598 - Add a user of |JS::CopyArrayBuffer|. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D73745
2020-05-07 20:20:33 +00:00
Andreea Pavel b8809d1e54 Backed out 3 changesets (bug 1633598) for build bustages at ArrayBufferObject.cpp on a CLOSED TREE
Backed out changeset 77e7a549cf97 (bug 1633598)
Backed out changeset a662b2c07b3a (bug 1633598)
Backed out changeset 7fe73b300a5e (bug 1633598)
2020-05-07 22:53:26 +03:00
Jeff Walden bd9a186fa5 Bug 1633598 - Add a user of |JS::CopyArrayBuffer|. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D73745
2020-05-07 19:29:37 +00:00
Simon Giesecke f7f5462a4b Bug 1626570 - Improve handling of copying arrays in dom/media/. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D73627
2020-05-05 11:38:10 +00:00
Bryce Seager van Dyk 797d383722 Bug 1632717 - r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D72476
2020-04-29 20:11:25 +00:00
Simon Giesecke c0341c3791 Bug 1628715 - Part 10: Activate nodiscard attributes on AppendElement(s). r=xpcom-reviewers,nika,peterv
Differential Revision: https://phabricator.services.mozilla.com/D70834
2020-04-24 14:34:15 +00:00
Michael Kaply dece0b0c31 Bug 1628871 - Don't show DRM install message if eme pref is locked. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D70763

--HG--
extra : moz-landing-system : lando
2020-04-13 23:28:08 +00:00
Boris Zbarsky b3ccd8dfb9 Bug 1619112 part 4. Remove some unnecessary string conversions in EME code. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D65540

--HG--
extra : moz-landing-system : lando
2020-03-06 21:06:01 +00:00
Boris Zbarsky f31fe5e910 Bug 1619112 part 3. Pass UTF8 strings to MaybeRejectWithType/RangeError promise methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65539

--HG--
extra : moz-landing-system : lando
2020-03-06 21:05:48 +00:00
Simon Giesecke 88ead5d627 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/media. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D65178

--HG--
extra : moz-landing-system : lando
2020-03-04 15:39:20 +00:00
Kris Maglione c31aa68fb4 Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Bryce Seager van Dyk dcf1e97e66 Bug 1587522 - Use default initializer for MediaKeySystemAccessManager::mAddedObservers. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D62626

--HG--
extra : moz-landing-system : lando
2020-02-21 21:25:44 +00:00
Bryce Seager van Dyk 23793975b7 Bug 1587522 - Surface events from MediaKeySystemAccessManager to let the app wrapping gecko allow or deny EME. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D56104

--HG--
extra : moz-landing-system : lando
2020-02-21 21:51:38 +00:00
Bryce Seager van Dyk 19dbb2e44c Bug 1587522 - Add MediaKeySystemAccessPermissionRequest. r=alwu
This class will be used to surface permission requests to GeckoView.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 21:21:09 +00:00
Boris Zbarsky 9789fc91bb Bug 1615035. Use ErrorResults, not nsresults, to propagate errors in CDM code. r=bryce
Please review this very carefully!  This exposes a bunch of error messages that
used to only be visible on DetailedPromise to web content.  Are there any
privacy/security issues with exposing those?  If needed, we could use more
generic messages instead, but exposing this information if we can seemed like
the right way to go.

I did look over the error messages coming from GeckoMediaDrmBridgeV21.java and
none of them look like they expose any interesting state.  The messages from
ChromiumCDMProxy expose mKeySystem, but that came from the web page to start
with, I think.

Also, are these messages even meaningful for web content?  Some of the error
messages (like the one from MediaDrmCDMProxy::md_SetServerCertificate) seem
like they include internal function names, so are not great for web content...
I'm not quite sure what the best thing to do there is.

Note: There is a behavior change to ChromiumCDMParent::GetStatusForPolicy because
NS_ERROR_INVALID_ARG is not a valid thing to throw to web content.  I've used
TypeError, since that's what normally gets used for invalid args.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 01:15:33 +00:00
Boris Zbarsky 6c66fa85a4 Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 15:42:30 +00:00
Boris Zbarsky 9b0b56bfc7 Bug 1612213 part 3. Switch Promise::RejectWithDOMException consumers to new convenience methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61269

--HG--
extra : moz-landing-system : lando
2020-02-03 20:37:32 +00:00
Boris Zbarsky c9e8a8042b Bug 1611509 part 3. Remove the Date type from Web IDL. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D61054

--HG--
extra : moz-landing-system : lando
2020-01-27 08:50:35 +00:00
Edgar Chen 9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
thomasmo f362f78bca Bug 1608286 - Crash in [@ mozilla::dom::MediaKeySystemAccessManager::CheckDoesWindowSupportProtectedMedia] r=bryce,bzbarsky
This changes fixes a failfast in a call to Navigator.requestMediaKeySystemAccess for the case where there is no browser available from a window when e10s is on. This can happen when a document is disconnected from the DOM.
The fix is to reject the promise in this case.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 20:10:27 +00:00
Aaron Klotz 2be22d0fb2 Bug 1610678: Follow-up: Fix build error in MediaDrmCDMProxy.cpp; r=bustage CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com//D60727

--HG--
extra : histedit_source : 28020c6bbbda62547ae2c4030c044c7217d0602d
2020-01-22 21:15:33 +02:00
Bogdan Tara 20866512a1 Backed out changeset b71a801eabd4 (bug 1608286) on tmo's request CLOSED TREE 2020-01-22 20:40:30 +02:00
thomasmo fa7b42ae1e Bug 1608286 - Crash in [@ mozilla::dom::MediaKeySystemAccessManager::CheckDoesWindowSupportProtectedMedia] r=bryce,bzbarsky
This changes fixes a failfast in a call to Navigator.requestMediaKeySystemAccess for the case where there is no browser available from a window when e10s is on. This can happen when a document is disconnected from the DOM.
The fix is to reject the promise in this case.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 16:47:26 +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
Boris Zbarsky fb61b9fd86 Bug 1609861 part 5. Stop using NS_ERROR_DOM_TYPE_ERR in IsTypeSupported. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D60223

--HG--
extra : moz-landing-system : lando
2020-01-17 16:19:12 +00:00