Commit Graph

1457 Commits

Author SHA1 Message Date
Bobby Holley
6eebf2b4d4 Bug 800915 - Add infrastructure to flag security wrappers as unsafe to unwrap. r=mrbkap 2012-11-14 09:56:25 -08:00
Bobby Holley
a36b720564 Bug 800915 - Clarify and refine the semantics of SecurityWrapper so that it is used if and only if unwrapping is unsafe. r=mrbkap
The naming scheme for Xray typedefs is the concatenation of the tuple:
({SC,}, {Security,Permissive}, Xray, {XPCWN,DOM}). This is admittedly a bit
much, but I think it's still better than explicitly doing the "typdef Foo Xray"
everywhere. Moreover, once the new DOM bindings are done, the last component
in the tuple will go away.
2012-11-14 09:56:25 -08:00
Ed Morley
b47760337b Backout 54c4f2ff78e3 (bug 807075) for Windows compilation errors 2012-11-14 16:45:28 +00:00
Peter Van der Beken
a6c1144dae Fix for bug 807075 (New DOM binding APIs for HTMLElement). r=bz.
--HG--
extra : rebase_source : 9afce481cd0a5c8a1014c8c9b0aad7d6665aaa82
2012-11-11 00:30:15 +01:00
Gregor Wagner
326de4e3ae Backout f2c60518351d Bug 809661 2012-11-13 14:44:18 -08:00
Ben Turner
a62084789a Bug 809661 - Need a speedy way to construct a thread list for SMS messages. r=sicking 2012-11-13 13:01:26 -08:00
Kyle Huey
eb284af7b6 Bug 810987: When sharing a global, don't import properties onto the global, import them onto the appropriate 'this' object. r=mrbkap
--HG--
extra : rebase_source : c3a92d4197831fa3061bf3f01b7cc610cc89e867
2012-11-13 11:13:27 -08:00
Kyle Huey
d77f59d91d Backout Bug 810987. 2012-11-13 10:27:37 -08:00
Kyle Huey
4c42acb694 Backed out changeset 62886fd1aaa4 2012-11-13 10:25:24 -08:00
Kyle Huey
f9f141bbec Bug 810987: Followup bustage fix. 2012-11-13 10:24:08 -08:00
Kyle Huey
206106294e Bug 810987: When sharing a global, don't import properties onto the global, import them onto the appropriate 'this' object. r=mrbkap 2012-11-13 08:57:44 -08:00
Ed Morley
b24c51981f Backout bcb591d32bd6 (bug 809674) on suspicion of breaking B2G marionette-webapi 2012-11-13 13:48:21 +00:00
Ryan VanderMeulen
2c380fb37b Backed out de9fff3a523, c567df2244f5, 8e3d976d5dc5, and c7499faaec23 (bug 800915) for bustage.
--HG--
extra : rebase_source : c823063bfa31d59d32b3402bd4b458b84b703cd5
2012-11-12 21:43:39 -05:00
Bobby Holley
24950d41c9 Bug 800915 - Remove the cx parameter and simplify various APIs. r=sfink,bz
If callers want to throw, it's now their responsibility.
2012-11-12 17:35:32 -08:00
Bobby Holley
763350c2ab Bug 800915 - Reimplement PUNCTURE consumers in terms of isSafeToUnwrap() and remove PUNCTURE API. r=mrbkap 2012-11-12 17:35:32 -08:00
Bobby Holley
6935651371 Bug 800915 - Add infrastructure to flag security wrappers as unsafe to unwrap. r=mrbkap 2012-11-12 17:35:32 -08:00
Bobby Holley
aee7a8dde8 Bug 800915 - Clarify and refine the semantics of SecurityWrapper so that it is used if and only if unwrapping is unsafe. r=mrbkap
The naming scheme for Xray typedefs is the concatenation of the tuple:
({SC,}, {Security,Permissive}, Xray, {XPCWN,DOM}). This is admittedly a bit
much, but I think it's still better than explicitly doing the "typdef Foo Xray"
everywhere. Moreover, once the new DOM bindings are done, the last component
in the tuple will go away.
2012-11-12 17:35:31 -08:00
Bobby Holley
073a74ab6f Bug 809674 - Fail at call time when invoking an XPCWrappedJS method with [implicit_jscontext] or [optional_argc]. r=mrbkap
I think this is the path of least resistance here.
2012-11-12 16:17:24 -08:00
Bobby Holley
ab1c2296a4 Bug 810743 - First check for pending exceptions, _then_ examine the invoke result. r=mrbkap 2012-11-12 16:17:24 -08:00
Bill McCloskey
e72652f68f Bug 810560 - Followup (r=luke) 2012-11-12 15:17:01 -08:00
Bill McCloskey
c9da53d854 Bug 810560 - Fix scheduledForDestruction assertion (r=luke)
--HG--
extra : rebase_source : 6c25ad6b505e818d66f1caaea907c55355f7559a
2012-11-12 14:57:53 -08:00
Peter Van der Beken
508194a997 Fix for bug 804950 (New DOM binding APIs for Element). r=bz.
--HG--
extra : rebase_source : a8691ead07dfa8ecca812396047627dc15474d83
2012-10-16 13:51:00 +02:00
Terrence Cole
6a34ee2abe Bug 805080 - Move more API users to CompileOptions; r=luke
There is no reason to have special methods for specific sets of CompileOptions
when the JS::Compile interface is so easy to use.  Other API methods can be
moved internal or removed entirely with this change.

