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

97 Коммитов

Автор SHA1 Сообщение Дата
Jeff Walden 5f081085e8 Bug 949220 - Make |NewProxyObject| return only non-singletons, and add |NewSingletonProxyObject| for the singleton case. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D70502

--HG--
extra : moz-landing-system : lando
2020-04-14 16:57:15 +00:00
Bogdan Tara 669bffcf00 Backed out 30 changesets (bug 949220) for assertion failure on JSObject.cpp CLOSED TREE
Backed out changeset b077b434866d (bug 949220)
Backed out changeset 437dc6f1a0b1 (bug 949220)
Backed out changeset 9043d3f4ea6f (bug 949220)
Backed out changeset 761005340836 (bug 949220)
Backed out changeset 650ccbbc2e15 (bug 949220)
Backed out changeset b7459076dbf5 (bug 949220)
Backed out changeset e1ac27ee38e2 (bug 949220)
Backed out changeset 5c07df930240 (bug 949220)
Backed out changeset 42312dec52aa (bug 949220)
Backed out changeset ca28434cf70f (bug 949220)
Backed out changeset c8322158294f (bug 949220)
Backed out changeset 817de77f7cf1 (bug 949220)
Backed out changeset 097d29b3ed26 (bug 949220)
Backed out changeset a2a3821dcc6e (bug 949220)
Backed out changeset cf4659d06791 (bug 949220)
Backed out changeset 53c4c74abb23 (bug 949220)
Backed out changeset a4a124e8f193 (bug 949220)
Backed out changeset 53a89cfb8c24 (bug 949220)
Backed out changeset 69e8d2e49ee1 (bug 949220)
Backed out changeset afb91f3ce31e (bug 949220)
Backed out changeset 43ff0c2fc3dc (bug 949220)
Backed out changeset eda9a8e621b3 (bug 949220)
Backed out changeset 93b33661e87b (bug 949220)
Backed out changeset ddf62ab9e8cc (bug 949220)
Backed out changeset 62fff9f3a631 (bug 949220)
Backed out changeset 45e22642cd49 (bug 949220)
Backed out changeset 54f48761a664 (bug 949220)
Backed out changeset c0d4d9557fac (bug 949220)
Backed out changeset 98ac0d0d392c (bug 949220)
Backed out changeset 2d677ae71924 (bug 949220)
2020-04-14 13:17:51 +03:00
Jeff Walden 17320991d7 Bug 949220 - Make |NewProxyObject| return only non-singletons, and add |NewSingletonProxyObject| for the singleton case. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D70502

--HG--
extra : moz-landing-system : lando
2020-04-14 08:37:31 +00:00
Jeff Walden 62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
André Bargull 8d8f78e33b Bug 1595745 - Part 10: Change Proxy to use ClassSpec. r=mgaudet
Proxy JSClasses are defined through a special macro (`PROXY_CLASS_DEF`), which
ensures all Proxy related bits are set correctly. The macro doesn't allow to
specify a ClassSpec, so we need to add a new macro which supports that
functionality.

Differential Revision: https://phabricator.services.mozilla.com/D52666

--HG--
extra : moz-landing-system : lando
2019-11-15 17:42:55 +00:00
Cosmin Sabou bc322e0381 Backed out 16 changesets (bug 1595745) for spidermonkey bustages on testWasm.cpp. CLOSED TREE
Backed out changeset 3b5c6aaf5a18 (bug 1595745)
Backed out changeset 8e8c4124f219 (bug 1595745)
Backed out changeset de5c2cca64c6 (bug 1595745)
Backed out changeset b11677f10f9d (bug 1595745)
Backed out changeset 2ce96c6187c2 (bug 1595745)
Backed out changeset e089ebe699d2 (bug 1595745)
Backed out changeset a514661afdda (bug 1595745)
Backed out changeset 29ec5ccb4adf (bug 1595745)
Backed out changeset 3b0e242d762a (bug 1595745)
Backed out changeset fef5c8d5cb90 (bug 1595745)
Backed out changeset 68c5cdced300 (bug 1595745)
Backed out changeset d5f5e9091fb0 (bug 1595745)
Backed out changeset 6c917c2ca4a7 (bug 1595745)
Backed out changeset 338ad438e066 (bug 1595745)
Backed out changeset 61d25028669b (bug 1595745)
Backed out changeset f082e5173ed4 (bug 1595745)
2019-11-15 18:17:31 +02:00
André Bargull 34c067eaa6 Bug 1595745 - Part 10: Change Proxy to use ClassSpec. r=mgaudet
Proxy JSClasses are defined through a special macro (`PROXY_CLASS_DEF`), which
ensures all Proxy related bits are set correctly. The macro doesn't allow to
specify a ClassSpec, so we need to add a new macro which supports that
functionality.

