Commit Graph

483 Commits

Author SHA1 Message Date
Boris Zbarsky
a15042e414 Bug 1348095 part 3. Cache the proto of an Xray on its holder, so we don't have to keep re-wrapping it. r=bholley
MozReview-Commit-ID: I78AoSB3TNW
2017-03-23 03:06:25 -04:00
Boris Zbarsky
cdca354d65 Bug 1348095 part 2. Give all the Xray holders a JSClass that has a slot for caching a prototype. r=bholley
MozReview-Commit-ID: ID9vMG3iJfZ
2017-03-23 03:06:25 -04:00
Boris Zbarsky
483138aaef Bug 1348095 part 1. Remove the unused reserved slots from the XPCWN xray holder. r=bholley
MozReview-Commit-ID: 5IRrE8EmL9A
2017-03-23 03:06:25 -04:00
Carsten "Tomcat" Book
35ac4117d3 Backed out changeset 60471d1feaa4 (bug 1348095) for bustage 2017-03-23 08:46:07 +01:00
Carsten "Tomcat" Book
025004111a Backed out changeset 3efe3c6f4e7f (bug 1348095) 2017-03-23 08:45:48 +01:00
Carsten "Tomcat" Book
3dbcd17f6b Backed out changeset 8ba41a1bd062 (bug 1348095) 2017-03-23 08:45:45 +01:00
Boris Zbarsky
71e2201a88 Bug 1348095 part 3. Cache the proto of an Xray on its holder, so we don't have to keep re-wrapping it. r=bholley
MozReview-Commit-ID: I78AoSB3TNW
2017-03-23 03:06:25 -04:00
Boris Zbarsky
7293b20745 Bug 1348095 part 2. Give all the Xray holders a JSClass that has a slot for caching a prototype. r=bholley
MozReview-Commit-ID: ID9vMG3iJfZ
2017-03-23 03:06:25 -04:00
Boris Zbarsky
654fb79c54 Bug 1348095 part 1. Remove the unused reserved slots from the XPCWN xray holder. r=bholley
MozReview-Commit-ID: 5IRrE8EmL9A
2017-03-23 03:06:25 -04:00
Sylvestre Ledru
4c790b3a90 Bug 1338086 - Remove useless else blocks in order to reduce complexity in js/ r=bbouvier
MozReview-Commit-ID: Giwp0K1YoBH
2017-02-14 15:50:56 +01:00
Brian Hackett
6a2580c190 Bug 1324002 - Mark atoms separately in each zone, r=jonco,mccr8,peterv. 2017-01-30 06:31:47 -07:00
Tom Schuster
22c65024d2 Bug 1333073 - Enable DataView Xray. r=bz 2017-01-28 21:52:45 +01:00
Boris Zbarsky
fdbb2d3915 Bug 1332713 part 3. Implement a version of XrayAwareCalleeGlobal that works for specialized getters. r=bholley
The problem is that JSJitGetterInfo doesn't contain a callee.  So we can't use
xpc::XrayAwareCalleeGlobal in a specialized getter, because we don't have our
callee function available.
2017-01-27 18:53:36 -05:00
Nicholas Nethercote
41f100680b Bug 1329846 (part 2) - Remove NATIVE_HAS_FLAG. r=mccr8.
It's only used in three places, and it no longer makes the code more readable.
2017-01-11 07:40:19 +11:00
Nicholas Nethercote
18f63503a5 Bug 1329846 (part 1) - Remove XPCNativeScriptableInfo. r=mccr8.
XPCNativeScriptableInfo is now a very thin wrapper around nsIXPCScriptable, and
it uses manual memory management. Removing it simplifies things quite a bit.

