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

973 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 7d6b9e16ef Bug 1396482 part 2. Enumerate JS standard classes on Window Xrays, just like we enumerateWebIDL interfaces. r=bholley 2018-09-28 10:49:44 -04:00
Andreea Pavel b49640be9b Backed out 2 changesets (bug 1396482) for failing dom/tests/mochitest/general/test_interfaces.html on a CLOSED TREE
Backed out changeset 8c9b27320d6e (bug 1396482)
Backed out changeset c23086c12393 (bug 1396482)
2018-09-28 19:45:27 +03:00
Boris Zbarsky 918ee28a32 Bug 1396482 part 2. Enumerate JS standard classes on Window Xrays, just like we enumerateWebIDL interfaces. r=bholley 2018-09-28 10:49:44 -04:00
Jan de Mooij 2ddc8e66b8 Bug 1492759 - Use the principal stored in CompartmentOriginInfo instead of JS_GetCompartmentPrincipals for Xray expandos. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D6467

--HG--
extra : moz-landing-system : lando
2018-09-24 11:20:23 +00:00
Jan de Mooij 4a02cf562c Bug 1491342 - Ignore document.domain in ShouldWaiveXray. r=bholley
We want to get rid of JS_GetCompartmentPrincipals. The origin stored in CompartmentPrivate does not account for document.domain changes because that's a per-realm thing.

Fortunately we should not have waivers in any cases that involve document.domain.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 07:13:15 +00:00
Jan de Mooij 05d25ce307 Bug 1491323 - Use CompartmentOriginInfo instead of deprecated JS_GetCompartmentPrincipals in AccessCheck::subsumes. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D6017

--HG--
extra : moz-landing-system : lando
2018-09-19 15:25:51 +00:00
Bobby Holley 6cceb08363 Bug 1453057 - Make Xrays to Arguments objects work correctly. r=bzbarsky
MozReview-Commit-ID: XeWrs0cNL5

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

--HG--
extra : moz-landing-system : lando
2018-09-14 16:14:49 +00:00
Jan de Mooij 98b8b93e34 Bug 1490600 - Always use braces for if/for/while statements in js/xpconnect/wrappers. r=bholley
Depends on D5655

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

--HG--
extra : moz-landing-system : lando
2018-09-12 16:16:15 +00:00
Jeff Walden ffd93ba761 Bug 1033916 - Move JSAutoByteString out of jsapi.h into js/public/AutoByteString.h, incidentally breaking the jsfriendapi.h -> jsapi.h dependency. r=jandem
--HG--
extra : rebase_source : d85baf9b28e632db5669aa3d056cc9744686f5c8
2018-08-20 07:46:08 -07:00
Jan de Mooij b3d493f06a Bug 1482423 part 2 - Use js::IsSystemCompartment in xpc::AccessCheck::isChrome. r=mrbkap
--HG--
extra : rebase_source : 7998deb57b0fd8fddcc822bb726a29d3942d3601
2018-08-11 13:12:49 +02:00
Jan de Mooij 17094cb561 Bug 1472976 part 6 - Remove unused xpc::AccessCheck::getPrincipal method. r=mrbkap 2018-08-10 11:57:40 +02:00
Jan de Mooij 0fdef26898 Bug 1472976 part 5 - Use xpc::GetRealmPrincipal instead of xpc::GetCompartmentPrincipal in xpc::GetObjectPrincipal. r=mrbkap 2018-08-10 11:57:40 +02:00
Tooru Fujisawa f3ffec503c Bug 1478936 - Fix the comment for JS_GetFunctionArity, and add JS_GetFunctionLength which matches to the original comment, and fixed consumer. r=jandem 2018-08-10 07:49:17 +09:00
Jan de Mooij 1b991ab653 Bug 1481467 part 3 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in XrayTraits::attachExpandoObject. r=bz
Because XrayTraits::attachExpandoObject operates in the Xray target realm/compartment and we cannot use the Xray wrapper with JSAutoRealm, we pass the caller's global as exclusiveWrapperGlobal and use that.