Differential Revision: https://phabricator.services.mozilla.com/D52666

--HG--
extra : moz-landing-system : lando
2019-11-15 15:55:26 +00:00
Jon Coppeard d4f47d27ad Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell
The final huge patch. This is a search-and-replace removal of js::Class followed by clang-format and removal of the alias from TypeDecls.h.

Depends on D41986

Differential Revision: https://phabricator.services.mozilla.com/D41987

--HG--
extra : moz-landing-system : lando
2019-08-14 19:13:12 +00:00
Jon Coppeard e22ceecec6 Bug 1573508 - Replace internal references to js::ClassOps with JSClassOps and remove the alias r=tcampbell
Another big patch. This a search-and-replace followed by mach clang-format, and removal of the js::ClassOps alias from Class.h.

Differential Revision: https://phabricator.services.mozilla.com/D41761

--HG--
extra : moz-landing-system : lando
2019-08-14 10:00:05 +00:00
Andrew McCreight 6633271226 Bug 1570484 - Nuke Xray waivers for remote outer window proxies. r=bzbarsky,tcampbell,jonco
Remote outer window proxies can't be the target of a CCW, because if
you attempt to wrap them we just create a new outer window proxy.
Therefore, they can't be the target of an Xray wrapper, so they can't
have Xray waivers that do anything useful. However, if we do a
navigation from a local iframe to a remote iframe, we'll transplant a
remote outer window proxy onto a local outer window proxy, which might
have an Xray. This can cause some issues, particularly if we later
navigate back to a different local window.

To work around this, this patch nukes Xray waivers on navigation to a
remote outer window proxy. This makes Xray waiver behavior
inconsistent with the non-Fission behavior, but it is safer to leave
the non-Fission behavior alone for now, for fear of breaking addons.

Differential Revision: https://phabricator.services.mozilla.com/D40116

--HG--
extra : moz-landing-system : lando
2019-08-05 16:32:31 +00:00
Brindusan Cristian 2d3a2752f0 Backed out changeset 344a525cddbc (bug 1570484) for spidermonkey bustage at BaseProxyHandler.cpp:389:25. CLOSED TREE 2019-08-05 18:25:24 +03:00
Andrew McCreight 9dc3bbe1f0 Bug 1570484 - Nuke Xray waivers for remote outer window proxies. r=bzbarsky,tcampbell,jonco
Remote outer window proxies can't be the target of a CCW, because if
you attempt to wrap them we just create a new outer window proxy.
Therefore, they can't be the target of an Xray wrapper, so they can't
have Xray waivers that do anything useful. However, if we do a
navigation from a local iframe to a remote iframe, we'll transplant a
remote outer window proxy onto a local outer window proxy, which might
have an Xray. This can cause some issues, particularly if we later
navigate back to a different local window.

To work around this, this patch nukes Xray waivers on navigation to a
remote outer window proxy. This makes Xray waiver behavior
inconsistent with the non-Fission behavior, but it is safer to leave
the non-Fission behavior alone for now, for fear of breaking addons.

Differential Revision: https://phabricator.services.mozilla.com/D40116

--HG--
extra : moz-landing-system : lando
2019-08-05 14:55:43 +00:00
Yoshi Cheng-Hao Huang 222255214e Bug 1534967 - Part 1: use RootedIdVector. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D25042
2019-04-08 10:46:53 +08:00
Jan de Mooij 13c7bd6d2c Bug 1525674 part 1 - Change the enumerate proxy trap to return the jsid vector instead of an iterator. r=bzbarsky,evilpie
In vm/Iteration.cpp this inlines some functions because there's a single
caller now. Follow-up patches will do additional cleanup/optimization.

Differential Revision: https://phabricator.services.mozilla.com/D18926

