Commit Graph

483 Commits

Author SHA1 Message Date
Ryan VanderMeulen
5637c1012e Backed out bug 789897 due to regressions. 2013-03-29 14:07:32 -04:00
Eddy Bruel
c521e0e1c2 Bug 789897 - Implement a preventExtensions trap for proxies. Patch is a semi-tag-team effort with jwalden. r=jwalden, r=ejpbruel, r=bholley, r=two-turtle-doves-and-a-partridge-in-a-pear-tree 2013-03-22 19:43:12 -07:00
Eddy Bruel
80092eeaa8 Bug 789897 - Implement an isExtensible trap for proxies. Patch is a semi-tag-team effort with jwalden. r=jwalden, r=ejpbruel, r=bholley, r=two-turtle-doves-and-a-partridge-in-a-pear-tree 2013-03-22 19:43:03 -07:00
David Zbarsky
1623a8ecd6 Bug 847007: Remove nsIContent includes r=Ms2ger 2013-03-21 20:05:20 -04:00
Tom Schuster
a2f87bfeac Bug 828462 - Root Proxy/Wrapper in the browser. r=terrence,bz 2013-03-21 23:23:48 +01:00
Tom Schuster
262f6ec5cf Bug 828462 - Root Proxy/Wrapper delete. r=terrence 2013-03-21 23:23:48 +01:00
Tom Schuster
2ed5bd5464 Bug 828462 - Root Proxy/Wrapper getOwnPropertyNames and keys. r=terrence 2013-03-21 23:23:47 +01:00
Tom Schuster
bf1dbb9e61 Bug 828462 - Root Proxy/Wrapper defineProperty. r=terrence 2013-03-21 23:23:47 +01:00
Tom Schuster
c65c3d9eca Bug 828462 - Root Proxy/Wrapper get(Own)PropertyDescriptor. r=terrence 2013-03-21 23:23:47 +01:00
Mohit Gahlot
0084e14ed5 Bug 851377 - Now ResolvingId::isResolving is not called with a null object. r=bholley 2013-03-18 21:28:05 +05:30
Bobby Holley
0d874986e2 Bug 851987 - QI to nsPIDOMWindow instead of nsIDOMWindow in XPCWrappedJS. r=bz 2013-03-18 14:30:23 -07:00
Bobby Holley
bd5a123f39 Bug 850517 - Support named window access via Xray. r=mrbkap 2013-03-14 22:38:26 -07:00
Jon Coppeard
66d2e2f630 Bug 848395 - GC: Move Rooted to JS namespace - rename js::Rooted to JS::Rooted outside SpiderMonkey r=terrence 2013-03-06 16:41:43 +00:00
Ed Morley
0e54ea5e7a Backed out changeset 28ef4bdff455 (bug 848395) 2013-03-07 13:03:35 +00:00
Jon Coppeard
76e226089a Bug 848395 - GC: Move Rooted to JS namespace - rename js::Rooted to JS::Rooted outside SpiderMonkey r=terrence 2013-03-06 16:41:43 +00:00
Bobby Holley
098471a0cb Bug 836301 - Hoist some assertions, remove a bunch of no-op trap overrides, and add assertions that we've entered our policy. r=mrbkap 2013-02-25 13:54:18 -08:00
Bobby Holley
f10e33a90c Bug 836301 - Hoist enter() calls from {Xray,}Wrapper::foo into Proxy::foo. r=mrbkap 2013-02-25 13:54:18 -08:00
Bobby Holley
f205495a48 Bug 836301 - Add Special handling to allow us to call enter() for defineProperty on Xrays. r=mrbkap 2013-02-25 13:54:17 -08:00
Bobby Holley
fd29a31b36 Bug 836301 - Stop using JSRESOLVE_ASSIGNING to determine GET vs SET. r=mrbkap
This is just a heuristic, anyway, and some of the usage is downright broken.
There are two cases here:

1 - Deciding what to do for get{Own,}PropertyDescriptor. In these cases, we can
just enter with GET and rely on the filtering machinery to filter out dangerous
setters for security wrappers.

