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

569 Коммитов

Автор SHA1 Сообщение Дата
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
Martin Thomson 4574e04530 Bug 1155923 - Add Deprecated attribute to interfaces, r=peterv
--HG--
extra : transplant_source : q%B6%21%A22%A6%8Ftg%C8%1D%02%91/%C7%8A%AA%E2%C6g
2015-09-28 11:25:04 -07:00
Carsten "Tomcat" Book 4952084732 Backed out 3 changesets (bug 1155923) for causing test failures in promises-call.html
Backed out changeset 321a932e01a7 (bug 1155923)
Backed out changeset 6ac38acd6ab2 (bug 1155923)
Backed out changeset 2981db92416a (bug 1155923)
2015-09-28 14:02:41 +02:00
Martin Thomson d4f1b7fa44 Bug 1155923 - Add Deprecated attribute to interfaces. r=peterv
--HG--
extra : transplant_source : %E7_%24v%EA%08%AB1%A2%2BPl%AE%85%B9-%A6%D9%FEG
2015-09-24 16:31:47 -07:00
Tom Schuster e3fbb8bc43 Bug 603201 - Change GetProperty receiver argument to Value in the browser. r=smaug 2015-09-18 00:14:41 +02:00
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
Jon Coppeard aee7dfb6c9 Bug 1138874 - Fix comments as per review feedback r=bz DONTBUILD 2015-03-06 15:06:57 +00: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 19d83a360f 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 0edff16cda 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 c5cbd265c3 Bug 1050456 - Part 2: Add a nsGlobalWindow::GetIsPrerendered helper 2015-03-04 01:31:08 -05:00
Jan de Mooij db18ff3df9 Bug 1137523 - Unprefix most js_* functions. r=bhackett CLOSED TREE 2015-02-27 16:08:15 +01:00
Boris Zbarsky 407a8559b0 Bug 1136925 part 1. Stop passing a parent to JS_CloneObject. r=waldo 2015-02-26 15:58:59 -05:00
Wes Kocher f657cd0135 Backed out 4 changesets (bug 1136925) for potentially busting m-e10s-dt on a CLOSED TREE
Backed out changeset 331761aaae22 (bug 1136925)
Backed out changeset 2faa0e91fe23 (bug 1136925)
Backed out changeset a00f2530c911 (bug 1136925)
Backed out changeset d5e658bc0792 (bug 1136925)
2015-02-26 23:17:34 -08:00
Boris Zbarsky 78b6722596 Bug 1136925 part 1. Stop passing a parent to JS_CloneObject. r=waldo 2015-02-26 15:58:59 -05:00
Boris Zbarsky 30f7932607 Bug 1135810. Add more explicit checks for whether a descriptor wants Xrays or not instead of assuming that Xrays are desired if and only if descriptor.workers is false. r=peterv 2015-02-26 09:40:08 -05:00
Boris Zbarsky bf177935d6 Bug 1136292 part 3. Stop passing a global as the parent arg to JS_NewObjectWithGivenProto in bindings code. r=peterv 2015-02-26 09:40:07 -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
Tom Schuster 42f3ec261e Bug 1127443 - Move some JS_NewObject callers to JS_NewObjectWithGiveProto 2015-01-31 16:18:51 +01:00
Boris Zbarsky 3d347c5027 Bug 1127206. Don't try to do binding UnwrapArgImpl on worker threads. It can't do anything useful there. r=peterv 2015-01-30 13:54:43 -05:00
Bill McCloskey 2f3d90830b Bug 1123461 - Make a real interface for js/ipc (r=dvander) 2015-01-26 13:32:18 -08:00
Ehsan Akhgari 866d758e54 Bug 1069719 - Abort the execution of scripts when a prerendered page calls an IDL blacklisted function; r=bzbarsky 2015-01-26 11:02:56 -05: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
Ms2ger b83d21c58c Bug 914067 - Remove JSVAL_VOID from dom/; r=jst 2015-01-14 08:59:06 +01:00
Boris Zbarsky bad2ee9b82 Bug 1117167. Make the generated implementation classes for JS-implemented bindings store an nsIGlobalObject, not an nsPIDOMWindow, so we can use them in sandboxes. r=peterv 2015-01-08 11:57:19 -05:00
Jeff Walden 79c821101e Bug 603201 - Make HasPropertyOnPrototype fallible. r=peterv 2015-01-02 14:02:36 -06:00
Boris Zbarsky 8fd98d4057 Bug 1107592 part 2. Allow chrome JS to directly throw content DOMExceptions that will propagate out to the web script. r=peterv 2015-01-02 17:08:33 -05:00
Jason Orendorff 92f1bf16c5 Bug 1103368, part 5 - Make Class::getProperty and setProperty nullable instead of needing stub functions. Never store stub functions in JSPropertyDescriptors. r=bhackett.
--HG--
extra : rebase_source : a44070dd6155426ef6026c1575116f90b5fdac0c
extra : amend_source : 8d8fcf05dfd5fdf214a39501663347a6d6b56463
2014-11-22 12:23:39 -06:00
Boris Zbarsky 8ec9d58716 Bug 1087851 part 1. Rename WrapNewBindingObject to GetOrCreateDOMReflector to make it clearer what it does. r=peterv for the idea; patch itself is just search-and-replace 2014-11-26 14:25:20 -05:00
Boris Zbarsky e86d3b5204 Bug 1096011. Warning when failing to create a JS implemntation for a Web IDL binding should include the implementation contract. r=peterv 2014-11-24 11:57:49 -05:00
Boris Zbarsky cfe3876dca Bug 1089079. Make .length on interface objects configurable. r=peterv 2014-11-24 12:56:32 +00:00
Andrea Marchesini 9d30f59efd Bug 1077393 - Rename ScalarValueString to USVString. r=smaug
--HG--
rename : dom/bindings/parser/tests/test_scalarvaluestring.py => dom/bindings/parser/tests/test_usvstring.py
rename : dom/bindings/test/test_scalarvaluestring.html => dom/bindings/test/test_usvstring.html
2014-11-20 12:58:00 +01:00
Steve Fink bcb05bd4d2 Bug 1053999 - Conservative stack check should assume untrusted code, r=bholley
--HG--
extra : rebase_source : f363a8bc1c2f78e9ab47538cdcf8669275a73cb0
2014-11-13 12:23:11 -08:00
Tom Schuster 18c9617c27 Bug 993026 - Change resolve hook in browser/XPC. r=bholley 2014-11-08 01:07:12 +01:00
Boris Zbarsky 3ab8b7383a Bug 1088002 part 3. Stop requiring JSPROP_PROPOP_ACCESSORS just to use stub accessors. r=waldo 2014-10-29 15:06:32 -04:00
Boris Zbarsky 6ee4ab8789 Bug 1088002 part 2. Change JS_DefineElement, JS_DefineProperty, JS_DefineUCProperty, JS_DefinePropertyById, and JS_DefineProperties to default to using JSNative accessors, not JSPropertyOp accessors. r=waldo 2014-10-29 15:06:31 -04:00
Boris Zbarsky 87347c238d Back out part of bug 1084001 because the tests are being silly. 2014-10-25 01:58:59 -04:00
Boris Zbarsky 96fe2231a2 Bug 1084001. Set the .name of DOM interface objects to the name of the interface. r=peterv 2014-10-25 00:50:28 -04:00
Boris Zbarsky 691a2b701a Bug 1087404. Get rid of XPCQuickStubs.h/cpp. r=bholley 2014-10-23 15:21:46 -04:00
Boris Zbarsky 0929eae5cc Bug 1019191 part 23. Eliminate the ppArgRef argument of xpc_qsUnwrapArgImpl and UnwrapArg, since we're now always handing out a ref in ppArg. r=peterv 2014-10-22 11:40:51 -04:00
Boris Zbarsky a688f3fefc Bug 1019191 part 22. Eliminate the effectively unused vp argument of xpc_qsUnwrapArgImpl. r=peterv 2014-10-22 11:40:51 -04:00
Boris Zbarsky b87343d102 Bug 1019191 part 21. Change xpc_qsUnwrapArgImpl and UnwrapArg to take a HandleObject, not a HandleValue. r=peterv 2014-10-22 11:40:50 -04:00
Boris Zbarsky e4db1a7e1e Bug 1019191 part 19. Change GlobalObject::GetAsSupports to not rely on UnwrapArg producing an nsISupports for non-reflectors. r=peterv 2014-10-22 11:40:50 -04:00
Boris Zbarsky 56c4d8609d Bug 1019191 part 10. Stop using xpc_qsUnwrapArg directly in BindingUtils. r=peterv 2014-10-22 11:40:48 -04:00
Brian Hackett 87281e9299 Bug 1073842 - Remove slots/elements from non-native objects, use a new layout for proxies and typed objects, r=luke,billm,efaust,bz,sfink,jandem. 2014-10-17 16:57:52 -07:00
Jason Orendorff 8ec9f238d9 Bug 1082672, part 4 - Change XrayWrapper code to be able to resolve symbol-keyed methods. r=bz, r=bholley.
--HG--
extra : rebase_source : f78cbb83f63dfffd648c6d3c280273f4a61c9fe8
extra : amend_source : f006a096174eee166125430753e65e9a31bd930b
2014-09-18 12:30:38 -05:00
Tom Schuster bf9324688d Bug 1069694 - Remove OldDebugAPI from the browser. r=shu 2014-10-12 19:37:41 +02:00
Jason Orendorff d35e6d1e8d Bug 1026918, part 1 - Rename BaseProxyHandler::getOwnPropertyNames -> ownPropertyKeys to match the ES6 [[OwnPropertyKeys]] internal method. r=efaust, r=bz.
Also renamed in this patch:

ENUMERATE_IF_DEFINED -> ADD_KEYS_IF_DEFINED
XrayEnumerateAttributesOrMethods -> XrayAttributeOrMethodKeys
XrayEnumerateNativeProperties -> XrayOwnNativePropertyKeys
XrayEnumerateProperties -> XrayOwnPropertyKeys
WrapperOwner::getPropertyNames -> getPropertyKeys

These make sense because JSITER_* flags are involved; the functions in
question are not for finding enumerable properties only.

--HG--
extra : rebase_source : 35fb0fa3c8f3d7bc952409ea8c584e58f3c1d78f
2014-09-26 15:16:36 -05:00
Bobby Holley 0eb719cc17 Bug 987794 - Don't unwrap XrayWrappers in HasPropertyOnPrototype. r=bz 2014-10-02 18:34:16 +02:00
Neil Rashbrook 2b34b65e9e Bug 1074114 Propagate error thrown when constructing the JS implementation r=bz 2014-10-02 01:37:50 +01:00
Peter Van der Beken ebc693bfd7 Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, make Xrays walk the prototype chain when resolving DOM properties. r=bholley.
* * *
Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, remove obsolete code. r=bholley.

--HG--
extra : rebase_source : 7a9aa81d3e9d74ed958374942020474147aa4f86
2014-09-15 16:51:40 +02:00
Peter Van der Beken 16b3a0fe7d Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, add a named properties object type to DOMObjectType and how to get the parent prototype object in DOMIfaceAndProtoJSClass. r=bz, r=bholley.
--HG--
extra : rebase_source : fdd72f5027b365554ab0b986de685204c8030c58
2014-09-09 15:19:10 +02:00
Peter Van der Beken 307531531b Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, move some code around. r=bholley.
--HG--
extra : rebase_source : 713a35d4bc7ffa4a25561823dbb0301a22565cb5
2013-10-18 13:22:08 +02:00
Peter Van der Beken cbd064cb38 Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, make CreateInterfaceObjects take a js::Class instead of a JSClass. r=bz.
--HG--
extra : rebase_source : 8b37d59b5f43215c5acef9f8219e631024ece207
2014-08-05 12:46:42 +02:00
Peter Van der Beken a756948971 Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, make global properties own on Xrays. r=bholley.
--HG--
extra : rebase_source : dc238b6eeed8299adc3995c2b8647f68499efb58
2014-09-15 16:49:04 +02:00
Peter Van der Beken 67e7fbe69f Bug 787070 - Expandos on the xray of DOM prototypes should have effect on xrays of DOM nodes, make GetNativePropertyHooks detect global objects. r=bz.
--HG--
extra : rebase_source : 15dc7787cc8456da79d9c62536f241fc3dc94dbd
2014-08-22 11:25:35 +02:00
Peter Van der Beken 1ab9ffc995 Bug 1067501 - Make stringification of DOM Xrays use Object.prototype.toString. r=bholley.
--HG--
extra : rebase_source : 7ba38f2b2625d0ff5405eda2fda6bad9608efa34
2014-09-15 16:45:38 +02:00
Bobby Holley db168e5cde Bug 1065811 - Expose isCallable()/isConstructor() in JS_PUBLIC_API. r=billm 2014-09-25 13:13:28 +02:00
Ehsan Akhgari 28f0bef008 Bug 1065025 - Make the generated WebIDL ToJSON method const; r=baku 2014-09-09 14:00:22 -04:00
Chris Peterson d126c3c24f Bug 1063962 - Replace jschar typedef with C++11 char16_t type. r=jandem 2014-07-21 21:43:21 -07:00
Peter Van der Beken dc7011c6cf Bug 1059134 - ResolvePrototypeOrConstructor should take bool&, not bool, for cacheOnHolder. r=bz.
--HG--
extra : rebase_source : 063b8cd96dc8e5a7d7f73f292554ce11520c313a
2014-09-02 14:17:43 +02:00
Bobby Holley 9623afb943 Bug 1056332 - Remove cross-global adopt telemetry. r=gabor 2014-08-23 09:01:50 +02:00
Peter Van der Beken 63152eee22 Bug 1041731 - Unforgeable Xrayed methods aren't getting cached on the holder. r=bholley.
--HG--
extra : rebase_source : 9e86ba2d864e6894cc10722ddaf83ded41d88e42
2014-08-22 11:25:07 +02:00
Roshan Vidyashankar 2d98c38825 Bug 1038993 - Add UnsafeInPrerendering extended attribute to WebIDL. r=peterv 2014-08-20 16:32:19 -07:00
Bill McCloskey ea56636cdf Bug 1053999 - Be more conservative in recursion checks before brain transplants (r=bholley) 2014-08-20 18:14:56 -07:00
Wes Kocher f1dcf77851 Backed out changeset 2a9cfbab0adc (bug 1053999) for Windows build bustage on a CLOSED TREE 2014-08-20 16:08:04 -07:00
Bill McCloskey d701ccf82e Bug 1053999 - Be more conservative in recursion checks before brain transplants (r=bholley) 2014-08-20 15:16:07 -07:00
Bobby Holley 9b4a386a14 Bug 1036214 - Do a subsumes check on object and any parameters (and things containing them) to JS-implemented WebIDL. r=bz 2014-08-19 18:12:15 -07:00
Peter Van der Beken 2a4b38bbe9 Bug 1036186 - Reset Migration wizard no longer skips the first step to choose a browser. r=smaug.
--HG--
extra : rebase_source : 5fd0eed62b999eabf4a7a46300f4d74a6888b1f8
2014-08-08 15:03:29 +02:00
Seth Fowler 0fd6e994ae Bug 913586 (Part 4) - Update Maybe users in dom. r=bz
--HG--
extra : rebase_source : 7b6159b00b3bf4f919b30f1bccc8939cc04fe526
2014-08-13 15:39:41 -07:00
Ben Kelly 8d0e50e7d2 Bug 1025183 P3 Add ScalarValueString to webidl Codegen.py r=bz 2014-08-01 16:23:48 -04:00
Ben Kelly 93f746a2f6 Revert bug 1025183 (revs 69373df15281, dd6d84edf08e, 728a5d18bcd9, 71babe0bc84b, c60f9054acf6) for bustage. r=me 2014-08-01 14:10:40 -04:00
Ben Kelly e072a1a235 Bug 1025183 P3 Add ScalarValueString to webidl Codegen.py r=bz 2014-08-01 13:56:59 -04:00
Ed Morley 9e28eb3441 Backed out changeset 01c51cb8d8bd (bug 1025183) 2014-08-01 10:27:32 +01:00
Boris Zbarsky 3688e8eb15 Bug 1038399. Add a ToJSON method to Web IDL dictionaries. r=bholley 2014-07-31 23:50:19 -04:00
Ben Kelly 9384922566 Bug 1025183 P3 Add ScalarValueString to webidl Codegen.py r=bz 2014-07-31 19:40:12 -04:00
Bobby Holley 8bee6258a0 Bug 1044205 - Invoke XPCWrappedNativeScope::TraceSelf from TraceXPCGlobal. r=billm 2014-07-29 08:48:32 -07:00
Bobby Holley 4aeae32f5c Bug 1041626 - Only define unforgeable attributes on instances, and do a call to XrayEnumerateNativeProps when |type| is still set to eInstance. r=bz 2014-07-23 12:36:21 -07:00
Bobby Holley e69028525a Bug 1041626 - Use a macro in XrayEnumerateProperties to make the logic easier to follow. r=bz 2014-07-23 12:36:21 -07:00
Bobby Holley 3ee88775ff Bug 1041626 - Make NativeProperties naming more consistent. r=bz 2014-07-23 12:36:21 -07:00
Bobby Holley 797a9c28be Bug 1041626 - Mirror the logic for attribute enumeration in method enumeration. r=bz 2014-07-23 12:36:21 -07:00
Bobby Holley 5e7401f779 Bug 1041626 - Generalize XrayEnumerateAttributes. r=bz 2014-07-23 12:36:20 -07:00
Neil Rashbrook 5aea9a701a Bug 1041140 Fix design flaws in FakeString r=bz 2014-07-19 14:23:19 +01:00
Jan de Mooij cfcce18b5a Bug 1037613 - rm js_GetLocalizedErrorMessage, localeGetErrorMessage callback. r=jorendorff 2014-07-15 15:14:38 +02:00
Jan de Mooij d26a13e060 Bug 1037869 - Fix remaining Latin1 string issues. r=terrence
--HG--
extra : rebase_source : b6fc9024f1a6c7eb9169b6c8c906916b4b1c197e
2014-07-14 22:19:36 +02:00
Jan de Mooij 2a7ce8f885 Bug 1034689 part 2 - Add AssignJSFlatString and use it. r=bz,terrence 2014-07-12 09:43:06 +02:00
Boris Zbarsky bb8038a766 Bug 832014 part 7. Fix Xray support for unforgeable methods. r=peterv 2014-07-11 19:32:16 -04:00
Boris Zbarsky e620338f1a Bug 832014 part 2. Add codegen support for [Unforgeable] interfaces. r=peterv 2014-07-11 19:30:27 -04:00
Bill McCloskey e03b6322a0 Bug 1029248 - Clean up CPOW unwrapping (r=mrbkap) 2014-07-10 16:47:04 -07:00
Bobby Holley ec0078e10d Bug 1033927 - Drop support for custom [object XrayWrapper [object ClassName]] stringification. r=peterv 2014-07-07 13:11:24 -07:00
Ms2ger 3b4a60ee80 Bug 1034204 - Implement unforgeable methods; r=bz 2014-07-04 15:02:10 +02:00
Ryan VanderMeulen 658554a580 Backed out changesets 4a19dcbc7e7a and 4907115e02e3 (bug 1029248) for non-unified bustage.
CLOSED TREE
2014-07-03 13:19:29 -04:00
Bill McCloskey 42d60ab372 Bug 1029248 - Add helpers to simplify CPOW unwrapping (r=mrbkap) 2014-07-03 09:48:21 -07:00
Bobby Holley 71f1a77169 Bug 1032317 - Make CompartmentPrivate and XPCWrappedNativeScope accessors infallible. r=gabor 2014-07-03 09:40:52 -07:00
Bobby Holley 0eb34339eb Bug 1032317 - Remove XPCWrappedNativeScope::GetNewOrUsed. r=gabor 2014-07-03 09:40:52 -07:00
Jan de Mooij 574cf83f68 Bug 1032726 part 6 - Some followup changes. r=bz 2014-07-03 13:05:03 +02:00
Jan de Mooij 7aac8950d1 Bug 1032726 part 5 - Make new DOM bindings work with Latin1 strings. r=bz 2014-07-03 10:03:56 +02:00
Jan de Mooij c296802a3b Bug 1032726 part 1 - Make ConvertJSValueToByteString work with Latin1 strings. r=bz,terrence 2014-07-02 13:04:14 +02:00
Eric Faust 19ae308309 Bug 1027402 - Part 4: Mark Proxy Handler uses const. (r=jorendorff, r=bz) 2014-06-27 04:44:08 -07:00
Carsten "Tomcat" Book 0c7ea5265d Backed out changeset 96443362db6f (bug 1027402) 2014-06-27 14:21:17 +02:00
Eric Faust 6f7e434c6b Bug 1027402 - Part 4: Mark Proxy Handler uses const. (r=jorendorff, r=bz) 2014-06-27 04:44:08 -07:00
Eric Faust f9d65507e2 Bug 1011660 - Remove separate DOMClass struct. (r=bz) 2014-06-18 13:19:19 -07:00
Ben Kelly 85647df24b Bug 1025973 - Part 2: Do not pass JSContext to static webidl methods in non-worker case. r=bz 2014-06-16 12:52:00 -04:00
Ben Kelly 8bf2933ed2 Bug 1025973 - Part 1: Rename GlobalObject::GetContext() to Context(). r=bz 2014-06-16 14:08:00 -04:00
Boris Zbarsky bc1e511e33 Bug 1009675 part 2. Return WebIDL 'any' values as handles. r=peterv 2014-06-11 16:26:52 -04:00
Peter Van der Beken 0e8aec0dab Bug 1016960 - make |instanceof WebIDLInterface| work with outer windows. r=bz.
--HG--
extra : rebase_source : d62525ea541af2cf832884fb8ea5398595887679
2014-05-28 22:45:37 +02:00
Reuben Morais 978af66e3d Bug 952486 - Add a CheckPermissions extended attribute to WebIDL. r=bz 2014-05-25 15:31:07 -03:00
Fabrice Desré 2deb233e1d Bug 952486 - backout for breaking all device and emulator builds (keeping dom reviewer to land the backout...) r=bz 2014-05-26 12:11:52 -07:00
Reuben Morais 1d0db64ab8 Bug 952486 - Add a CheckPermissions extended attribute to WebIDL. r=bz 2014-05-25 15:31:07 -03:00
Birunthan Mohanathas 0e6f3a6562 Bug 869836 - Part 3: Use `Append('c')` instead of `AppendLiteral("c")`. r=ehsan 2014-05-22 06:48:51 +03:00
Peter Van der Beken 5b59ad51b2 Bug 1013796 - Make TraceGlobal deal with partially created global object. r=bz.
--HG--
extra : rebase_source : b487663d8d80c88a389d377b027683255460dd48
2014-05-20 21:44:49 +02:00
Boris Zbarsky e26b5292a5 Bug 1010658 part 2. Stop storing a DOMClass* in a slot on DOM prototypes. r=peterv 2014-05-19 16:37:59 -04:00
Boris Zbarsky bc8b8b2ddf Bug 1010658 part 1. Stop using the DOMClass stored in DOM_PROTO_INSTANCE_CLASS_SLOT for doing type checks in the jit, and do them directly on the instance classes instead. r=efaust 2014-05-19 16:37:59 -04:00
Boris Zbarsky a6ec8f36cc Bug 1008236. Assert that binding generic getters/setters/methods return values that match the return type claimed in the jitinfo. r=smaug 2014-05-15 10:26:23 -07:00
Bill McCloskey 9ec71fd998 Bug 996785 - Move global CPOW functions to top level (r=mrbkap) 2014-05-16 16:40:35 -07:00
Ryan VanderMeulen 9e342ce37a Revert to revision 63dfac3c9c87 due to mass bustage pile-ups that landed after it on a CLOSED TREE. 2014-05-16 12:29:37 -04:00
Boris Zbarsky 3166357350 Bug 1008236. Assert that binding generic getters/setters/methods return values that match the return type claimed in the jitinfo. r=smaug 2014-05-15 10:26:23 -07:00
Ryan VanderMeulen c53951f788 Backed out 4 changesets (bug 1008236, bug 1010344, bug 1004458, bug 1008719) for mochitest crashes on a CLOSED TREE.
Backed out changeset 28ecab881472 (bug 1008719)
Backed out changeset 7eebcecb7e26 (bug 1004458)
Backed out changeset 17ea7f2276ac (bug 1010344)
Backed out changeset 184ead7f6e37 (bug 1008236)
2014-05-15 14:24:12 -04:00
Boris Zbarsky 7655728655 Bug 1008236. Assert that binding generic getters/setters/methods return values that match the return type claimed in the jitinfo. r=smaug 2014-05-15 10:26:23 -07:00
Nick Lebedev c49e263d0f Bug 998002 - Rename nsContentUtils::Get{Subject,Object}Principal to nsContentUtils::{Subject,Object}Principal. r=bholley 2014-05-13 11:58:00 +02:00
Peter Van der Beken 42c32dddca Bug 1005978 - Add infrastructure to create main-thread WebIDL globals with XPConnect. r=bz.
--HG--
extra : rebase_source : 08c6f04e050bdd801a15883bb57d21ff93626024
2014-04-08 20:48:37 +02:00
Peter Van der Beken 4804da54ff Bug 1005898 - Make WebIDL properties on all globals own properties. r=bz.
--HG--
extra : rebase_source : 3eb201d073b090b2627814264a126a1a4281207f
2014-02-15 22:12:34 +01:00
Alexandre Lissy 945a46f5a9 Bug 967475 - Implement mozChromeNotifications API. r=mhenretty,bent 2014-05-08 23:16:00 +02:00
Wes Kocher 54f2dadcee Backed out changeset 21d743a319c6 (bug 967475) for apparently introducing two hazards to the build 2014-05-08 16:06:40 -07:00
Alexandre Lissy 8bf8be15f1 Bug 967475 - Implement mozChromeNotifications API. r=mhenretty, r=bent
--HG--
extra : rebase_source : 595b53c85f031784bd77591d4e0593e60b39ccfd
2014-05-08 10:07:00 -04:00
Rodrigo Rodriguez Jr. e987aa99bf Bug 952650 (part 8) - Remove JSVAL_TO_STRING. r=njn.
--HG--
extra : rebase_source : 61ab9459c00849027498904863647e65453a1a43
2014-04-27 19:45:46 -07:00
Jason Orendorff 4740c9dea6 Bug 547140, part 4 - Remove flags argument from resolve hooks. r=Waldo. 2014-04-25 16:11:02 -05:00
Terrence Cole 581c606391 Bug 959787 - Handlify JS_DefineProperty; r=Waldo, r=bz
--HG--
extra : rebase_source : 87991ed47ed071550af4e4125eea54a66fdb0071
2014-01-21 18:11:17 -08:00
Jon Coppeard dae8d1e277 Bug 912581 - Make JS_Add*Root APIs take Heap<T> r=terrence r=bz r=bholley 2014-04-16 09:47:57 +01:00
Bobby Holley 3de1018bbe Bug 989528 - Rename AutoSystemCaller to AutoNoJSAPI, and assert against pre-existing exceptions. r=bz 2014-04-14 20:27:00 -07:00
Boris Zbarsky e74e09a7f2 Bug 993889 part 6. Remove the "scope" argument of dom::WrapObject methods. r=bholley 2014-04-10 00:58:43 -04:00
Boris Zbarsky feebd363fb Bug 991742 part 9. Remove the "scope" argument of WrapNewBindingObject. r=bholley 2014-04-08 18:27:19 -04:00
Boris Zbarsky 79dab91ff6 Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
Boris Zbarsky d7fa8f56be Bug 991742 part 1. Enter the compartment of the current wrapper before we try to reparent objects. r=bholley
This lets us preserve some invariants about our current compartment matching the scope we want to wrap into.
2014-04-08 18:27:15 -04:00
Peter Van der Beken b3dc774b85 Bug 983619 - Add Window.getInterface/QueryInterface to WebIDL, followup to deal with review comment. r=bz.
--HG--
extra : rebase_source : a0e0fa6d59c9edb9b346a5cb8b062144198a87c2
2014-04-08 20:39:38 +02:00
Peter Van der Beken 65e4bfa394 Bug 983619 - Add Window.getInterface/QueryInterface to WebIDL. r=bz.
--HG--
extra : rebase_source : 4a4f368ba4f84e6e5104522181eb3043efd7ed38
2014-02-15 22:12:33 +01:00
Ehsan Akhgari b344638c9b Bug 983920 - Port window.sidebar and window.external to WebIDL; r=bzbarsky 2014-03-28 00:03:03 -04:00
Nathan Froyd 9d5430fc7b Bug 987457 - rename ProtoAndIfaceArray to ProtoAndIfaceCache; r=bz 2014-03-22 13:04:09 -04:00
Nathan Froyd a9b5bcd756 Bug 948445 - use different caching schemes for ProtoAndIfaceArray depending on the global kind; r=bz 2013-12-10 16:04:55 -05:00
Boris Zbarsky 25b6f9a6ac Bug 983300 part 4. Convert exceptions in static methods returning promises into rejected promises. r=khuey,efaust 2014-03-21 12:18:24 -04:00
Boris Zbarsky a4309c8b4e Bug 983300 part 2. Introduce a GenericPromiseReturningBindingMethod for methods that return Promise return value. r=khuey,bholley
This method effectively catches exceptions from GenericBindingMethod and converts them into rejected promises.  This handles calls to Promise-returning APIs from everything except Ion fast paths.
2014-03-21 12:18:24 -04:00
Boris Zbarsky 20d2acf564 Bug 976305. Use the callee, not the irrelevant this value, to figure out the GlobalObject for a static WebIDL method. r=bholley 2014-03-20 23:19:43 -04:00
Birunthan Mohanathas e5a1edbddc Bug 984112 - Part 1: Use JS::CallArgs instead of JS_{ARGV,SET_RVAL,...}, `argc` in dom/. r=bz 2014-03-19 13:05:04 -04:00
Bobby Holley fbb9b62de8 Bug 825392 - Remove SOWs. r=bz 2014-03-19 13:35:45 -03:00
Peter Van der Beken f0dc19c509 Backout 8aca83520a91 (bug 983619) to fix orange/red on a CLOSED TREE. 2014-03-17 20:27:53 +01:00
Peter Van der Beken 0d26c9750b Bug 983619 - Add Window.getInterface/QueryInterface to WebIDL. r=bz. 2014-02-15 22:12:33 +01:00
Jon Coppeard bafb7ba32f Bug 959787 - Handlify some friend and debug APIs r=sfink r=bholley 2014-03-17 16:17:58 +00:00
Boris Zbarsky b5d04164e0 Bug 981036. Disallow calling DOM constructors as functions in non-release builds. r=bholley 2014-03-10 17:38:31 -04:00
Bobby Holley 0b4592afe8 Bug 969441 - Check for recursion outside of the hairy transplant callsites. r=billm 2014-03-06 15:26:17 -08:00
Kyle Huey 8037c60c94 Bug 978602: Caching the global's nsISupports* off the main thread. r=bz 2014-03-06 13:05:11 -08:00