--HG--
extra : moz-landing-system : lando
2019-02-08 08:17:00 +00:00
Tom Schuster 35523d50cc Bug 1156077 - Remove the non-standard Proxy getPropertyDescriptor trap. r=bzbarsky,jorendorff
I am bit surprised myself, but just removing the getPropertyDescriptor trap seems to mostly work.
The only real special case here is the XPC Sandbox, which I changed to keep using its getPropertyDescriptorImpl.

testSetPropertyIgnoringNamedGetter.cpp didn't even really need its getPropertyDescriptor implementation.

Differential Revision: https://phabricator.services.mozilla.com/D17386

--HG--
extra : moz-landing-system : lando
2019-01-25 16:41:34 +00:00
Steve Fink 10953d54c2 Bug 1513108 - Remove the separate class extension hook for getting a weakmap key delegate, r=jonco
Replace with just unwrapping the key, since there are no users that return anything else for a delegate.

--HG--
extra : rebase_source : e72b825121ca3493364c9347f65e5dddd1ef53e0
2018-12-07 14:38:01 -08:00
Jon Coppeard 6f81506124 Bug 1463462 - Make gray marking assertions call a JSAPI function r=sfink 2018-12-06 16:28:10 -05:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan de Mooij bccfe7c569 Bug 1508065 - Change JS_PUBLIC_{API,DATA} and JS_FRIEND_{API,DATA} to be more like similar macros to avoid confusing clang-format. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12256

--HG--
extra : moz-landing-system : lando
2018-11-19 17:02:47 +00:00
Ted Campbell 8c500290c1 Bug 1503994 - Fixup js Proxy doc comments r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10716

