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

68 Коммитов

Автор SHA1 Сообщение Дата
Steve Fink 517605b022 Bug 1246804 - Switch to using in-source annotations. Use C++ inheritance information when describing GC types. Add a test suite., r=terrence
MozReview-Commit-ID: HCcG2k8Wyb9

--HG--
extra : rebase_source : 732ef6ecc52f0e528d38b8c42e442919eba9b5ae
extra : source : 901b1c651c982ccbf42604231c723d168e1cde69
2015-09-29 13:39:33 -07:00
Steve Fink 57bca06b15 Backed out changeset 901b1c651c98 (bug 1246804)
--HG--
extra : rebase_source : d80a34f467275bf74672b87fd09a254b39ee20a1
2016-03-14 21:58:31 -07:00
Steve Fink 2dada4b1a0 Bug 1246804 - Switch to using in-source annotations. Use C++ inheritance information when describing GC types. Add a test suite., r=terrence
MozReview-Commit-ID: HCcG2k8Wyb9

--HG--
extra : rebase_source : 4b048fdcb150662c82e1b623e455551cc7281251
2015-09-29 13:39:33 -07:00
Kyle Huey 9eea75a6f5 Bug 1252268: If the slow script dialog aborts an interval timer callback, don't schedule it again. r=bz 2016-03-10 01:50:56 -08:00
Boris Zbarsky 38ed0f626b Bug 1249652 part 1. Add a method on ErrorResult to steal an exception, if any, from a JSContext. r=khuey 2016-02-24 10:38:31 -05:00
Boris Zbarsky 73208ce2f3 Bug 1228707. Add a away to call Web IDL callbacks while ignoring any errors from them, and use it in a few places. r=smaug 2015-11-30 22:04:09 -05:00
Boris Zbarsky 71b052b436 Bug 1224007 part 6. Change MaybeSetPendingException to set the ErrorResult state to "not failed", just like SuppressException and StealNSResult already do, and assert in the destructor that the ErrorResult is not Failed().
This is not quite as strong as being able to assert that all codepaths that might
lead to failure call one of the above methods, but being able to assert that
would involve a lot of extra noise at callsites.  Or at least changing the
signature of StealNSResult to use an outparam and return a boolean indicating
whether the ErrorResult was failure or not, or something, so StealNSResult
can be usefully called on successful ErrorResults too.
2015-11-20 16:29:41 -05:00
Boris Zbarsky c3bc1cdc40 Bug 1224007 part 5. Get rid of ErrorResult::StealJSException. r=peterv 2015-11-20 16:29:41 -05:00
Boris Zbarsky fb747879e0 Bug 1224007 part 3. Push down WouldReportJSException into MaybeSetPendingException, since anyone calling the latter will propagate the JS exception as needed. r=peterv 2015-11-20 16:29:41 -05:00
Boris Zbarsky 8ab5390043 Bug 1224007 part 2. Make the various ErrorResult::Report* methods private, so consumers all go through MaybeSetPendingException and rename them to more clearly indicate what they're actually doing. r=peterv 2015-11-20 16:29:41 -05:00
Boris Zbarsky c19412a7ac Bug 1224007 part 1. Rename ThrowMethodFailed to MaybeSetPendingException and make it an ErrorResult instance method. r=peterv 2015-11-20 16:29:40 -05:00
Boris Zbarsky df75080cc3 Bug 1226479. Change ErrorResult::ThrowTypeError/ThrowRangeError to take string references, not pointers. r=mccr8 2015-11-20 13:36:46 -05:00
Ben Kelly 7f326cef7c Bug 1225219 Implement ErrorResult::CloneTo(). r=bz 2015-11-18 11:07:58 -08:00
Wes Kocher f1dac52970 Backed out changeset cc92635ec29a (bug 1225219) for build bustage CLOSED TREE
--HG--
extra : commitid : 1lUK2KD78dX
2015-11-18 09:52:19 -08:00
Ben Kelly 442a013f24 Bug 1225219 Implement ErrorResult::CloneTo(). r=bz 2015-11-18 08:50:28 -08:00
Boris Zbarsky 2c6c586ca9 Bug 1219749. Add a way to faithfully propagate the "exception is already on JSContext" state through an ErrorResult. r=peterv 2015-11-09 20:47:05 -05:00
Boris Zbarsky c3d471f9c4 Bug 1213289 part 4. Convert to using an enum for tracking our union state. r=bkelly 2015-10-09 16:48:10 -04:00
Boris Zbarsky af065c06f0 Bug 1213289 part 3. Add a way to throw a DOMException with a custom message on ErrorResult. r=bkelly 2015-10-09 16:48:10 -04:00
Boris Zbarsky 9c2bcd09d7 Bug 1213289 part 2. Introduce ErrorResult::ClearUnionData and use it in various places where we're trying to do that. r=bkelly 2015-10-09 16:48:10 -04:00
Andrew McCreight 5171450b27 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-05 09:38:14 -07:00
Wes Kocher f0d829220d Backed out changeset 821791826960 (bug 1197893) for Nexus build failures CLOSED TREE 2015-10-02 16:17:05 -07:00
Andrew McCreight 35cd15b8de Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 15:09:02 -07:00
Andrew McCreight 7a2c6267d4 Backed out changeset 6fa9cdf4002b for breaking the build. 2015-10-02 10:49:28 -07:00
Andrew McCreight 404740a102 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 10:42:08 -07:00
Andrew McCreight bd7c5585b3 Bug 1195977, part 7 - Use variadic templates instead of var args for ThrowTypeError() and ThrowRangeError(). r=peterv
This enables type checking of these arguments.
2015-09-15 11:47:04 -07:00
Andrew McCreight 4d25fb9ee0 Bug 1195977, part 6 - Inline ErrorResult throw error methods into the header. r=peterv
This is needed to turn these into templates later.
2015-09-15 11:47:04 -07:00
Andrew McCreight 46a8a4fbb4 Bug 1195977, part 5 - Hoist out inner part of ErrorResult::ThrowErrorWithMessage() into a helper. r=peterv
This will enable us to move it to the header later, which is needed to
turn it into a template.
2015-09-15 11:47:04 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Boris Zbarsky afdc22e267 Bug 1180770 part 1. Remove the unused ThrowNotEnoughArgsError. r=peterv 2015-07-09 22:51:28 -04:00
Boris Zbarsky fefbd0cfd7 Bug 1174954 part 3. Remove ReportJSExceptionFromJSImplementation, since it no longer does anything interesting. r=bholley 2015-06-16 16:44:11 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky d36060dc11 Bug 1157898 part 5. Eliminate the remaining non-ErrorResult consumers of ErrorResult::ErrorCode and make it protected. r=peterv 2015-04-27 09:18:52 -04:00
Boris Zbarsky 1e816696de Bug 1157898 part 4. Add ErrorResult::ErrorCodeIs() and use it in various places to get rid of ErrorCode(). r=peterv 2015-04-27 09:18:52 -04:00
Boris Zbarsky a8f7f27004 Bug 1157754 part 3. Make ClearMessage private on ErrorResult. r=peterv 2015-04-26 22:38:17 -04:00
Boris Zbarsky e11db3193b Bug 1157754 part 1. Add a way to "catch" an ErrorResult, and a way to safely convert an ErrorResult to an nsresult. r=peterv 2015-04-26 22:38:17 -04:00
Ben Kelly beaa6a2ab8 Bug 1110485 P0 Add an ErrorResult constructor that takes nsresult. r=bz 2015-04-16 12:00:15 -07:00
Ehsan Akhgari 087743bda2 Bug 1154831 - Remove the gcc-4.6-warning-silencing code in ErrorResult::ErrorResult; r=bzbarsky 2015-04-16 07:29:31 -04:00
Ehsan Akhgari 5d5a053562 Bug 1149987 - Part 4: Do not attempt to delete ErrorResult::mMessage when deserializing the object from IPDL; r=bzbarsky
In opt builds, we do not initialize mMessage, so the null check is going
to be ineffective to test whether mMessage has a value that we should
delete.  But in IPDL, the ParamTraits Read method is only called with
freshly allocated objects, so we don't need to free anything here.
In order to be safe and ensure that we don't leak this memory, this
patch adds a number of assertions to check whether mMessage is
indeed only initialized where we expect it to.
2015-04-15 15:55:01 -04:00
Ehsan Akhgari af406fe8b6 Bug 1149987 - Part 3: Give ErrorResult a move constructor and a move assignment operator; r=bzbarsky 2015-04-08 22:44:50 -04:00
Ehsan Akhgari b7c3a57056 Bug 1149987 - Part 2: Make ErrorResult unassignable; r=bzbarsky
This object is not copyable, so it should probably not be
assignable either, especially since the compiler generated
copy constructor can potentially cause UAF issues on the
mMessage member, for example.
2015-04-08 22:44:47 -04:00
Ehsan Akhgari f061a90e54 Bug 1149987 - Part 1: Make it possible to send an ErrorResult that doesn't encode a JS exception through the IPDL layer; r=bzbarsky 2015-04-08 22:44:44 -04:00
Ryan VanderMeulen d8ade60200 Backed out 5 changesets (bug 1149987) for mochitest crashes.
Backed out changeset b62e371d6189 (bug 1149987)
Backed out changeset daa762fca8e6 (bug 1149987)
Backed out changeset bdb64d5befa5 (bug 1149987)
Backed out changeset 693901a4bcde (bug 1149987)
Backed out changeset e7c41c8653c4 (bug 1149987)

