Commit Graph

169 Commits

Author SHA1 Message Date
Boris Zbarsky
3986f7846f Bug 779048 part 0.5. Don't require a JSContext argument for nsJSUtils::GetStaticScriptGlobal. r=bholley 2012-11-09 07:43:57 -08:00
Bobby Holley
061eb53612 Bug 807179 - Add a constructor for JSPropertyDescriptor. r=luke 2012-11-05 17:49:44 -08:00
Bobby Holley
af592e6891 Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap
This is another one of those annoying situaitons in XPConnect right now where we
can't ask a question without potentially throwing if the answer is no. There's
also a bunch of unused cruft in here (like the Perm*Access stuff), so this stuff
was ripe for a spring cleaning. Unfortunately, I wasn't able to divide this patch
up nicely. Sorry for the big diff. :-(

In a nutshell, this patch changes things so that Policy::check() just becomes
a predicate that says whether the access is allowed or not. There's the remote
possibility that one of the underlying JSAPI calls in a ::check() implementation
might throw, so callers to ::check() should check JS_IsExceptionPending
afterwards (this doesn't catch OOM, but we can just continue along until the
next OOM-triggering operation and throw there).

Aside from exceptional cases, callers should call Policy::deny if they want to
report the failure. Policy::deny returns success value that should be returned
to the wrapper's consumer.
2012-11-02 21:47:49 -03:00
Bobby Holley
054fe781e2 Bug 805807 - Make Components wrapper throw on denial. r=mrbkap
There's really no reason to use the wishy-washy static COW Deny() here.

Also, note that the xpcshell-test wasn't testing what it thought it
was - interfaces is accessible from content code.
2012-11-02 21:47:49 -03:00
Ed Morley
218c41eee4 Backout 23c9f61a243b & 6ca11f4b470c (bug 805807) for mochitest-1 orange in test_contextmenu.html 2012-11-02 14:12:51 +00:00
Bobby Holley
6ff03ad05e Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap
This is another one of those annoying situaitons in XPConnect right now where we
can't ask a question without potentially throwing if the answer is no. There's
also a bunch of unused cruft in here (like the Perm*Access stuff), so this stuff
was ripe for a spring cleaning. Unfortunately, I wasn't able to divide this patch
up nicely. Sorry for the big diff. :-(

In a nutshell, this patch changes things so that Policy::check() just becomes
a predicate that says whether the access is allowed or not. There's the remote
possibility that one of the underlying JSAPI calls in a ::check() implementation
might throw, so callers to ::check() should check JS_IsExceptionPending
afterwards (this doesn't catch OOM, but we can just continue along until the
next OOM-triggering operation and throw there).

Aside from exceptional cases, callers should call Policy::deny if they want to
report the failure. Policy::deny returns success value that should be returned
to the wrapper's consumer.
2012-11-02 13:27:59 +01:00
Bobby Holley
eb1ecb09da Bug 805807 - Make Components wrapper throw on denial. r=mrbkap
There's really no reason to use the wishy-washy static COW Deny() here.

Also, note that the xpcshell-test wasn't testing what it thought it
was - interfaces is accessible from content code.
2012-11-02 13:27:59 +01:00
Bobby Holley
ee1c5dff17 Bug 801576 - Forbid cross-origin access to the History object. r=mrbkap 2012-10-24 12:04:18 +02:00
Bobby Holley
52597d4211 Bug 797204 - Consolidate XBL filename hack logic into nsContentUtils. r=mrbkap
These two functions do the exact same thing, as far as I can tell.
2012-10-10 11:01:26 +02:00
Bobby Holley
79a18e9b01 Bug 795275 - Introduce an explicit mechanism for determining if a script is from XBL. r=mrbkap
We want this right now so that we can avoid the scary warning when content Components
access happens in XBL (which we're allowing going forward). This patch would be overkill
just for that, but I also have plans to introduce a SOW-like protection of the Components
wrapper filtering policy. I can't just do the filename hack for that though, because real-
world XBL filenames might be all over the place. So let's just be safe here.
2012-10-03 11:44:18 +02:00
Bobby Holley
2c03ca4fcb Bug 795275 - Clean up isSystemOnlyAccessPermitted. r=mrbkap
A lot of this stuff can be simplified now, and we can stop using the deprecated APIs.
2012-10-03 11:44:18 +02:00
Bobby Holley
e9b7cf0fb8 Bug 794912 - Remove dynamic privilege check in isCrossOriginAccessPermitted. r=mrbkap 2012-10-01 23:13:49 +02:00
Ms2ger
99fc95b55c Bug 792474 - Don't JS_ASSERT in xpconnect; rs=bholley 2012-09-20 09:55:37 +02:00
Bobby Holley
f91061e0cd Bug 789713 - Ignore domain when computing whether to share non-PreCreate WNs cross-compartment. r=mrbkap 2012-09-11 10:23:20 -07:00
Bobby Holley
4e01324489 Bug 788914 - Kill the XOW flag. r=mrbkap
There are really two questions to be asked: is the caller chrome, and does the
caller subsume the callee. We have other, more precise ways of asking both of
these questions.
2012-09-11 01:05:10 -07:00
Bobby Holley
2371140fc5 Bug 788914 - Kill partially transparent wrappers. r=mrbkap 2012-09-11 01:05:10 -07:00
Bobby Holley
e1c1b7b3b3 Bug 788914 - Remove dynamic UniversalXPConnect checks sprinkled around the wrapper code. r=mrbkap 2012-09-11 01:05:10 -07:00
Ryan VanderMeulen
5185907444 Backout bug 788914 and bug 789494 because they were backed out on inbound. 2012-09-07 19:40:57 -04:00
Bobby Holley
cc55e49517 Bug 788914 - Kill the XOW flag. r=mrbkap
There are really two questions to be asked: is the caller chrome, and does the
caller subsume the callee. We have other, more precise ways of asking both of
these questions.
2012-09-07 11:28:56 -07:00
Bobby Holley
d713f9abcd Bug 788914 - Kill partially transparent wrappers. r=mrbkap 2012-09-07 11:28:56 -07:00
Bobby Holley
a9ebc61c32 Bug 788914 - Remove dynamic UniversalXPConnect checks sprinkled around the wrapper code. r=mrbkap 2012-09-07 11:28:56 -07:00
Ed Morley
e9d662c840 Backout 5853df66d488, e8fadd906232, d787279d282c, 8c1ed6327355, 94cfcf5da7c8, 87aa103d7e87 (bug 585922) for failures in test_bug411236.html 2012-09-07 09:15:34 +01:00
Bobby Holley
459935a850 Bug 788914 - Kill the XOW flag. r=mrbkap
There are really two questions to be asked: is the caller chrome, and does the
caller subsume the callee. We have other, more precise ways of asking both of
these questions.
2012-09-06 22:55:18 -07:00
Bobby Holley
3595e74d5e Bug 788914 - Kill partially transparent wrappers. r=mrbkap 2012-09-06 22:55:18 -07:00
Bobby Holley
6ff3e9262a Bug 788914 - Remove dynamic UniversalXPConnect checks sprinkled around the wrapper code. r=mrbkap 2012-09-06 22:55:18 -07:00
Andrew Sutherland
7dff13e886 Bug 786639 - XPCChromeObjectWrapper __exposedProps__ should expose the content of typed arrays like UInt8Array. r=bholley 2012-09-05 14:05:32 -07:00
Bobby Holley
16049773f1 Bug 780370 - Remap objects from standard prototypes even if they're explicitly exposed. r=mrbkap 2012-08-23 19:07:14 -07:00
Luke Wagner
55107a5229 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley) 2012-08-21 18:42:53 -07:00
Luke Wagner
88c2971644 Bug 625199 - kill dummy frames (r=mrbkap) 2012-08-17 18:05:06 -07:00
Bobby Holley
0fc162f4b0 Bug 784233 - Relax __exposedProps__ check for sandboxes until we can repack AMO addons. r=gal 2012-08-21 10:27:08 -07:00
Bobby Holley
b442dec7a9 Backed out changeset 61e9eaf9aae2 2012-08-20 21:07:07 -07:00
Bobby Holley
9ac7c1e8fb Bug 784233 - Relax __exposedProps__ check for sandboxes until we can repack AMO addons. r=gal 2012-08-20 21:03:44 -07:00
Bobby Holley
15a2db4c03 Bug 553102 - Make content-> access default to deny if __exposedProps__ is not defined. r=mrbkap 2012-08-17 23:14:55 -07:00
Aryeh Gregor
8b4a23fc4c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Bobby Holley
cb62886d78 Bug 655649 - Stop doing dynamic security checks for document.domain. r=mrbkap 2012-07-12 10:10:15 +02:00
Bobby Holley
68b6336a69 Bug 655649 - Use Subsumes Rather than Equals in XPConnect wrapper computation. r=mrbkap
Now that we have nsExpandedPrincipal, the current way of doing things is wrong. For some reason, the old document.domain hackery was hiding the failures here.
2012-07-12 10:10:15 +02:00
Bobby Holley
fa5a31fc2b Bug 767948 - Make assertion nonfatal. r=me 2012-06-25 15:24:21 +02:00
Bobby Holley
9b5f88b2af Bug 763433 - Clarify compartment semantics for ExposedPropertiesOnly. r=mrbkap 2012-06-18 15:47:09 +02:00
Blake Kaplan
3426224446 Bug 751858 - Actually throw when we deny access. r=bholley 2012-05-04 14:22:55 +02:00
Bobby Holley
96ef50270b Bug 760070 - Make the __exposedProps__ warning appear as an error. r=bz 2012-05-31 16:28:09 +02:00
dev
4cc269633d Bug 755631 - Remove extraneous exceptions in Cross Origin Wrappers. r=mrbkap 2012-05-26 09:33:52 -04:00
Bobby Holley
e916b6ede3 Bug 758563 - Warn when __exposedProps__ is missing. r=bz 2012-05-25 18:42:40 +02:00
Gervase Markham
cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Tom Schuster
3e4631aed6 Bug 752226 - Remove any use of JSVAL_IS_OBJECT. r=luke,Ms2ger 2012-05-11 17:46:26 +02:00
Ed Morley
19964dd5df Backout 9b0fcaacb788 & bf3fef257e68 (bug 752226) for mochitest-other orange 2012-05-11 18:25:52 +01:00
Tom Schuster
19513e0e0d Bug 752226 - Remove any use of JSVAL_IS_OBJECT. r=luke,Ms2ger 2012-05-11 17:46:26 +02:00
Gabor Krizsanits
041e262d4f Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-28 09:12:28 -04:00
Ryan VanderMeulen
b080738c18 Backout a0b3af4ac9f5 (bug 735280) due to Android jsreftest orange. 2012-04-25 21:59:36 -04:00
Gabor Krizsanits
61f9522d2b Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-25 20:12:33 -04:00
Ryan VanderMeulen
a539f834f1 Backout 0b170d1f5d10 (bug 735280) due to red. 2012-04-24 22:09:23 -04:00