--HG--
extra : moz-landing-system : lando
2018-11-05 09:09:45 +00:00
Jan de Mooij ab644b087f Bug 1488698 - Always use braces for if/for/while statements in js/public. r=jandem
--HG--
extra : rebase_source : 075f0747c9256fee67925853b501b7a3549cebba
2018-09-06 12:11:07 +02:00
André Bargull 94cab79237 Bug 1485066 - Part 9: Additional miscellaneous clean-ups around EncodeString callers. r=Waldo 2018-09-05 01:25:11 -07:00
Cosmin Sabou 1f0a42def4 Backed out 14 changesets (bug 1485066) for build bustages on MessageManagerFuzzer. CLOSED TREE
Backed out changeset e40f67f15bf1 (bug 1485066)
Backed out changeset f09bc4d5fdcc (bug 1485066)
Backed out changeset 939e27aa2d59 (bug 1485066)
Backed out changeset d50fcf82556c (bug 1485066)
Backed out changeset 5cbc0ae0117a (bug 1485066)
Backed out changeset 09b5382e0baf (bug 1485066)
Backed out changeset 6676e8fedcb3 (bug 1485066)
Backed out changeset 28e7e61c11ec (bug 1485066)
Backed out changeset b08b0cfc1dbe (bug 1485066)
Backed out changeset 8defc9eabfac (bug 1485066)
Backed out changeset bf167b0a3af3 (bug 1485066)
Backed out changeset 4f89260d5e30 (bug 1485066)
Backed out changeset c22fc17c9d87 (bug 1485066)
Backed out changeset d35bb63dbc1d (bug 1485066)
2018-09-05 15:54:03 +03:00
André Bargull 2d594ec24f Bug 1485066 - Part 9: Additional miscellaneous clean-ups around EncodeString callers. r=Waldo 2018-09-05 01:25:11 -07:00
Ted Campbell ab67c3fb81 Bug 1471272 - Add [SMDOC] tags for in-source documentation. r=jandem,nbp
MozReview-Commit-ID: I038aYgvwe4
2018-06-28 15:23:25 -04:00
Jan de Mooij f57cb4a925 Bug 1454592 part 2 - Get rid of a static constructor for protoTable array. r=jonco 2018-04-20 13:07:14 +02:00
Gurzau Raul f4056b78d5 Backed out 2 changesets (bug 1454592) for Windows build bustage on a CLOSED TREE
Backed out changeset 82821ff143e3 (bug 1454592)
Backed out changeset 89504aa6f1b3 (bug 1454592)
2018-04-20 15:27:12 +03:00
Jan de Mooij ff6fca9c9e Bug 1454592 part 2 - Use constexpr for protoTable static array. r=jonco 2018-04-20 13:07:14 +02:00
Jon Coppeard 8c8071aed3 Bug 1443468 - Suppress gray marking assertion during maniupulation of internal GC state r=sfink 2018-04-20 10:09:52 +02:00
André Bargull c58317ae7c Bug 1447442 - Part 6: Pass Handle<GlobalObject*> in ClassInitializerOp. r=jorendorff
--HG--
extra : rebase_source : 14883f96b9df11ae22cf427e104a8a2689b1e4bb
2018-04-13 02:26:00 -07:00
Sebastian Hengst ec371d68d4 Bug 525063 - Backing out js/public/ for violation of committing guidelines. a=backout 2018-04-12 22:15:26 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jon Coppeard b188b2d674 Bug 1399866 - Add gray marking asserts to proxy write functions r=sfink 2018-02-16 11:40:04 +00:00
Jan de Mooij 03f5b1346f Bug 1113014 - Don't emit a branch in LoadDOMPrivate if we know the object kind (native or proxy) statically. r=bz
--HG--
extra : rebase_source : 6648791a98335471d84afbcff73d4801d80e602d
2018-01-12 12:47:19 +01:00
Tom Schuster 7a6aff2c7e Bug 638054 - Remove watch class-hook and proxy trap r=jorendorff,bz 2017-10-24 20:48:14 +02:00
Jon Coppeard 8bd8591183 Bug 1396613 - Make proxy objects override handler's objectMoved method rather than using class hook r=sfink r=mccr8 r=peterv 2017-09-19 12:31:30 +01:00
Jon Coppeard 1077972535 Bug 1396613 - Update the object moved hook to allow it to be called when tenuring nursery objects r=sfink r=mccr8 2017-09-19 12:31:30 +01:00
Jan de Mooij 7e5724db61 Bug 1383775 - Clean up function toString/toSource code, remove remnants of source decompiler. r=anba 2017-07-25 13:22:11 +02:00
Jan de Mooij 5c5ead5942 Bug 1379461 - Refactor code to return RegExpShared* directly instead of using bool + outparam. r=evilpie,sfink 2017-07-11 11:31:12 +02:00
Carsten "Tomcat" Book 93c690a082 Backed out changeset 3a0a2ffe803b (bug 1379461) for hazard failure 2017-07-11 12:59:09 +02:00
Jan de Mooij 669d53bfea Bug 1379461 - Refactor code to return RegExpShared* directly instead of using bool + outparam. r=evilpie 2017-07-11 11:31:12 +02:00
Boris Zbarsky 4e52e48eb1 Bug 1377055. Assert that JSCLASS_SKIP_NURSERY_FINALIZE is not used on proxies. r=jonco 2017-06-30 17:31:41 -07:00
Jan de Mooij 53de04c6f6 Bug 1375505 part 1 - Change iterator code to return JSObject* instead of returning bool + outparam. r=evilpie 2017-06-28 21:00:43 -07:00
Jan de Mooij 8ddc231e13 Bug 1360523 - Define number of reserved slots explicitly for each proxy js::Class. r=bz 2017-04-29 14:41:49 +02:00
Jan de Mooij f480e9ecdf Bug 1237504 - Refactor proxy slot layout to allow proxies to have more than 2 slots. r=bz,jonco
The patch makes the following proxy changes:

* The number of slots in ProxyValueArray is now dynamic and depends on the number of reserved slots we get from the Class.
* "Extra slots" was renamed to "Reserved slots" to make this clearer.
* All proxy Classes now have 2 reserved slots, but it should be easy to change that for proxy Classes that need more than 2 slots.
* Proxies now store a pointer to these slots and this means GetReservedSlot and SetReservedSlot can be used on proxies as well. We no longer need GetReservedOrProxyPrivateSlot and SetReservedOrProxyPrivateSlot.

And some changes to make DOM Proxies work with this:

* We now store the C++ object in the first reserved slot (DOM_OBJECT_SLOT) instead of in the proxy's private slot. This is pretty nice because it matches what we do for non-proxy DOM objects.
* We now store the expando in the proxy's private slot so I removed GetDOMProxyExpandoSlot and changed the IC code to get the expando from the private slot instead.
2017-04-28 14:12:28 +02:00
Jon Coppeard 541762d31f Bug 1345177 - Remove use of RegExpGuard r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard 973692b373 Bug 1345177 - Make RegExpShared a GC thing r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard 1376c2700e Backed out changesets e66f564d9749 and 0380d914ad39 (bug 1345177) for rooting hazards 2017-03-27 11:09:54 +01:00