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

540 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard dfb2061bb1 Bug 1634264 - Reject MozPromise when DomPromiseListener is deleted. r=mattwoodrow
We remove the assertion that the error code was NS_OK, as users of FromDomPromise assert it must be a failure.

Differential Revision: https://phabricator.services.mozilla.com/D75737
2020-05-18 22:16:38 +00:00
Tom Schuster a5a57442ed Bug 1636590 - Expose isPromiseRejection on nsIScriptError. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74549
2020-05-15 20:18:34 +00:00
Tom Schuster 16d853c816 Bug 1636590 - Provide an exception stack for uncaught promises rejections. r=baku
This will improve error message information when the rejection value is not an erorr object.

Differential Revision: https://phabricator.services.mozilla.com/D74479
2020-05-15 20:11:30 +00:00
Philip Chimento 672dc17ff4 Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D73522
2020-05-14 04:44:33 +00:00
Philip Chimento f93330de3e Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-14 04:44:15 +00:00
Narcis Beleuzu a12e8bbd08 Backed out 5 changesets (bug 1505129, bug 1506323, bug 1629293) for bustages on testPrintError.cpp . CLOSED TREE
Backed out changeset ad1ccad76686 (bug 1629293)
Backed out changeset 452e9ab721bd (bug 1629293)
Backed out changeset 72a63e290177 (bug 1629293)
Backed out changeset faeed99f813e (bug 1505129)
Backed out changeset 7bd84a644d2b (bug 1506323)
2020-05-13 21:23:59 +03:00
Philip Chimento d6b8de58f7 Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D73522
2020-05-13 16:10:47 +00:00
Philip Chimento 5606c63575 Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-13 16:10:39 +00:00
Tom Schuster 4f64f475f2 Bug 1595046 - Make it possible to inspect every exception value in the web console. r=jonco,baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D64437
2020-05-08 20:54:17 +00:00
Ryan Hunt 6209b9c4eb Bug 1624524 - Remove uses of wasmTextToBinary in non-JS shell tests. r=bbouvier
There are not many uses of wasmTextToBinary in the non-JS shell tests, and so
the easiest path to resolving the build size regression from using the 'wat'
crate is to just conditionally compile it in the JS shell. This commit takes
the few cases of wasmTextToBinary in non-JS shell tests and precompiles them
to binary.

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

--HG--
extra : moz-landing-system : lando
2020-04-10 21:28:19 +00:00
Tom Schuster 1dca5ada2c Bug 1558786 - Report rejected promises from workers to the right window. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D69256

--HG--
extra : moz-landing-system : lando
2020-04-09 06:50:44 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Eric Rahm 53f27d440b Bug 1626450 - Remove stray references to "nsAutoPtr.h" in dom/. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D69121

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:26 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

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

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull 73a498ec0c Bug 1625138 - Part 38: Replace mozilla::IsSame with std::is_same in dom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68557

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +00:00
André Bargull 42d4ebbda9 Bug 1625138 - Part 27: Replace mozilla::DeclVal with std::declval. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68545

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
André Bargull cae4e1fdbc Bug 1606962: Replace mozilla::EnableIf with std::enable_if. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68401

--HG--
extra : moz-landing-system : lando
2020-03-28 13:35:31 +00:00
André Bargull 08a8c3fc78 Bug 1625138 - Part 24: Replace mozilla::IsConvertible with std::is_convertible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68379

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:17 +00:00
André Bargull d53798e749 Bug 1625138 - Part 23: Replace mozilla::RemovePointer with std::remove_pointer. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68378

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:17 +00:00
André Bargull a08be4177e Bug 1625138 - Part 17: Replace mozilla::Decay with std::decay. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68372

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
Brian Birtles e14c3f5ed1 Bug 1622184 - Add a public method to mark a settled Promise as handled; r=arai
Differential Revision: https://phabricator.services.mozilla.com/D67103

--HG--
extra : moz-landing-system : lando
2020-03-18 02:22:00 +00:00
Simon Giesecke d81853cb9d Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/promise. r=smaug
Depends on D66024

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

--HG--
extra : moz-landing-system : lando
2020-03-09 15:07:21 +00:00
Mark Banner 2c4e35b0a6 Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65509

--HG--
extra : moz-landing-system : lando
2020-03-08 21:45:16 +00:00
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +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
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
Boris Zbarsky 0a38e48eb3 Bug 267645 part 2. Sanitize exceptions from exported functions. r=xeonchen,bholley
Differential Revision: https://phabricator.services.mozilla.com/D35996

