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

414 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight 17fe28d40c Bug 1195977, part 8 - Check that ThrowInvalidThis is passing in enough arguments. r=peterv
We have to permit passing in too many arguments because sometimes the
error is MSG_METHOD_THIS_UNWRAPPING_DENIED which only takes one
argument.
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
Andrew McCreight 77be143629 Bug 1195977, part 4 - Enforce number of arguments more consistently. r=peterv
The new check in ErrorResult::ReportErrorWithMessage() shouldn't be
needed and is just to protect against the possibility of another way
to construct messages being added.
2015-09-15 11:47:04 -07:00
Andrew McCreight 786ccb5a0e Bug 1195977, part 3 - Add helper for getting the number of error arguments. r=peterv 2015-09-15 11:47:04 -07:00
Andrew McCreight 53e9657f0d Bug 1195977, part 2 - Statically assert that DOM error messages don't have more arguments than the JS engine supports. r=peterv.
This makes it so that we do not need to dynamically enforce this
constraint in ErrorResult::ThrowErrorWithMessage().
2015-09-15 11:47:04 -07:00
Cameron McCormack 57f66406e3 Bug 968923 - part 4 - hook up use counters to WebIDL bindings; r=bz 2015-02-05 12:53:01 -05:00
Boris Zbarsky 57621e1167 Bug 1135961. Implement subclassing of DOM objects. r=peterv 2015-07-31 13:30:55 -04:00
Kan-Ru Chen 5c2f3fc74e Bug 1179718 - Rename CheckPermissions to CheckAnyPermissions. r=bz 2015-07-17 11:07:53 +08:00
Kan-Ru Chen a5886f19c7 Bug 1179718 - Add a CheckAllPermissions extended attribute to WebIDL. r=bz 2015-07-17 11:06:23 +08: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 8d3a6f26dd Bug 1180851. Don't make ThrowMethodFailed an inline function, because there's no really good reason to and we might as well save the codesize. r=peterv 2015-07-09 22:51:28 -04:00
Boris Zbarsky d39d28be5c Bug 1180770 part 2. Remove the unused ifaceName/memberName arguments of ThrowMethodFailedWithDetails and rename it to ThrowMethodFailed. r=peterv 2015-07-09 22:51:28 -04:00
Boris Zbarsky afdc22e267 Bug 1180770 part 1. Remove the unused ThrowNotEnoughArgsError. r=peterv 2015-07-09 22:51:28 -04:00
Terrence Cole 620b712967 Bug 1178581 - Interning does not and should not imply infinite lifetime; r=sfink
--HG--
extra : rebase_source : f6fb6b881bffe5af0dfde6a45e9e0c29932c8885
2015-06-30 07:58:31 -07:00
Kyle Machulis c035543458 Bug 1123516 - Implement maplike/setlike in WebIDL Codegen; r=bz 2015-06-29 15:38:53 -07: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
Boris Zbarsky d8e0256e6d Bug 1174954 part 2. Remove the special-casing of DOMError in JS-implemented webidl code. r=bholley 2015-06-16 16:44:11 -04:00
Boris Zbarsky 90031d3619 Bug 1173593. Make it possible to throw TypeError (or, in fact, any other Error from the content compartment) from js-implemented webidl. r=bholley 2015-06-15 20:09:36 -04:00
Terrence Cole 5dd32db8cf Bug 1169086 - Use virtual dispatch to implement callback tracer; r=jonco, r=mccr8
--HG--
extra : rebase_source : 8da1af998621319f7a0112f1870080dd8835063e
2015-05-28 16:35:08 -07:00
Jason Orendorff 112cb52d91 Bug 1140482 - Add JSPROP_RESOLVING. Give NativeDefineProperty standard behavior in cases where a non-resolving define needs to trigger a resolve hook. r=Waldo.
--HG--
extra : rebase_source : c63bb83179ec98e9f93ebb86cb488d65f980a07e
2015-05-01 14:03:17 -05:00
Terrence Cole c01ef51c2d Bug 1167453 - Rename JSGCTraceKind and make it a C++11 enum class; r=jonco
--HG--
extra : rebase_source : 7dbeee0826fa20477ed227c9d336fdfe6de6ffd2
2015-05-22 10:40:24 -07:00
Terrence Cole 161a4c26ba Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink 2015-05-13 14:07:34 -07:00
Boris Zbarsky 0472742d0c Bug 1160628. Speed up the URL constructor in the common case of no base URI. r=baku 2015-05-05 13:38:56 -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 864f723c0c Bug 1155946 part 2. Add mayResolve methods to DOM classes with resolve hooks. r=peterv 2015-04-28 12:25:55 -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 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
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 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 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
Cameron McCormack 03ca266d1b Bug 1146235 - Part 2: Expose @@iterator aliases on XrayWrappers. r=peterv 2015-03-28 11:44:44 +11:00
Jason Orendorff 2e5f991fe0 Bug 1142784, part 2 - Change ProxyHandler::defineProperty() to make the desc argument a non-mutable handle. r=Waldo.
--HG--
extra : rebase_source : c40a50b3522e8306d68d8114fe576d4f43006d82
2015-02-17 11:58:43 -06:00
Terrence Cole dd4ddb761b Bug 1135985 - Split callback and marking tracers completely; r=jonco, r=mccr8
--HG--
extra : rebase_source : b2e435ebf64ec0bac42af7a8f0968578599fd67b
2015-02-25 13:11:37 -08:00
Phil Ringnalda c4745d28b1 Backed out 9 changesets (bug 1142775, bug 1139683, bug 1143810, bug 1142761, bug 1142784, bug 1142794, bug 1144819) for widespread bustage
CLOSED TREE

