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

595 Коммитов

Автор SHA1 Сообщение Дата
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +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 1cd5c68592 Bug 1652002 - Remove some unnecessary includes from BindingUtils.h. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83098
2020-07-15 15:34:49 +00:00
Nika Layzell a3579f6f46 Bug 1458043 - Stop converting promises to nsISupports in xpconnect, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82616
2020-07-07 22:20:01 +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 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
Daniel Varga bc19cdb06d Backed out 3 changesets (bug 1578355) for build bustage at build/src/dom/base/nsSyncLoadService.h:48:21. On a CLOSED TREE
Backed out changeset d50ad759f129 (bug 1578355)
Backed out changeset 339ab54ca471 (bug 1578355)
Backed out changeset 284299dac42c (bug 1578355)
2019-09-20 14:05:12 +03:00
Edgar Chen 5b6fe53148 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 10:31:55 +00:00
Bogdan Tara bee28f01d7 Backed out 8 changesets (bug 1575744) for HttpChannelParent related assertion failures
Backed out changeset af61675dd488 (bug 1575744)
Backed out changeset bf794b9373c8 (bug 1575744)
Backed out changeset 39ffb74d2e12 (bug 1575744)
Backed out changeset c1547b3df672 (bug 1575744)
Backed out changeset 382ee8672027 (bug 1575744)
Backed out changeset 5abb38484f11 (bug 1575744)
Backed out changeset d5244c1bbfe8 (bug 1575744)
Backed out changeset c74b81debf73 (bug 1575744)

--HG--
rename : netwerk/base/nsIProcessSwitchRequestor.idl => netwerk/base/nsICrossProcessSwitchChannel.idl
2019-09-20 06:58:44 +03:00
Jean-Yves Avenard bafae6af97 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 02:21:12 +00:00
Brian Hackett 0a791285af Bug 1575306 - Suppress reporting of uncaught testing sentinel, r=bzbarsky.
Differential Revision: https://phabricator.services.mozilla.com/D45964

--HG--
extra : moz-landing-system : lando
2019-09-16 20:17:17 +00:00
Brindusan Cristian 073cc24f53 Backed out changeset 8f30450e231c (bug 1575306) for ESlint failure at PromiseTestUtils.jsm:99:31. CLOSED TREE 2019-09-16 22:30:52 +03:00
Brian Hackett 7a20c67cf9 Bug 1575306 - Suppress reporting of uncaught testing sentinel, r=bzbarsky.
Differential Revision: https://phabricator.services.mozilla.com/D45964

--HG--
extra : moz-landing-system : lando
2019-09-16 19:04:20 +00:00
Kris Maglione e1a1356818 Bug 1580220: Fix unhandled rejection logging for cross-origin objects. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45362

--HG--
extra : moz-landing-system : lando
2019-09-11 14:10:06 +00:00
Olli Pettay c7ee50989c Bug 1565930, try to make Promise less error prone to compartment mismatches, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38762

--HG--
extra : moz-landing-system : lando
2019-07-29 14:43:54 +00:00
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Alec Gibson 6a56241703 Bug 1532935 - Enable ESLint for dom/promise (manual changes). r=mccr8
Patch by Alec, updated by Standard8.

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

--HG--
extra : moz-landing-system : lando
2019-06-25 20:12:47 +00:00
Alec Gibson 6614404241 Bug 1532935 - Enable ESLint for dom/promise (automatic changes). r=mccr8
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-06-25 20:11:52 +00:00
Brian Hackett 82d933962b Bug 1533308 - Report rejected non-exception objects to the console, r=kmag,arai.
--HG--
extra : rebase_source : a226e104ffac8b7db1c5cde797cb0fbe438c1c65
2019-06-11 11:53:27 -10:00
Boris Zbarsky 6430c24e0a Bug 1548625 part 2. Get rid of some ExposeObjectToActiveJS calls in DOM code. r=mccr8,jonco
The call in VRFrameData::LazyCreateMatrix is not needed because
aRetval.set(aArray) ends up calling into Heap::get() which does a read barrier
and exposes.