This also changes XrayWrapper<Base, Traits>::defineProperty to call ensureExpandoObject in the wrapper (instead of target) realm. This didn't matter before, because ensureExpandoObject immediately entered the target realm anyway.
2018-08-08 15:14:02 +02:00
Jan de Mooij 48b99bc1f0 Bug 1481467 part 2 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in JSXrayTraits::getOwnPropertyFromTargetIfSafe. r=bz
Because getOwnPropertyFromTargetIfSafe operates in the Xray target realm/compartment and we cannot use the Xray wrapper with JSAutoRealm, we pass the caller's global as wrapperGlobal and use that.
2018-08-08 15:12:16 +02:00
Jan de Mooij 84036b8de4 Bug 1474272 part 4 - Stop using js::GetGlobalForObjectCrossCompartment in xpc::NativeGlobal. r=bholley 2018-08-01 11:25:50 +02:00
Jan de Mooij fa4de44430 Bug 1479363 part 8 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in js/xpconnect/wrapper. r=bholley 2018-07-31 08:37:38 +02:00
Jan de Mooij 80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Jan de Mooij bb3767cb60 Bug 1478275 part 3 - Rename GlobalHasExclusiveExpandos to CompartmentHasExclusiveExpandos and make it use IsInSandboxCompartment. r=bholley 2018-07-26 11:00:21 +02:00
Jan de Mooij 7967870e29 Bug 1473865 part 4 - Use xpc::WindowOrNull instead of xpc::WindowGlobalOrNull in a few places. r=bz 2018-07-12 16:17:44 +02:00
Jan de Mooij 4f7b2378dc Bug 1474273 - Add xpc::CurrentNativeGlobal and use it instead of NativeGlobal(JS::CurrentGlobalOrNull(cx)). r=bz 2018-07-11 14:07:02 +02:00
Jan de Mooij e918a3c855 Bug 1472973 part 8 - Use JS::GetNonCCWObjectGlobal in XrayAwareCalleeGlobal. r=bz 2018-07-06 18:16:24 +02:00
Jan de Mooij a51f9bdda9 Bug 1472973 part 2 - Use JS::GetNonCCWObjectGlobal in some functions where we unwrapped the object. r=bz 2018-07-06 18:16:23 +02:00
Jan de Mooij 3201853e80 Bug 1468752 part 4 - Remove JS_GetGlobalForObject. r=bz 2018-07-06 12:54:00 +02:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Jan de Mooij cf5e1222da Bug 1469217 part 6 - Remove JSPROP_SHADOWABLE, address review comments. r=anba 2018-06-21 11:05:42 +02:00
Jan de Mooij b47f1cb4ba Bug 1469217 part 3 - Clean up TryResolvePropertyFromSpecs; remove a bunch of macros. r=anba 2018-06-21 11:05:42 +02:00
Jan de Mooij 539de0ae06 Bug 1469217 part 1 - Remove JSPROP_PROPOP_ACCESSORS. r=anba 2018-06-21 11:05:41 +02:00
Boris Zbarsky 9b13c30592 Bug 1467870. When cloning Xray expando chains for an adopt into the Xray compartment, don't lose expandos. r=mrbkap
This does mean that if the node is adopted back into the original document the
expandos would end up on the reflector at that point.  I think that's OK;
people shouldn't be adopting things in that direction.  Futhermore, if they
adopt, then set expandos, then adopt back they already get this behaviorl

So if we decide we don't want that, we should probably just avoid copying own
props when reparenting into a global whose principals don't subsume the old
global.
2018-06-14 19:06:43 -04:00
Jan de Mooij a2548dc268 Bug 1468252 part 2 - Rename GetOriginalEval to GetRealmOriginalEval, remove scope argument. r=evilpie
--HG--
extra : rebase_source : f1aa3fc12fc775bf64318d16246555badbe83e78
2018-06-14 09:07:30 -07:00
Tom Schuster 731eb0bfab Bug 1451017 - Remove Xray resolveNativeProperty. r=bz
--HG--
extra : rebase_source : 3fca06866110b912478448b06f12dc2158f560c7
2018-05-08 22:09:05 +02:00
Jan de Mooij f7fb3be6ec Bug 1466121 part 1 - Rename JSCompartment to JS::Compartment. r=luke
--HG--
extra : rebase_source : cd7140ecda54f0caa02a96f562167b3c9a107450
2018-06-07 16:44:40 +02:00
Peter Van der Beken b986ba77dd Bug 1053271 - Remove some unused XRayWrapper code. r=bz.
--HG--
extra : rebase_source : 62e659d4b70872997b62185b2f634d87e9242d9d
2018-06-04 16:37:04 +02:00
Peter Van der Beken f4270dc255 Bug 1053271 - Move Sandbox proxy handlers out of XrayWrapper.h. r=bz.
--HG--
extra : rebase_source : 6172fcbc5782ec3e800b034ca5fdba354f0797e2
2018-06-06 11:42:12 +02:00
Peter Van der Beken a47cb53336 Bug 1053271 - Remove XrayTraits' HasPrototype. r=bz.
XPCWN Xrays were the only Xrays that set HasPrototype to 0.

