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

477 Коммитов

Автор SHA1 Сообщение Дата
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
Aaron Klotz c4f1b7b2d0 Bug 1608577: Part 1 - Remove |using namespace mozilla::java| from dom/media; r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D59796

--HG--
extra : moz-landing-system : lando
2020-01-13 22:04:02 +00:00
John Lin 94e7802888 Bug 1605833 - Add FLAC and Opus support back to Widevine on Windows. r=bryce
Bug 1510424/D13135 remove them from Windows along with Android by mistake.
This patch also moves some code to separate Android only logic from other
platforms to avoid making similar mistakes.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 00:46:47 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Andrew Creskey 603b880e70 Bug 1592797 - Fix MediaKeys linker error exposed with different optimization flags r=edgar
Seeing this linker error when building with optimization flags -O2 and others:
.../mozilla-central/dom/media/eme/mediadrm/MediaDrmCDMProxy.cpp:297: error: undefined reference to 'void mozilla::dom::MediaKeys::ResolvePromiseWithResult<bool>(unsigned int, bool const&)'

This patch moves the template definition from dom/media/eme/MediaKeys.cpp to dom/media/eme/MediaKeys.h

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

--HG--
extra : moz-landing-system : lando
2019-11-14 14:06:12 +00:00
thomasmo bf1c6a04c7 Bug 1594794 - NULL Crash in MediaKeySystemAccessManager::CheckDoesWindowSupportProtectedMedia r=bryce,bzbarsky
This change fixes a crash when there is no BrowserChild available (i.e., e10s is is turned off in Windows). In this case, the window is assumed to support protected media and will proceed without making the IPC call to check.

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

--HG--
extra : moz-landing-system : lando
2019-11-08 11:43:51 +00:00
Jeff Walden 3e64c882fe Bug 1591655 - Remove the unnecessary |proto| argument from |JS::NewPromiseObject| and its callers, seeing as all callers pass |nullptr| (and therefore uniformly request the default prototype). r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50695

--HG--
extra : moz-landing-system : lando
2019-10-26 08:14:05 +00:00
Bryce Seager van Dyk fae568199d Bug 1587573 - Clarify threading model used by MediaKeySystemAccessManager. r=dminor
The MediaKeySystemAccessManager should be used entirely on the main thread
because it's interacting with JS. Making this explicit via comments in the
header and MOZ_ASSERTs helps document the threading model of the class.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 21:55:54 +00:00
Bryce Seager van Dyk 4711c2cb28 Bug 1587573 - Make MediaKeySystemAccessManager includes + include guard match google style. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D49317

--HG--
extra : moz-landing-system : lando
2019-10-24 21:55:47 +00:00
Bryce Seager van Dyk 88a8c154e8 Bug 1587573 - Define a log to cut down on boilerplate in the MediaKeySystemAccessManager. r=dminor
Define a new macro to cut down on the boilerplate for logging. We don't use the
new macro inside lambda because __func__ doesn't expand nicely -- so we keep
using the old logging. I considered using __PRETTY_FUNCTION__ or __FUNCSIG__
depending on the platform, but found the logs too verbose to be desirable.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 21:55:35 +00:00