The call in nsXULPrototypeScript::Compile is not needed because initializing
the AutoJSAPI will guarantee that the global of the Realm it enters, which is
what we're examining here, will be exposed.

The call in Promise's CreateNativeHandlerFunction is not needed because the
object being passed in was always just-created into a stack Rooted.

The call in MIDIMessageEvent::GetData is not needed because it's always working
with a just-created object.  Also, mData is a Heap, so there will be a read
barrier anyway before anyone gets at the value.

The call in PrototypeDocumentContentSink::ExecuteScript is not needed because
the AutoEntryScript will guarantee that the global of the Realm it enters is
exposed.  And the JSAutoRealm is not needed either, because we're in that Realm
already.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 10:09:11 +00:00
Boris Zbarsky 356eb6dfd9 Bug 1547923 part 5. Start using nsIGlobalObject::GetGlobalJSObjectPreserveColor where possible. r=mccr8,jonco
Differential Revision: https://phabricator.services.mozilla.com/D29706

--HG--
extra : moz-landing-system : lando
2019-05-03 15:15:31 +00:00
Boris Zbarsky 1f3596354d Bug 1547923 part 2. Remove Promise::GlobalJSObject. r=mccr8
Promise::Compartment is unused.

The callers that want to call AutoJSAPI::Init can pass it an nsIGlobalObject,
which is actually _more_ efficient, since passing a JSObject just gets an
nsIGlobalObject from it and passes that.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 18:38:04 +00:00
Brian Grinstead 0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Brian Grinstead 6515f97bcb Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 20:56:58 +00:00
Boris Zbarsky d0bcf72821 Bug 1543564 part 2. Get rid of pointless nsPIDOMWindowInner::AsInner methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27027

--HG--
extra : moz-landing-system : lando
2019-04-11 14:12:43 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Yoshi Cheng-Hao Huang 7f012345b7 Bug 1521732 - Part 5: RootedObjectVector. r=sfink,jonco
s/AutoObjectVector/RootedObjectVector/g

Depends on D23185

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

--HG--
extra : moz-landing-system : lando
2019-03-26 14:00:51 +00:00
Zibi Braniecki 4450c1692a Bug 1483036 - Add MaybeResolveWithClone and MaybeRejectWithClone to Promise. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D24385

--HG--
extra : moz-landing-system : lando
2019-03-26 19:34:29 +00:00
Boris Zbarsky 295d09cba1 Bug 1535384 part 7. Get rid of MOZ_CAN_RUN_SCRIPT_BOUNDARY for filesystem callbacks. r=mccr8
I'm a bit torn between the const-member-and-MOZ_KnownLive approach
here and just taking extra stack refs...

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

--HG--
extra : moz-landing-system : lando
2019-03-19 15:53:43 +00:00
Sebastian Hengst cee711baf9 Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi
Differential Revision: https://phabricator.services.mozilla.com/D23546

--HG--
extra : moz-landing-system : lando
2019-03-17 23:13:22 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Kris Maglione 1a8317619b Bug 1518863: Part 2 - Delay extension protocol requests until extension is ready. r=aswan
We don't want extension protocol load requests to begin loading until the
extension is far enough initialized to run code. If we load it before then,
the extension framework will either fail to recognize the extension entirely,
or may begin running its scripts in an incomplete environment.

This patch adds a slow path which adds a promise handler and creats a stub
channel only in the case when the extension is not ready. In the normal,
already-initialized case, we take the more direct path.

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

--HG--
extra : rebase_source : ca770d241ff68192716feace67cd512565ae6b24
2019-02-27 11:54:31 -08:00
Boris Zbarsky 12266da44b Bug 1521907 part 4. Start using CheckedUnwrapStatic/Dynamic in non-binding DOM code. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D17884