CLOSED TREE
2015-04-08 11:49:49 -04:00
Ehsan Akhgari 61000b2825 Bug 1149987 - Part 3: Give ErrorResult a move constructor and a move assignment operator; r=bzbarsky 2015-04-08 10:27:37 -04:00
Ehsan Akhgari 1171444160 Bug 1149987 - Part 2: Make ErrorResult unassignable; r=bzbarsky
This object is not copyable, so it should probably not be
assignable either, especially since the compiler generated
copy constructor can potentially cause UAF issues on the
mMessage member, for example.
2015-04-08 10:27:36 -04:00
Ehsan Akhgari 451e8342c1 Bug 1149987 - Part 1: Make it possible to send an ErrorResult that doesn't encode a JS exception through the IPDL layer; r=bzbarsky 2015-04-08 10:27:35 -04:00
Boris Zbarsky e0532c037e Bug 1122238 part 3. Drop all the DOMException-cloning and sanitization gunk we added in bug 1107592 and bug 1107953 and bug 1117242 . r=bholley 2015-03-06 01:08:06 -05:00
Boris Zbarsky 9e8395b4c9 Bug 742194 part 1. Add support for throwing uncatchable exceptions to Web IDL bindings. People keep asking for this. r=khuey 2015-02-20 23:58:36 -05:00
Dhi Aurrahman 5b8f79fc23 Bug 1125766 - Throw proper error types for TextEncoder(), TextDecoder() and TextDecoder.decode(). r=bz 2015-02-04 18:46:26 +07:00
Boris Zbarsky 6a93d5c443 Bug 1107953 part 5. Add tests for promise rejections with content-side DOMExceptions, and fix the promise code so those tests actually pass. r=bholley 2015-01-15 17:39:02 -05:00
Ehsan Akhgari 4354953b4f Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00