Commit Graph

407 Commits

Author SHA1 Message Date
Boris Zbarsky
9161435478 Bug 1135961. Implement subclassing of DOM objects. r=peterv 2015-07-31 13:30:55 -04:00
Kan-Ru Chen
4d3a642058 Bug 1179718 - Rename CheckPermissions to CheckAnyPermissions. r=bz 2015-07-17 11:07:53 +08:00
Kan-Ru Chen
6d102fd754 Bug 1179718 - Add a CheckAllPermissions extended attribute to WebIDL. r=bz 2015-07-17 11:06:23 +08:00
Birunthan Mohanathas
e52329c788 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
b2e0ce9897 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
5e8858b2f6 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
cedf483593 Bug 1180770 part 1. Remove the unused ThrowNotEnoughArgsError. r=peterv 2015-07-09 22:51:28 -04:00
Terrence Cole
1eacda008a Bug 1178581 - Interning does not and should not imply infinite lifetime; r=sfink 2015-06-30 07:58:31 -07:00
Kyle Machulis
7d74d5423e Bug 1123516 - Implement maplike/setlike in WebIDL Codegen; r=bz 2015-06-29 15:38:53 -07:00
Boris Zbarsky
978db1e8f0 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
9b5d2df4ae 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
0d146ab622 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
948a1d6deb Bug 1169086 - Use virtual dispatch to implement callback tracer; r=jonco, r=mccr8 2015-05-28 16:35:08 -07:00
Jason Orendorff
d3220a631f Bug 1140482 - Add JSPROP_RESOLVING. Give NativeDefineProperty standard behavior in cases where a non-resolving define needs to trigger a resolve hook. r=Waldo. 2015-05-01 14:03:17 -05:00
Terrence Cole
7b1f37d23c Bug 1167453 - Rename JSGCTraceKind and make it a C++11 enum class; r=jonco 2015-05-22 10:40:24 -07:00
Terrence Cole
97c65455fd Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink 2015-05-13 14:07:34 -07:00
Boris Zbarsky
2b2824bbc7 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
aeff7c99ee Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky
f3b244998d 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
7f61a6b625 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
ece8127b76 Bug 1157754 part 3. Make ClearMessage private on ErrorResult. r=peterv 2015-04-26 22:38:17 -04:00
Boris Zbarsky
399ba482a5 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
d9154ef126 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
293095378e 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
5303aae53b 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
a148661e18 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
1e2d6ce351 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
de0743a17a 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
89f3438815 Bug 1146235 - Part 2: Expose @@iterator aliases on XrayWrappers. r=peterv 2015-03-28 11:44:44 +11:00
Jason Orendorff
d28f3fee83 Bug 1142784, part 2 - Change ProxyHandler::defineProperty() to make the desc argument a non-mutable handle. r=Waldo. 2015-02-17 11:58:43 -06:00
Terrence Cole
ef0a198902 Bug 1135985 - Split callback and marking tracers completely; r=jonco, r=mccr8 2015-02-25 13:11:37 -08:00
Phil Ringnalda
8a89e647fd 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
6b90d382df Bug 1142784, part 2 - Change ProxyHandler::defineProperty() to make the desc argument a non-mutable handle. r=Waldo. 2015-02-17 11:58:43 -06:00
Boris Zbarsky
54c64f20a9 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
845c6d397f Bug 1140573 part 4. Drop the parent argument from js::NewFunctionByIdWithReserved. r=waldo 2015-03-09 12:50:08 -04:00
Boris Zbarsky
7c3e3e3096 Bug 1140573 part 3. Drop the parent argument from js::NewFunctionWithReserved. r=waldo 2015-03-09 12:50:07 -04:00
Boris Zbarsky
7f7b76aa0c Bug 1140573 part 1. Drop the parent argument from JS_NewFunction. r=waldo 2015-03-09 12:50:03 -04:00
Boris Zbarsky
8ece71391b Bug 1140582. Remove the parent argument from JS_NewObjectWithUniqueType. r=waldo 2015-03-09 12:49:50 -04:00
Boris Zbarsky
a94ca36434 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
f43c96af4d 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.
2015-01-30 11:37:07 -06:00
L. David Baron
6d3ce826c6 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
57f6535651 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
76179d5e5e 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
Jon Coppeard
0837e91d98 Bug 1138874 - Fix comments as per review feedback r=bz DONTBUILD 2015-03-06 15:06:57 +00:00
Boris Zbarsky
f22da41d9f 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
458e969f4e Bug 1139964 part 1. Factor out the guts of BackstagePass::Resolve and BackstagePass::Enumerate to allow reuse for other globals that want to opt in to Exposed=System WebIDL annotations. r=smaug 2015-03-06 01:08:06 -05:00
Jon Coppeard
186d726ceb Bug 1138874 - Change ReparentWrapper() to avoid multiple JS objects pointing to the same native r=bholley 2015-03-05 13:39:53 +00:00
Ehsan Akhgari
58dc1b564f Bug 1050456 - Part 2: Add a nsGlobalWindow::GetIsPrerendered helper 2015-03-04 01:31:08 -05:00
Jan de Mooij
c588ad661c Bug 1137523 - Unprefix most js_* functions. r=bhackett CLOSED TREE 2015-02-27 16:08:15 +01:00
Boris Zbarsky
768e9d1720 Bug 1136925 part 1. Stop passing a parent to JS_CloneObject. r=waldo 2015-02-26 15:58:59 -05:00