Commit Graph

46 Commits

Author SHA1 Message Date
Tom Schuster
050d853e33 Bug 1468774 - Remove getPropertyDescriptor from CPOWs. r=mrbkap r=mccr8 2018-04-03 18:21:40 +02:00
Alex Gaynor
687ce91a32 Bug 1465860 - Don't crash in JS IPC on invalid object id. r=evilpie
Instead, return an error up to the caller, who can return an IPC error, which
will kill the child. This is significantly friendlier to fuzzing.

MozReview-Commit-ID: C67xSqUeN1i
2018-05-31 16:29:03 -04:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Chris Peterson
677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
Kan-Ru Chen
1b9dd22e2d Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
David Major
c4864e69d5 Bug 1311825: Pass by reference in fromObjectVariant and related methods. r=billm
MozReview-Commit-ID: GIhK1zRMsYb
2016-10-20 15:37:26 -05:00
Jan de Mooij
519f0d4bf1 Bug 1292892 part 7 - Remove unnecessary JSContext arguments from IPC classes. r=bz 2016-08-11 14:39:23 +02:00
Jan de Mooij
bd0f1c9018 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Jeff Walden
51488fefe9 Bug 888969 - Make the getPrototypeOf/setPrototypeOf traps scriptable. r=efaust, r=bholley 2016-02-23 13:42:30 -08:00
Jeff Walden
9399e8c7de Bug 1179003 - Convert the infallible objectClassIs proxy hook into a fallible getBuiltinClass hook that indicates class type via outparam. r=efaust, r=bz on DOM bits, r=billm on IPC bits 2015-08-28 21:55:40 -07:00
Jeff Walden
ff30226147 Bug 1187234 - Throw a TypeError when Array.isArray is passed a revoked proxy. r=efaust 2015-08-23 01:10:24 -07:00
Tom Schuster
62062f042f Bug 603201 - Change GetProperty receiver argument to Value in the browser. r=smaug 2015-09-18 00:14:41 +02:00
Jan de Mooij
c6596c5fa8 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 23:22:11 +01:00
Phil Ringnalda
1a1c158706 Backed out changeset 0c030f97a04f (bug 1144366) for being on top of patches being backed out
CLOSED TREE
2015-03-28 10:39:56 -07:00
Jan de Mooij
369ef1b850 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Blake Kaplan
a2a346563e Bug 1145854 - Don't leak WrapperOwner::className's string. r=billm 2015-03-27 13:12:37 -07:00
Jason Orendorff
a62fc1c850 Bug 1142794 - Change 'receiver' argument to SetProperty functions and ProxyHandler::set methods to be a HandleValue. r=Waldo.
Also: Change signature of these functions and methods to all have the same arguments in the same order: (cx, obj, id, v, receiver). Also change v from MutableHandleValue to HandleValue.

There is no change in behavior.

In fact the new error message `JSMSG_SET_NON_OBJECT_RECEIVER` is
impossible to trigger from scripts for now, I think (after re-reading
the whole patch with this in mind). JS_ForwardSetPropertyTo is the only
way to get a non-object receiver into the engine, but no caller
currently does so.

We're installing new pipes here, and they should work, but for now it's
the same cold water flowing through as before. Actually hooking up the
hot water is left for another bug (one with tests, not to put too fine a
point on it).

Notes:

*   InvokeGetterOrSetter had to be split into two functions:
    InvokeGetter takes a MutableHandleValue out-param,
    InvokeSetter a HandleValue in-param.

*   Watchpoints can still tamper with values being assigned. So can
    JSSetterOps. I'm pleased we can support this craziness in a way that
    doesn't have to spread via the type system to encompass the entire
    codebase.

*   Change in GlobalObject::setIntrinsicValue is not really a change.
    Yes, it asserted before, but an exception thrown during self-hosting
    initialization is not going to go unnoticed either.

*   Since the receiver argument to js::SetProperty() is at the end now, it
    makes sense for it to be optional. Some callers look nicer.