2 - Custom Xray props. None of these make sense in a |set| context. In fact,
    they generally have null setters anyway, so we can just assume GET.

The policy-entering code in XrayWrapper is super haphazard. We'll get rid of it
entirely later in these patches.
2013-02-25 13:54:17 -08:00
Phil Ringnalda
b01d7591f9 Back out 4d301b2bcad0:e0632e639097 (bug 836301) for Windows build bustage
CLOSED TREE
2013-02-22 08:41:37 -08:00
Bobby Holley
18791e1638 Bug 836301 - Hoist some assertions, remove a bunch of no-op trap overrides, and add assertions that we've entered our policy. r=mrbkap 2013-02-22 08:14:34 -08:00
Bobby Holley
20c1f60c81 Bug 836301 - Hoist enter() calls from {Xray,}Wrapper::foo into Proxy::foo. r=mrbkap 2013-02-22 08:14:34 -08:00
Bobby Holley
8e408a8fd0 Bug 836301 - Add Special handling to allow us to call enter() for defineProperty on Xrays. r=mrbkap 2013-02-22 08:14:33 -08:00
Bobby Holley
7c2b6439ed Bug 836301 - Stop using JSRESOLVE_ASSIGNING to determine GET vs SET. r=mrbkap
This is just a heuristic, anyway, and some of the usage is downright broken.
There are two cases here:

1 - Deciding what to do for get{Own,}PropertyDescriptor. In these cases, we can
just enter with GET and rely on the filtering machinery to filter out dangerous
setters for security wrappers.

2 - Custom Xray props. None of these make sense in a |set| context. In fact,
    they generally have null setters anyway, so we can just assume GET.