--HG--
extra : rebase_source : f48fb221ebe02c0137e521ea605953532808825d
2012-11-06 17:36:47 -08:00
Peter Van der Beken
340572b953 Fix for bug 807330 (Make xpc_qsUnwrapThis/xpc_qsUnwrapArg deal with new DOM bindings). r=jst.
--HG--
extra : rebase_source : 3553f82516bfaa0764185f94e2eef616d9cd696d
2012-09-26 16:17:46 +02:00
Bill McCloskey
89122b3c84 Bug 803376 - Allow wrappers to be reused (r=bholley) 2012-09-11 17:14:24 -07:00
Boris Zbarsky
081200f74b Bug 807226 part 0.5. More undefs to stop Windows headers from messing with our GetClassName. r=peterv 2012-11-09 07:59:41 -08:00
Boris Zbarsky
f05491aec8 Bug 779048 part 0.5. Don't require a JSContext argument for nsJSUtils::GetStaticScriptGlobal. r=bholley 2012-11-09 07:43:57 -08:00
Fernando Jiménez
595063e7a9 Bug 809218 - Expose atob and btoa functions in xpcshell; r=mrbkap 2012-11-08 13:45:41 -08:00
Bobby Holley
429f1cfe90 Bug 809547 - Tests. r=bz 2012-11-07 22:40:48 -08:00
Benoit Jacob
4dbcec42c7 Bug 809715 - Use MFBT's IsBaseOf to simplify QS_IS_NODE - r=ehsan 2012-11-07 21:33:31 -05:00
Bobby Holley
73334e2a83 Bug 805807 - Filter setters. r=mrbkap 2012-11-07 15:45:50 -08:00
Bobby Holley
4bb1e8b3f7 Bug 802557 - Mochitests. r=bz 2012-11-07 15:43:09 -08:00
Bobby Holley
0ae350d48b Bug 806751 - Pile more garbage into GetWrappedNativeOfJSObject. r=mrbkap
--HG--
extra : rebase_source : 9d290c7058dd4a1984aff94ef84376913947189e
2012-11-07 14:12:14 -08:00
Nathan Froyd
6cd8a16138 Backout a9cfcf4b62d9 (bug 803730), a5e214d4f8b0 (bug 803730), for intermittent oranges in newly added tests 2012-11-07 14:58:29 -05:00
Kannan Vijayan
fc947af223 Bug 803730 - Add mochitest for bug. 2012-11-07 13:03:31 -05:00
Bobby Holley
5ede664aac Bug 809318 - Fix flakey tests. r=philor 2012-11-07 09:39:32 -08:00
Bobby Holley
42c232e7e3 Bug 808457 - Add Telemetry for Components.lookupMethod and Components.interfaces. r=mrbkap 2012-11-07 08:28:35 -08:00
Bobby Holley
0d4bc850b4 Bug 808611 - Move valueOf to nsIDOMLocation. r=mrbkap 2012-11-07 08:27:23 -08:00
Bobby Holley
9a5d674c8c Bug 808730 - Implement the 'IfFound' parent of ReparentWrapperIfFound. r=mrbkap
This is a pretty dumb bug, but we never actually hit this codepath at the moment.
We currently end up in wrapper by either explicitly calling
ReparentWrappedNativeIfFound (in nsNodeUtils and in nsHTMLDocument), or by moving
existing wrappers during orphan fixup. The former always passes a wrapper-cached
object, and the latter guarantees that we always have a wrapper. So we'd never
hit the "no wrapper cache, no wrapper" case in the current code.
2012-11-06 17:56:49 -08:00
Andrea Marchesini
6a0fe78592 Bug 781425 - Part 1: Enconding and dictionary. r=mounir, sr=sicking 2012-11-06 18:23:13 -05:00
Bobby Holley
327f8ca891 Bug 807179 - Add a constructor for JSPropertyDescriptor. r=luke 2012-11-05 17:49:44 -08:00
Bobby Holley
35a5c3a7c6 Bug 800864 - Add some more tests. r=bz 2012-11-05 17:15:53 -08:00
Bobby Holley
60c3e2181b Bug 793969 - Tests. r=mrbkap 2012-11-05 17:10:34 -08:00
Boris Zbarsky
e0cb69bbd9 Bug 807548. Enumerating an Xray should not see the 'constructor' property on DOM prototypes unless we're told to include non-enumerable properties. r=peterv 2012-11-05 11:58:03 -05:00
Ehsan Akhgari
6e3b90c43e Merge mozilla-central into mozilla-inbound 2012-11-04 11:09:45 -05:00
Ms2ger
a0504faba0 Bug 801991 - Remove the ability to generate custom quickstubs; r=peterv 2012-11-04 09:00:06 +01:00
Bobby Holley
8b06fa3c7e 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
c351c18d32 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
Bobby Holley
a4ce179e40 Bug 731471 - Crashtesty-mochitest. r=me 2012-11-04 07:41:01 -08:00
Peter Van der Beken
5f0fc13698 Test for bug 798264. 2012-10-12 12:48:25 +02:00