--HG--
extra : moz-landing-system : lando
2020-02-22 05:01:59 +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
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
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
Boris Zbarsky 1395be1f23 Bug 1613013 part 3. Annotate TypeErrors and RangeErrors from WebIDL implementations with the method they come from. r=peterv
Please review the changes to Errors.msg very carefully.  I caught a number of
mistakes there in self-review (e.g. not renumbering replacement markers
correctly when I added {0} to the beginnings of strings), and my confidence
that I caught them all is only middling.

A few lines (MSG_USELESS_SETTIMEOUT, MSG_TYPEDARRAY_IS_DETACHED,
MSG_NOT_SUBMIT_BUTTON) were removed from Errors.msg either because they were
already unused or because they either were single-user constant strings or
became such in the new setup and we could just use the string version of
ThrowTypeError.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 21:22:32 +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
Andrea Marchesini c4cb10712a Bug 1609990 - AgentCluster comparison in MessagePort and BroadcastChannel - part 3 - CloneDataPolicy, r=smaug,sfink,lth
Differential Revision: https://phabricator.services.mozilla.com/D60485

--HG--
extra : moz-landing-system : lando
2020-01-24 16:31:21 +00:00
Noemi Erli e4b712dcb8 Backed out 4 changesets (bug 1609990) for causing Spidermonkey rust bustage CLOSED TREE
Backed out changeset 81a77bb3772c (bug 1609990)
Backed out changeset d4524885cb97 (bug 1609990)
Backed out changeset c95aac908332 (bug 1609990)
Backed out changeset bae3e50ab64d (bug 1609990)
2020-01-24 18:13:24 +02:00
Andrea Marchesini ac6024f408 Bug 1609990 - AgentCluster comparison in MessagePort and BroadcastChannel - part 3 - CloneDataPolicy, r=smaug,sfink,lth
Differential Revision: https://phabricator.services.mozilla.com/D60485

--HG--
extra : moz-landing-system : lando
2020-01-24 15:25:24 +00:00
Andrea Marchesini 0077863f8e Bug 1605566 - MessagePort + wasm - part 2 - implement JS::StructuredCloneScope::UnknownDestination, r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D59613

--HG--
extra : moz-landing-system : lando
2020-01-24 07:57:56 +00:00
Narcis Beleuzu cb54b0227b Backed out 5 changesets (bug 1605566) for wpt failures on shared.html . CLOSED TREE
Backed out changeset 622939cef438 (bug 1605566)
Backed out changeset ab98304e6c84 (bug 1605566)
Backed out changeset 7eab8fd2b62e (bug 1605566)
Backed out changeset 99f61f25ed86 (bug 1605566)
Backed out changeset 77bdf4f86052 (bug 1605566)
2020-01-22 12:58:13 +02:00
Andrea Marchesini 14b6fd8572 Bug 1605566 - MessagePort + wasm - part 2 - implement JS::StructuredCloneScope::UnknownDestination, r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D59613

--HG--
extra : moz-landing-system : lando
2020-01-22 09:32:48 +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
Mihai Alexandru Michis 4345a38d0d Backed out 9 changesets (bug 1607791, bug 1605566) for causing multiple wpt failures.
CLOSED TREE

Backed out changeset 39f34852842e (bug 1605566)
Backed out changeset 3427a92445c8 (bug 1605566)
Backed out changeset 36631ec96f1f (bug 1605566)
Backed out changeset 554b2bdce66c (bug 1605566)
Backed out changeset 37026beadbd8 (bug 1605566)
Backed out changeset f15835338319 (bug 1607791)
Backed out changeset 4c92f506cf62 (bug 1607791)
Backed out changeset 80707bcc8427 (bug 1607791)
Backed out changeset 75bc7533c899 (bug 1607791)
2020-01-15 13:45:33 +02:00
Andrea Marchesini c5b0781d9f Bug 1605566 - MessagePort + wasm - part 2 - implement JS::StructuredCloneScope::UnknownDestination, r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D59613

--HG--
extra : moz-landing-system : lando
2020-01-15 10:00:59 +00:00
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
Boris Zbarsky 18bee19d2c Bug 1594304. Add deprecation notes to methods that allow throwing a bare nsresult with no useful message. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53092

--HG--
extra : moz-landing-system : lando
2019-11-14 22:51:21 +00:00
Sylvestre Ledru 022582d728 Bug 1592230 - Remove unused variable 'gIDGenerator' r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D50914

--HG--
extra : moz-landing-system : lando
2019-10-29 12:40:15 +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
Boris Zbarsky e44e36a681 Bug 1581278 part 2. Add convenience methods for rejecting promises with various types of spec exceptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46383

--HG--
extra : moz-landing-system : lando
2019-09-19 13:02:39 +00:00
Jean-Yves Avenard 912b0df630 Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley
Similar to MozPromise::FromGeckoResult.

Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 04:09:46 +00:00
Edgar Chen 5bc0854d2b Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 20:51:25 +00:00