2015-03-01 13:16:19 -06:00
Jason Orendorff
7fdeaf63be Bug 1113369, part 7 - [[SetPrototypeOf]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-05 16:36:50 -06:00
Jason Orendorff
6e6ba315a5 Bug 1113369, part 6 - [[PreventExtensions]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-04 12:01:01 -06:00
Jason Orendorff
20beb2cc48 Bug 1113369, part 5 - [[Delete]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-04 10:20:04 -06:00
Jason Orendorff
b180889659 Bug 1113369, part 4 - [[Set]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-03 19:51:40 -06:00
Jason Orendorff
1d3bb8fb3d 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
Gabor Krizsanits
1f68802408 Bug 1090592 - GetPrototypeOf hook for CPOWProxyHandler. r=billm 2015-02-10 16:29:41 +01:00
Kyle Huey
3f5b8810c4 Bug 1121673: Use move references in IPDL. r=bent 2015-01-16 11:58:52 -08:00
Bill McCloskey
e4c6f4d046 Bug 1091964 - [e10s] Cache isCallable and isConstructor for CPOWs (r=mrbkap) 2014-11-04 17:39:34 -08:00
Carsten "Tomcat" Book
7824d7d4a9 Backed out changeset 5992aea01aff (bug 1091964) 2014-11-05 10:03:06 +01:00
Bill McCloskey
8eeffe9d73 Bug 1091964 - [e10s] Cache isCallable and isConstructor for CPOWs (r=mrbkap) 2014-11-04 17:39:34 -08:00
Jeff Walden
7eab2a3226 Bug 1085566 - Make the preventExtensions hook return succeeded/failed rather than always indicate failure by reporting an error. r=efaust 2014-10-19 01:18:43 -07:00
Carsten "Tomcat" Book
77dee816cc Backed out changeset 9e900e87b4bb (bug 1085566) 2014-10-22 08:59:09 +02:00
Jeff Walden
58c90aac1c Bug 1085566 - Make the preventExtensions hook return succeeded/failed rather than always indicate failure by reporting an error. r=efaust 2014-10-19 01:18:43 -07:00
Tom Schuster
b22d3e39c2 Bug 1071177 - Support symbol keys and throw exception on unique symbols with CPOWs. r=billm 2014-10-16 18:39:38 +02:00
Jason Orendorff
6edb7ff2c9 Bug 1026918, part 3 - Rename mozilla::jsipc::PJavaScript::GetPropertyNames -> GetPropertyKeys. r=billm. 2014-09-26 19:52:45 -05:00
Bill McCloskey
e50f512e2a Bug 1049879 - Remove urgent and rpc message types and replace with message priorities (r=dvander,bent,ehsan) 2014-10-07 21:32:45 -07:00
Carsten "Tomcat" Book
bb279bb4db Backed out changeset e56bf4ea89fb (bug 1049879) for bustage in emulator debug builds on a CLOSED TREE 2014-10-08 08:03:57 +02:00
Bill McCloskey
17d3a90266 Bug 1049879 - Remove urgent and rpc message types and replace with message priorities (r=dvander,bent,ehsan) 2014-10-07 21:32:45 -07:00
Tom Schuster
37f7f44bd6 Bug 1071177 - Introduce JSIDVariant type for CPOWs. r=billm 2014-10-07 11:29:02 +02:00
Bobby Holley
4a24838d94 Bug 1067009 - Implement regexp_toShared for CPOWs. r=billm 2014-10-01 17:22:15 +02:00
Bobby Holley
4088e55174 Bug 1065811 - Clean up ObjectId handling with static type checking. r=billm
While adding the CPOW flag for xray waivers, I discovered a bunch of
inconsistency and sloppiness with respect to our handling of object ids,
and a general lack of clarity about when the id included flags or not. Given
the fact that I'm removing static callability for CPOWs, we _could_ just get
rid of the flags, and store the xray waiver state on the answer-side only. But
I eventually decided that these kinds of flags (which are accessible to both
the Answer _and_ the Owner) had enough potential utility that they were worth
cleaning up.

It's worth noting that that utility comes with the large caveat that the flags
can't be trusted for security-sensitive decisions (at least in the parent->child
case), since they could be forged by a compromised child.
2014-09-25 13:13:29 +02:00
Bobby Holley
c504a51772 Bug 1065811 - Stop statically computing callability/constructibility on CPOWs. r=billm 2014-09-25 13:13:29 +02:00
Bill McCloskey
1aca5bb6bc Bug 1060042 - CPOWs need a hasInstance hook (r=mrbkap) 2014-09-10 17:15:40 -07:00
Ehsan Akhgari
9918ac3b8c Bug 1060988 - Fix more bad implicit constructors in JS IPC code; r=billm 2014-08-31 21:10:16 -04:00
Bill McCloskey
b0f8504319 Bug 1017109 - Add construct hook for CPOWs (r=mrbkap) 2014-06-30 17:50:58 -07:00
Bill McCloskey
48c0146002 Bug 1029202 - Allow CPOW receivers to be non-CPOWs (r=mrbkap) 2014-06-30 17:48:09 -07:00
Bill McCloskey
6582876747 Bug 996785 - Bidirectional CPOWs (r=mrbkap) 2014-05-16 16:40:37 -07:00
Bill McCloskey
6f8d4ab2d7 Bug 996785 - Move CPOW wrapper answering code (r=mrbkap) 2014-05-16 16:40:36 -07:00
Bill McCloskey
a6ad990683 Bug 996785 - Move CPOW wrapper owner code (r=mrbkap) 2014-05-16 16:40:36 -07:00