In particular, when setting XPCWrappedNative::mScriptable in
XPCWrappedNative::WrapNewGlobal() and XPCWrappedNative::Init() we no longer
have to worry about sharing the XPCNativeScriptableInfo object with the proto.
And XPCWrappedNative::{Init,Destroy}() have similar simplifications.
2017-01-10 12:47:57 +11:00
Boris Zbarsky
7e873263f0 Bug 1322415. Fix property enumeration on cross-origin windows to include indexed props, and add some tests for the ordering of the indexed, named, and symbol-named props on cross-origin objects (window and location). r=bholley 2016-12-13 13:14:43 -05:00
Tom Schuster
bc9bad94c6 Bug 1192038 - Update RegExp Xray code. r=bholley,arai 2016-11-26 19:17:39 +01:00
Tom Schuster
a047bf22ef Bug 1213341 - Simplify Error Xray code. r=bholley 2016-11-22 20:53:38 +01:00
Tom Schuster
4f7d49c13b Bug 1155700 - Enable Map/Set Xrays. r=bz 2016-11-19 01:17:53 +01:00
Tom Schuster
e7aac3f9e0 Bug 1015798 - Add int32 type to PropertySpec. r=arai 2016-11-08 22:08:28 +01:00
Boris Zbarsky
2a2bf6092c Bug 1021289 part 4. Implement support for WebIDL deleters over Xrays. r=peterv 2016-11-04 12:41:26 -04:00
Boris Zbarsky
6daf80f962 Bug 1021289 part 1. Change XrayWrapper::delete_ to call through to the traits delete_ method if the property doesn't actually exist on the expando. r=peterv 2016-11-04 12:41:26 -04:00
Tom Schuster
e167ae3181 Bug 1130988 - Add SharedArrayBuffer to JSXray. r=bz 2016-10-29 20:11:42 +02:00
Tom Schuster
d7b85e18f7 Bug 1248865 - Some small changes to JSXray and tests. r=bz 2016-10-25 10:18:40 +02:00
Boris Zbarsky
9415b02a01 Bug 946906 part 8. When getting a cacheable property off a DOM Xray, cache it on the Xray's expando object. r=bholley 2016-10-10 18:16:26 -04:00
Boris Zbarsky
a4b57886a2 Bug 946906 part 6. Clear the relevant slots on Xray expandos when clearing cached slots on a DOM object. r=bholley 2016-10-10 18:16:26 -04:00
Boris Zbarsky
0a18a05583 Bug 946906 part 5. Use the codegenned JSClass, if available, when creating Xray expando objects. r=bholley 2016-10-10 18:16:26 -04:00
Boris Zbarsky
2e545432d8 Bug 946906 part 3. Create a macro for declaring Xray expando classes, and move the default Xray expand class definition to bindings code. r=bholley 2016-10-10 18:16:25 -04:00
Boris Zbarsky
cd84de07f9 Bug 946906 part 2. Declare XrayExpandoObjectClassOps in XrayWrapper.h so we can use it from bindings code. r=bholley 2016-10-10 18:16:25 -04:00
Boris Zbarsky
8d298dc273 Bug 946906 part 1. Move the ExpandoSlots enum to XrayWrapper.h. r=bholley
The other option, of course, is to just define an "expando slot count" constant
in the header and then static_assert it has the right value once the
ExpandoSlots enum is declared.
2016-10-10 18:16:25 -04:00
Tooru Fujisawa
a5294e0308 Bug 1289050 - Part 1: Use ASCII variant of JS_ReportError in simple case. r=jwalden 2016-08-14 20:39:28 +09:00
Boris Zbarsky
c4d991847b Bug 1302849 part 1. Remove the now-dead SCSecurityXrayXPCWN thing. r=mrbkap 2016-09-15 11:41:45 -04:00
Jan de Mooij
21f6f04f90 Bug 1302448 part 2 - Rename XPCJSRuntime to XPCJSContext. r=mrbkap 2016-09-14 15:48:17 +02:00
Tom Schuster
faedc0de60 Bug 1299321 - Make DOM/Xray handle string values in JSPropertySpec. r=peterv 2016-09-02 18:39:50 +02:00
Jon Coppeard
66a80788eb Bug 1296688 - Add JSCLASS_FOREGROUND_FINALIZE flag r=sfink r=smaug 2016-08-24 14:18:10 +01:00
Tom Schuster
62b6679fa2 Bug 1114580 - Define getBuiltinClass on Xray. r=peterv 2016-08-18 10:59:36 +02:00
Boris Zbarsky
8c056aea7a Bug 1291142. Ensure that we don't return gray objects when getting child windows by name or index. r=bholley 2016-08-02 11:06:25 -07:00
Botond Ballo
f5f305a264 Bug 1289608 - Define XrayWrapper<...>::singleton for all instantiations, instead of defining specializations for specific ones. r=bholley
MozReview-Commit-ID: GecaSstpxRQ
2016-07-29 16:40:08 -04:00
Boris Zbarsky
519cbb38a4 Bug 1281276 part 5. Get rid of the LangType argument of the XPCCallContext constructor and the now-dead language type enums. r=bholley 2016-06-23 00:22:29 -04:00
Jeff Walden
51488fefe9 Bug 888969 - Make the getPrototypeOf/setPrototypeOf traps scriptable. r=efaust, r=bholley 2016-02-23 13:42:30 -08:00
Nicholas Nethercote
a35143c546 Bug 1261723 (part 2) - Separate class ops from js::Class. code=njn,h4writer. r=efaust,bz.
js::Class op are often all null. And when they're not all null, they're often
duplicated among classes. By pulling them out into their own struct, and using a
(possibly null) pointer in js::Class, we can save 114 KiB per process on
64-bit, and half that on 32-bit.
* * *
imported patch separate-ClassOps-2
2016-04-01 11:00:01 +11:00
Nicholas Nethercote
2e87fb6483 Bug 1260984 (part 3) - Separate js::ClassSpec from js::Class. r=jorendorff.
js::ClassSpec is often all null. When it's not all null, it's often duplicated
among classes. By pulling it out into its own struct, and using a (possibly
null) pointer in js::Class, we can save 138 KiB per process on 64-bit, and half
that on 32-bit.
2016-04-01 10:59:54 +11:00
Till Schneidereit
28fb965537 Bug 911216 - Part 7: Implement ES6 Promises in the JavaScript engine. r=efaust 2015-11-10 12:34:00 +01:00
Tom Schuster
ec0ec57aca Bug 1256688 - Continue using getPropertyDescriptor for has in XrayWrapper. r=peterv 2016-03-19 01:30:03 +01:00
Benjamin Bouvier
e9e5750ced Bug 1251308; r=luke
MozReview-Commit-ID: AqsMX4m7Qh9
2016-03-09 11:20:11 +01:00
Till Schneidereit
a238951051 Bug 1254968 - Add support for running JS builtins' constructors over Xray wrappers without unwrapping the newTarget. r=bholley,f=bz 2016-02-10 23:09:13 +01:00
Boris Zbarsky
f99662f676 Bug 1254293. Fix dom::GetArrayIndexFromId to actually follow the spec for large indices (i.e. ones that don't fit in in int32_t). r=peterv 2016-03-08 17:21:40 -05:00
Peter Van der Beken
dd98d2022e Bug 1248478 - Remove some obsolete code in XrayWrapper.cpp. r=bholley. 2016-02-16 19:30:49 +01:00
Boris Zbarsky
74de217760 Bug 1243824. Add support for static functions and attributes on JSXrays. r=bholley 2016-02-05 10:41:08 -05:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00