--HG--
extra : moz-landing-system : lando
2019-02-02 03:24:22 +00:00
Gurzau Raul 44e4d42e8a Backed out 7 changesets (bug 1521907) for failing at unit/test_bug1151385.js on a CLOSED TREE.
Backed out changeset ef04359ccf0d (bug 1521907)
Backed out changeset ac1c61bf61e9 (bug 1521907)
Backed out changeset df09b7be63c5 (bug 1521907)
Backed out changeset 585fa0024d46 (bug 1521907)
Backed out changeset e593c29aaff4 (bug 1521907)
Backed out changeset ac2e180a35b6 (bug 1521907)
Backed out changeset 270b1db9ea81 (bug 1521907)
2019-02-02 00:58:16 +02:00
Boris Zbarsky 76e1fab0c7 Bug 1521907 part 4. Start using CheckedUnwrapStatic/Dynamic in non-binding DOM code. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D17884

--HG--
extra : moz-landing-system : lando
2019-02-01 18:48:36 +00:00
Ciure Andrei 63b0f3f854 Backed out 7 changesets (bug 1521907) for JSObject Wrapper.cpp bustages and failures CLOSED TREE
Backed out changeset ce3108090e77 (bug 1521907)
Backed out changeset efd05f4979f1 (bug 1521907)
Backed out changeset 2d0895148907 (bug 1521907)
Backed out changeset 192152fe986a (bug 1521907)
Backed out changeset ca65b46b0d37 (bug 1521907)
Backed out changeset b3daf5ca3d11 (bug 1521907)
Backed out changeset 1b0a09a46c70 (bug 1521907)
2019-02-01 19:38:25 +02:00
Boris Zbarsky b014cb9758 Bug 1521907 part 4. Start using CheckedUnwrapStatic/Dynamic in non-binding DOM code. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D17884

--HG--
extra : moz-landing-system : lando
2019-01-31 15:51:52 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Jan de Mooij 9190590e09 Bug 1515590 part 3 - Fix some debugger tests by forcing separate compartments for the debugger and debuggee. r=ochameau
With same-compartment chrome globals these would end up in the same compartment.
We need to prevent that because the debugger doesn't support it.

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

--HG--
extra : moz-landing-system : lando
2018-12-22 21:39:56 +00:00
Mark Banner 8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Ciure Andrei ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner 8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari 2febd96e7e Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 00:54:56 +00:00
Cosmin Sabou 0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Ehsan Akhgari 7c937c2747 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 21:36:18 +00:00
Andreea Pavel 945463d394 Backed out changeset 11d6688b953f (bug 1508472) for build bustages on a CLOSED TREE 2018-11-27 18:28:30 +02:00
Ehsan Akhgari d0a3a76106 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 15:18:32 +00:00
Ehsan Akhgari 19e88f0bf4 Bug 1491403 - Part 3: Propagate the user input event handling state to the promise resolve handlers in case the promise creator requests it r=smaug,arai,baku
Depends on D7004

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

--HG--
extra : moz-landing-system : lando
2018-10-09 21:42:22 +00:00
Kris Maglione 670d3e0fff Bug 1486130: Follow-up: Ignore extra console message on OS-X. r=bustage,test-only 2018-08-28 11:21:57 -07:00
Kris Maglione 8c0ed09430 Bug 1486512: Fix compiling Promise-inl.h on MSVC. r=froydnj
For reasions which are unclear, MSVC does not recognize the declaration and
definition of ThenWithCycleCollectedArts as matching in their previous form.
Changing both to use the same template `using` declaration for the entire
return type fixes this.

MSVC also has problems with the previous use of std::forward, which is fixed
by explicitly coercing smart pointers to their equivalent pointer types, and
moving any other type.

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

--HG--
extra : rebase_source : 483fc7c33a0b10227b11862d176299813466ac95
2018-08-27 13:10:23 -07:00