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

114 Коммитов

Автор SHA1 Сообщение Дата
Ted Campbell b172dd415c Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink
Convert all JS_FRIEND_API to JS_PUBLIC_API. At this point, the JS_PUBLIC_API has
no formal curation process and in practice we add a lot of new features to
JS_FRIEND_API without giving much thought to if they should be public. The
result is that all embedders need to use the friend API in some form and the
distinction has lost meaning.

Going forward, we should continue to use the js/public/experimental directory as
a place to expose new APIs, and in general should strive for high quality of the
APIs that are exposed. If a particular API is tricky or discouraged, comments
explaining that will be more helpful that a losely applied FRIEND_API marker.

Differential Revision: https://phabricator.services.mozilla.com/D117607
2021-06-16 19:38:10 +00:00
Steve Fink 8a6c521e59 Bug 1712397 - Add Proxy information to dumpObject r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D115746
2021-05-26 21:54:02 +00:00
Tom Schuster 3ad7d3318b Bug 1704293 - Use Maybe<PropertyDescriptor> for BaseProxyHandler::getOwnPropertyDescriptor in js/. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D111730
2021-04-19 19:51:58 +00:00
Simon Giesecke 951cfd1012 Bug 1678374 - Fix includes in js/public. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97615
2021-03-12 10:42:21 +00:00
Jan de Mooij 84c437d6e3 Bug 1689413 part 16 - Remove JSObject group field. r=tcampbell,jonco
Note that on 32-bit platforms, JSObject is still 8 bytes. This means we don't have
to worry about misaligned DoubleValue stores to fixed slots on ARM32/MIPS32.

Differential Revision: https://phabricator.services.mozilla.com/D106986
2021-03-06 01:05:25 +00:00
Narcis Beleuzu c21715e694 Backed out 18 changesets (bug 1689413) for wpt failures on Event-subclasses-constructors.html CLOSED TREE
Backed out changeset 2fe249306030 (bug 1689413)
Backed out changeset 4d4d052bf8d3 (bug 1689413)
Backed out changeset a11a96dce11b (bug 1689413)
Backed out changeset d1411da6c254 (bug 1689413)
Backed out changeset 8262ed245e27 (bug 1689413)
Backed out changeset ed3ef7b5c8c8 (bug 1689413)
Backed out changeset 63eb8f93c6d8 (bug 1689413)
Backed out changeset 558e0b0af7b7 (bug 1689413)
Backed out changeset 5595064ffb60 (bug 1689413)
Backed out changeset e15f1a6f5a38 (bug 1689413)
Backed out changeset 95fa0ec36f7a (bug 1689413)
Backed out changeset 80d594d926ad (bug 1689413)
Backed out changeset 22854b710fbf (bug 1689413)
Backed out changeset 4531d5c25694 (bug 1689413)
Backed out changeset f1bb16079c0e (bug 1689413)
Backed out changeset 211c4f80a286 (bug 1689413)
Backed out changeset 6f7514b0a657 (bug 1689413)
Backed out changeset 76db3b04dedd (bug 1689413)
2021-03-06 01:11:29 +02:00
Jan de Mooij 1eaa0dbe85 Bug 1689413 part 16 - Remove JSObject group field. r=tcampbell,jonco
Note that on 32-bit platforms, JSObject is still 8 bytes. This means we don't have
to worry about misaligned DoubleValue stores to fixed slots on ARM32/MIPS32.

Differential Revision: https://phabricator.services.mozilla.com/D106986
2021-03-05 19:10:12 +00:00
Ted Campbell bf2062a7c7 Bug 1694040 - Use JSObject::is<ProxyObject> in more places. r=jandem
Also replace JSClass::isProxy with isProxyObject and clarify that the flag
indicates primarily that the JSObject is of type js::ProxyObject.

In DOM binding code, prefer checks for NativeObject rather than !ProxyObject
where that is what we really meant.

Differential Revision: https://phabricator.services.mozilla.com/D105884
2021-02-22 13:12:29 +00:00
Jan de Mooij 4dd5ca7fdd Bug 1673553 part 74 - Remove NewSingletonProxyObject. r=iain
Depends on D98505

Differential Revision: https://phabricator.services.mozilla.com/D98506
2020-12-02 20:38:21 +00:00
André Bargull 7e04b39310 Bug 1668785: Remove using declarations from namespace level in Proxy.h. r=mgaudet
The `using` declarations in "Proxy.h" make it act like a second
"NamespaceImports.h", introducing names from `JS` into the `js` namespace.

Remove the `using` declarations from "Proxy.h" and then fix up the breakage by:
- Prepend `JS::` in various header files.
- Add "NamespaceImports.h" in cpp files.
- Add `PropertyDescriptor` to "NamespaceImports.h". There are many unqualified
  references to `PropertyDescriptor`, making it a prime candidate for
  "NamespaceImports.h".

Drive-by changes:
- Use local variables in `CheckProxyFlags()` to make the `static_assert`
  conditions more readable.

Differential Revision: https://phabricator.services.mozilla.com/D92207
2020-10-02 12:51:03 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden babd5bb7fb Bug 1659885 - Define |JS::shadow::Object| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87532
2020-08-20 19:21:53 +00:00
Matthew Gaudet 93852ffa51 Bug 1655443 - Redesign private name proxy support to be more clear and simpler r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D84866
2020-07-27 21:08:42 +00:00
Matthew Gaudet 516b2a2a71 Bug 1644160 - Initial Proxy Support for Private Fields r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D83145
2020-07-20 13:49:12 +00:00
Butkovits Atila 77046ebd2b Backed out 6 changesets (bug 1644160, bug 1652744) for failure at proxy-ccw.js CLOSED TREE
Backed out changeset ce53b1934083 (bug 1644160)
Backed out changeset 36ea51123a56 (bug 1652744)
Backed out changeset bc43898badcd (bug 1644160)
Backed out changeset 09df89442319 (bug 1644160)
Backed out changeset 3c88625982cf (bug 1644160)
Backed out changeset 598d65b8afb5 (bug 1644160)
2020-07-20 16:46:17 +03:00
Matthew Gaudet db9948fba7 Bug 1644160 - Initial Proxy Support for Private Fields r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D83145
2020-07-17 21:01:00 +00:00
Gijs Kruitbosch 38b061ef45 Bug 1638373 - remove js/ipc now that CPOWs are dead, r=mccr8
Depends on D76597

Differential Revision: https://phabricator.services.mozilla.com/D76598
2020-05-24 18:47:04 +00:00
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