The policy-entering code in XrayWrapper is super haphazard. We'll get rid of it
entirely later in these patches.
2013-02-22 08:14:32 -08:00
Bobby Holley
87b22748e6 Bug 821850 - Dynamically waive Xray for field access by XBL script on bound nodes. r=bz 2013-02-08 14:24:22 +00:00
Bobby Holley
3ca6b2e8ea Bug 821850 - Expose XBL members via Xray wrappers. r=bz 2013-02-08 14:24:21 +00:00
Peter Van der Beken
acf29101bc Fix for bug 715156 (JS code no longer work for select options as array in a Greasemonkey script (index and name setters don't really work via XrayWrapper)). r=bz. 2013-01-14 11:29:48 +01:00
Ed Morley
f91e010656 Backout f3c145bd1dd2 & 5075690572a9 for OS X startup failures 2013-01-28 11:08:21 +00:00
Peter Van der Beken
e90e876d47 Fix for bug 715156 (JS code no longer work for select options as array in a Greasemonkey script (index and name setters don't really work via XrayWrapper)). r=bz. 2013-01-14 11:29:48 +01:00
Bobby Holley
c2cc83df33 Bug 823348 - Stop checking for Xray waivers in the Xray machinery. r=mrbkap
All the casese where we want to waive should now be going through WaiveXrayWrapper.
2013-01-23 06:04:39 +01:00
Bobby Holley
5fcbab19bb Bug 823348 - Do a better job of lying about the holder and make assertions fatal. r=mrbkap
I noticed this nonfatal assertion firing, unrelated to my patches. Leaking
the holder is not so great. Let's fix this for real.
2013-01-23 06:04:38 +01:00
Boris Zbarsky
9d36a38dff Bug 823228 part 2. Move indexed property access on windows from nsWindowSH::GetProperty to the outer window proxy. r=bholley 2013-01-17 12:30:37 -05:00
Jeff Walden
5c53f406c8 Bug 826447 - Change all the proxy API signatures to take unsigned flags, rather than bool set, so that it's easier to find all tests of JSRESOLVE_ASSIGNING. r=bz 2013-01-03 15:31:36 -06:00
Jeff Walden
6054ca7e90 Bug 823283 - Remove all remaining uses of JSRESOLVE_QUALIFIED, and the few remaining tests (which were pretty much purely diagnostic). r=luke 2012-09-15 11:19:55 -07:00
Bobby Holley
9e7a11c1bc Bug 808608 - Remove Xray shadowing protection infrastructure. r=mrbkap
This is now unused.
2012-11-21 13:20:05 -08:00
Peter Van der Beken
ce075761ec Fix for bug 811895 (Fix WN Xray special methods so they can take new DOM binding objects). r=bz. 2012-09-26 16:17:51 +02:00
Bobby Holley
6fb3608651 Bug 800915 - Clarify and refine the semantics of SecurityWrapper so that it is used if and only if unwrapping is unsafe. r=mrbkap
The naming scheme for Xray typedefs is the concatenation of the tuple:
({SC,}, {Security,Permissive}, Xray, {XPCWN,DOM}). This is admittedly a bit
much, but I think it's still better than explicitly doing the "typdef Foo Xray"
everywhere. Moreover, once the new DOM bindings are done, the last component
in the tuple will go away.
2012-11-14 09:56:25 -08:00
Bobby Holley
ac87f35593 Bug 808611 - Move valueOf to nsIDOMLocation. r=mrbkap 2012-11-07 08:27:23 -08:00
Boris Zbarsky
0ca99ca7bf Bug 807548. Enumerating an Xray should not see the 'constructor' property on DOM prototypes unless we're told to include non-enumerable properties. r=peterv 2012-11-05 11:58:03 -05:00
Peter Van der Beken
74736c6026 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript). r=bz.
Switch from using the interface objects from the Xrays compartment to wrapping
interface objects and interface prototype objects in Xrays. Make dom binding
Xrays deal with both instance objects and interface and interface prototype
objects.
2012-10-09 20:50:27 +02:00
Bobby Holley
9f045d1a30 Bug 803068 - Merge DirectWrapper and Wrapper. r=ejpbruel 2012-10-29 16:52:53 +01:00
Peter Van der Beken
7cda84f5e5 Fix for bug 801083 (Remove old proxy-based list bindings). r=bz. 2012-10-13 14:50:24 +02:00
Bobby Holley
fa8db46e01 Bug 793969 - Define an identity transformation at the Xray layer. r=mrbkap 2012-10-19 21:00:48 +02:00
Boris Zbarsky
6f84d8b352 Bug 798011. Deal with JS_ValueToString failing. r=gabor 2012-10-06 12:06:24 -04:00
Bobby Holley
978eb79046 Bug 761695 - Put Proxy and DOM expandos on the expando object, rather than the holder. r=peterv 2012-10-05 18:59:24 +02:00
Bobby Holley
3630080c63 Bug 761695 - Hoist expando-checking (but not expando-creating) operations into common code. r=peterv
We do this for delete_, enumerateNames, and resolveOwnProperty. This doesn't change
existing behavior, because for ProxyXrayTraits and DOMXrayTraits the expando object
will (currently) always be null.
2012-10-05 18:59:24 +02:00
Bobby Holley
11341e71c0 Bug 761695 - Create XrayTraits::resolveOwnProperty. r=peterv 2012-10-05 18:59:23 +02:00
Bobby Holley
a7127511eb Bug 761695 - Reorder checks for expandos and nodePrincipal. r=peterv
Peter and I decided this was ok. We can't hoist expando stuff otherwise.
2012-10-05 18:59:23 +02:00
Bobby Holley
351440d25e Bug 761695 - Implement expando traps for ProxyXrayTraits DOMXrayTraits. r=peterv
For new DOM proxies, we could probably use the Xray expando machinery for the
regular expando object as well, and free up one of the reserved slots. That's
more than I want to bite off for the moment, though.

I also decided not to block on bug 760095 and just kick the problem of globals
with new binding down the road a little bit.
2012-10-05 18:59:23 +02:00
Bobby Holley
8ed53fe991 Bug 761695 - Move wrapper preservation stuff into a virtual trap. r=peterv
I'm not sure this stuff is correct for non-WN objects. Hopefully that will
come out in review.

Anyway, with this change, the expando infrastructure in XrayTraits is now
fully generic and non-WN-specific. To make things work for other objects,
we now need to implement the virtual traps and hoist the code that calls the
expando machinery out of XPCWrappedNativeXrayTraits.
2012-10-05 18:59:23 +02:00