Backed out changeset 7613fc978d36 (bug 1142794)
Backed out changeset e5f0cb31263d (bug 1142784)
Backed out changeset dcd0af73ac84 (bug 1142784)
Backed out changeset 034f9c8e79ee (bug 1142784)
Backed out changeset ce0ee37e3ca9 (bug 1142775)
Backed out changeset 1519b8f2bbba (bug 1142761)
Backed out changeset 26fd55677841 (bug 1139683)
Backed out changeset 7ebc76a450c3 (bug 1144819)
Backed out changeset 92adb459d519 (bug 1143810)
2015-03-22 09:34:25 -07:00
Jason Orendorff db04193771 Bug 1142784, part 2 - Change ProxyHandler::defineProperty() to make the desc argument a non-mutable handle. r=Waldo.
--HG--
extra : rebase_source : 92dd18b10e100e7e2537c151a21d4f3be37e1c08
2015-02-17 11:58:43 -06:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Boris Zbarsky 5d2ae0a555 Bug 1140573 part 4. Drop the parent argument from js::NewFunctionByIdWithReserved. r=waldo 2015-03-09 12:50:08 -04:00
Boris Zbarsky cc3b42e52a Bug 1140573 part 3. Drop the parent argument from js::NewFunctionWithReserved. r=waldo 2015-03-09 12:50:07 -04:00
Boris Zbarsky dcb007a0d8 Bug 1140573 part 1. Drop the parent argument from JS_NewFunction. r=waldo 2015-03-09 12:50:03 -04:00
Boris Zbarsky 5d69db0b28 Bug 1140582. Remove the parent argument from JS_NewObjectWithUniqueType. r=waldo 2015-03-09 12:49:50 -04:00
Boris Zbarsky f0ef2a86aa Bug 1131802 part 2. Allocate functions with reserved slots for DOM Xrays so we can store the Xray wrapper reference in those slots instead of as the function parent. r=peterv 2015-03-06 16:33:31 -05:00
Jason Orendorff de9e3b99dc Bug 1113369, part 3 - [[DefineOwnProperty]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
Add an ObjectOpResult out-param for DefineProperty functions everywhere. We leave a few js::DefineProperty() convenience functions with no *result out-param. These have strict behavior: that is, they automatically check the result and throw if it is false. In bug 1125624 these strict signatures may end up being called DefinePropertyOrThrow, as that is what the spec calls it.

--HG--
extra : rebase_source : 36439a8fa433c453f63b02c93fceaf0d8b9e9626
2015-01-30 11:37:07 -06:00
L. David Baron 8de963d8ad Back out bug 1131802 (changesets 80e90f586329 and 35c268f162db) and patch 2 from bug 1131805 (changeset 4139522bf814) on a CLOSED TREE for assertion failures.
Assertion failure: (ptrBits & 1) == 0, at ../../dist/include/js/Value.h
:871
called from XrayCreateFunction
2015-03-06 15:14:52 -08:00
Boris Zbarsky 05aaddd360 Bug 1131805 part 1. Remove remaining JS_GetParent and js::GetObjectParent uses in Gecko. r=bholley 2015-03-06 16:33:31 -05:00
Boris Zbarsky 6523d4990f Bug 1131802 part 2. Allocate functions with reserved slots for DOM Xrays so we can store the Xray wrapper reference in those slots instead of as the function parent. r=peterv 2015-03-06 16:33:31 -05:00