--HG--
extra : rebase_source : c10654e4eb6eb39b3cfe8884009cd1a47dcad807
2018-06-04 14:26:37 +02:00
Peter Van der Beken c02d68395d Bug 1053271 - Remove XPCWN Xrays. r=bz.
--HG--
extra : rebase_source : 4da59c56ffc6eab4af0bf59d3d3861bbc18a33ba
2018-06-04 12:56:38 +02:00
Jan de Mooij 403ba762c8 Bug 1466083 part 6 - Add xpc::GetRealmPrincipal and use it in a few places. r=bz
Not strictly necessary, but this lets us remove some JS::GetCompartmentForRealm and JS_GetCompartmentPrincipals calls.
2018-06-02 11:58:29 +02:00
Boris Zbarsky ed3c958547 Bug 1463889 part 1. Switch nsPIDOMWindowOuter::GetFrames to returning an nsDOMWindowList. r=qdot 2018-05-24 23:32:19 -04:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Peter Van der Beken 1cd3ab60da Bug 1453011 - Remove nsXPCClassInfo. r=bz.
--HG--
extra : rebase_source : 4f137f69ad8613c149a25260c3ceeb029b823117
2018-03-22 09:42:21 +01:00
Sylvestre Ledru fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Coroiu Cristina 0f6841e0d2 Backed out 2 changesets (bug 1443080) for spidermonkey build bustage at build/src/js/src/jit/BaselineCacheIRCompiler.cpp
Backed out changeset 7d509bb8a35d (bug 1443080)
Backed out changeset 53bdcd5937cd (bug 1443080)

--HG--
extra : rebase_source : 59b5350d2959c0b065aedd34bfe8337216c0ea4b
2018-03-14 11:13:21 +02:00
Sylvestre Ledru c07eb73986 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 17c91bfd7241e3e522b1413b6e544df74f5361a0
2018-03-05 13:43:54 +01:00
Kris Maglione 2c7b68e235 Bug 1443983: Part 3 - Remove platform support for interpositions. r=mccr8
This is all dead code now that the interposition service has been removed.

MozReview-Commit-ID: H6eS26y1f0f

--HG--
extra : rebase_source : c6f94df51441a62c4fbff4be657aedc9699265f5
2018-03-07 18:11:18 -08:00
Jon Coppeard a9547048d9 Bug 1441988 - Simplify AutoVector definitions by making this a template r=sfink 2018-03-01 14:47:29 +00:00
Brian Grinstead e13938f94f Bug 1440949 - Allow plain JS objects to request addon interposition;r=kmag
This is needed to allow interposition for gBrowser, which will change from a DOM node
into a plain JS object in Bug 1392352.  An object can set the `requiresAddonInterpositions`
property to enable this feature.

MozReview-Commit-ID: 4Uw5xzgZtXO

--HG--
extra : rebase_source : 203fe656da3ecd514d4e27ad0eeb4885cf4e9b0b
2018-02-26 13:37:15 -08:00
Jason Orendorff e7c94fff59 Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h

--HG--
rename : js/src/jsalloc.h => js/public/AllocPolicy.h
rename : js/src/jsprf.h => js/public/Printf.h
rename : js/src/jsprototypes.h => js/public/ProtoKey.h
rename : js/src/jswrapper.h => js/public/Wrapper.h
rename : js/src/jsalloc.cpp => js/src/util/AllocPolicy.cpp
rename : js/src/jsprf.cpp => js/src/util/Printf.cpp
extra : rebase_source : 98b16d94c469202eab0303a8da844f1d0b6aa809
extra : amend_source : e0b16c1077226d6fe240f4d7096537f93b43f2b8
extra : histedit_source : d94e0ba7904a7d66742c7fac43f638aaec4fa4e5
2018-02-21 10:30:19 -06:00
Boris Zbarsky 39af174f89 Bug 1435596. Give cross-origin objects (windows and locations) a 'then' property in all cases. r=bholley
For locations, it always returns undefined.  For windows, it returns undefined
unless there is a named subframe named "then", in which case that named
subframe is returned.

The idea is to be able to resolve promises with cross-origin objects.

MozReview-Commit-ID: HPyTvtwFdsG
2018-02-10 01:21:59 -05:00
Sylvestre Ledru 5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00