Commit Graph

1677 Commits

Author SHA1 Message Date
Peter Van der Beken
94b0fea563 Back out 79fc9d732bf7 (bug 818219) for orange.
--HG--
extra : rebase_source : 862b4c446f9b454c4c72e7536e73b9d9ede9feb6
2012-12-06 16:09:55 +01:00
Peter Van der Beken
4ff672c1a5 Fix for bug 818219 (Replace HTMLElement quickstubs with new binding methods). r=bz.
--HG--
extra : rebase_source : ddbedbaea030272ce8fc1ac7245175f7fd3edaa4
2012-11-26 15:19:02 +01:00
Brian Smith
f118bb8b55 Bug 772365, Part 1: Implement JARSignatureVerification, r=honzab, parts r=ehsan
* * *
Bug 772365, Part 2.1: Generate test cases for signed app signature verification
* * *
Bug 772365, Part 2.2: Test JAR signature verification

--HG--
extra : rebase_source : 198be789e8b1565dad418e15760fa6dc90da843f
2012-11-14 15:31:39 -08:00
Jim Mathies
d2a9974346 Bug 817076 - Update xpcshell's NS_APP_PREFS_DEFAULTS_DIR_LIST so that it returns the app dir if specified. r=glandium 2012-12-05 16:35:34 -06:00
Andrew McCreight
ffeef3a759 Bug 792861 - Make HoldJSObjects/DropJSObjects infallible. r=smaug 2012-11-12 17:15:00 -08:00
Vicamo Yang
e96950839d Bug 778093 - Part 3/9: complete onreceived event handling, r=mounir,hsinyi,bent 2012-12-04 10:40:47 +08:00
Bill McCloskey
b7a9fff0cc Bug 815999 - Mark gray globals black before returning them to the debugger (r=mccr8) 2012-12-03 17:59:46 -08:00
Bill McCloskey
281aa14137 Bug 817218 - Followup to fix compile error (r=red) 2012-12-03 11:35:22 -08:00
Bill McCloskey
c4cccff5b7 Bug 817218 - Move UnmarkGray to the JS engine (r=mccr8) 2012-12-03 11:19:23 -08:00
Bill McCloskey
464789b3a1 Bug 803019 - Fix case where atoms compartment is only compartment marked in a GC (r=jonco) 2012-12-03 11:10:29 -08:00
Andrew McCreight
9abc93145e Bug 812380 - optimize less aggressively in TraceWeakMapping. r=billm 2012-12-03 09:02:57 -08:00
Ms2ger
90dc2a2c97 Bug 802163 - Fix pyflakes warnings in bindings python; r=peterv 2012-12-02 09:59:08 +01:00
Peter Van der Beken
7d77272a5e Fix for bug 814195 (Replace Element quickstubs with new binding methods). r=bz. 2012-11-22 12:09:43 +01:00
Bill McCloskey
eccb5c7216 Backout a6b604916694 (bug 747066) because it's broken 2012-11-30 12:20:24 -08:00
Bill McCloskey
f03931dfaf Bug 747066 - Inline xpc_UnmarkGray (r=terrence) 2012-11-28 17:03:54 -08:00
Ed Morley
563634fe75 Backout 67e95e421678 (bug 814195) for Windows debug jsreftest failures on a CLOSED TREE 2012-11-29 11:17:11 +00:00
Bill McCloskey
d08b3f224f Backout 4a88d1080c08 (bug 747066) for orange 2012-11-28 16:59:17 -08:00
Bill McCloskey
2ba7d72ea2 Bug 747066 - Inline xpc_UnmarkGray (r=terrence)
--HG--
extra : rebase_source : 9a5fe3cdcac2e3352407031c969ed705b0458dab
2012-11-19 10:59:01 -08:00
Peter Van der Beken
46c89ae29b Fix for bug 814195 (Replace Element quickstubs with new binding methods). r=bz.
--HG--
extra : rebase_source : 360b2ee1bc678265781991149185a1c1d262642e
2012-11-22 12:09:43 +01:00
Ehsan Akhgari
cf0638b6a7 Merge mozilla-central into mozilla-inbound 2012-11-28 09:43:30 -05:00
Olli Pettay
2e7f4ef4ba Bug 811206, Fix JSHolder drop handling, part 2 (assert), r=mccr8
--HG--
extra : rebase_source : e7731c7d1f81e250ea6992e4a15c3dc52bb136d0
2012-11-28 02:56:06 +02:00
Olli Pettay
48ba02265b Bug 811206, Fix JSHolder drop handling, part 1 (base), r=mccr8
--HG--
extra : rebase_source : 0ea98d9e542ebade36653661fe4e941a03b87781
2012-11-28 01:54:15 +02:00
Peter Van der Beken
41a9701717 Fix for bug 814821 (Dromaeo dom-traverse regression from bug 812333) - part 4: inline xpc_qsUnwrapObj. r=bz.
--HG--
extra : rebase_source : 712ff5573098f9d29fce555fb8cd548c5900d60e
2012-11-27 10:20:05 +01:00
Peter Van der Beken
4a49ec5e22 Fix for bug 814821 (Dromaeo dom-traverse regression from bug 812333) - part 3: reorder castNativeFromWrapper. r=bz.
--HG--
extra : rebase_source : 6f5e0593219f5f664791c1cd0c976f43fb96609e
2012-11-27 10:20:05 +01:00
Geoff Brown
15e1e2274c Bug 815699 - Check for null mGREDir in xpcshell dir provider; r=jimm 2012-11-27 11:44:24 -07:00
Jon Coppeard
bfe6c130fb Bug 790338 - Split up xpconnect finalization callback r=billm
--HG--
extra : rebase_source : 2b70376622af8104d829c23b0014cbd7d8d73a87
2012-10-12 10:45:30 +01:00
Kyle Huey
81804a4574 Bug 814102: Make the 'this' object used when compartment sharing a FakeBackstagePass. r=mrbkap 2012-11-26 14:41:59 -08:00
Kyle Huey
38a35ea5a7 Bug 811784: Account for subscripts when figuring out what object to stick properties on. r=mrbkap 2012-11-26 14:41:55 -08:00
Peter Van der Beken
47915af064 Fix for bug 812333 (Replace Node quickstubs with new binding methods) - part 2: install Node's binding methods on the XPConnect proto. r=bz. 2012-11-22 12:09:41 +01:00
Peter Van der Beken
dd5db5a970 Fix for bug 814022 (Make instanceof for new DOM bindings work across scopes). r=bz. 2012-11-19 11:59:13 +01:00
Bobby Holley
26b63d0f22 Bug 812415 - Use wrapperSubsumes rather than isChrome in XPCNativeWrapper.unwrap. r=mrbkap
The current behavior breaks same-origin Xrays in sandboxes. This makes it match
the check we do in XrayWrapper.cpp for the .wrappedJSObject property.
2012-11-21 17:55:58 -08:00
Bobby Holley
bd2ae43bd9 Bug 813394 - Test both |window.location| and |location| in navigated-away-from frame. r=bz 2012-11-21 13:20:05 -08:00
Bobby Holley
b639984487 Bug 808608 - Fix test_bug802557. r=bz
There are a number of fixes to this important tests, so this warrants a separate
patch.

First of all, the boundTo machinery goes away, because we no longer have same-
compartment Xrays giving us the weird bound methods.

Furthermore, now that the sensitive methods are just regular old methods
off the prototype. They'll fail correctly when used on a same-scope object,
but not for cross-scope XOWs they'll just fail in the
GetWrappedNativeOfJSObject rat's nest (when they can't unwrap the security
wrapper), so we'll just get a generic XPConnect error instead of a security
exception. I want to fix this soon, so I changed the skipMessageCheck stuff
to use todo_is.

However, _that_ caused an UNEXPECTED-PASS for the DefaultValue test (which
was the only one of the array of tests that was throwing a security exception
in step 2). So I added an annotation for that in item[2].
2012-11-21 13:20:05 -08:00
Bobby Holley
f0c88f066f Bug 808608 - Remove Xray shadowing protection infrastructure. r=mrbkap
This is now unused.
2012-11-21 13:20:05 -08:00
Bobby Holley
abee0881bb Bug 808608 - Fix up tests to work with new behavior. r=bz,me 2012-11-21 13:20:05 -08:00
Bobby Holley
234ba415b6 Bug 808608 - Remove special testing for Location in test_bug505915. r=me
Removing test coverage isn't great. But the only reason this test is doing all
this funny stuff with Location is that it thinks that it's always wrapped in
an Xray wrapper and that we always do a dynamic security check, which is no
longer true. Moreover, it checks for very specific error messages, which are
kind of in flux right now as I'm fixing up GWNOJO. The calls are never going
to actually succeed (since location isn't a Node), so it's not really clear
how to fix up this test to do something uniquely useful in a readable way.
I've added enough Location test coverage recently that I'm comfortable removing
this part.
2012-11-21 13:20:05 -08:00
Bobby Holley
11d6106099 Bug 808608 - Remove specialized Location security wrappers. r=mrbkap 2012-11-21 13:20:05 -08:00
Bobby Holley
660ca5d5cf Bug 808608 - Remove unnecessary outparam. r=mrbkap 2012-11-21 13:20:05 -08:00
Bobby Holley
1824d3f494 Bug 808608 - Implement shadowing protection in nsDOMClassInfo. r=mrbkap
This allows us to remove the same-compartment Location wrappers. This can
go away when we move Location to the new bindings and get access to
[Unforgeable].
2012-11-21 13:20:05 -08:00
Bobby Holley
3eb5b58cea Bug 808608 - Rescue expando sharing tests. r=mrbkap
We have a very nice and robust infrastructure for per-origin expando sharing
for Xrays. Unfortunately, the only way to currently exercise it is with
Location objects, since those are the only objects with same-origin Xrays
(cross-origin Xrays don't allow expandos at all). Sandbox wantXrays would
almost work here, but we actually make an explicit exception for sandboxes
so that they never share expandos (the 'exlusive global' stuff).

I think the infrastructure is nice and that we may want it in the future, so
I don't really want to back it out. But I also don't want to leave it in the
tree untested. So I'm adding an explicit Cu API to force DOM compartments to
use same-origin Xrays. This allows us to keep testing this stuff, which I think
is important.
2012-11-21 13:20:04 -08:00
Daniel Holbert
10928a1716 Bug 811057: Make DeferredFinalizeFunction take a uint32 instead of an int32 as its "slice" parameter. r=peterv 2012-11-21 10:20:32 -08:00
Ryan VanderMeulen
bc75900a01 Merge m-c to inbound. 2012-11-20 20:28:29 -05:00
Olli Pettay
6531f58d50 Bug 794158, Remove over-complicated AutoWrapperChanger, r=peterv 2012-11-20 23:01:28 +02:00
Bill McCloskey
742e117df4 Backout 2ee20348ae59 (bug 747066) for Win64 crashes 2012-11-20 10:45:43 -08:00
Benjamin Peterson
2726941d91 Bug 795104 - Sources with a custom charset can't be lazily loaded. r=bz 2012-11-20 11:30:03 -06:00
Boris Zbarsky
b6b9137a48 Bug 813423. A bit more inlining for stuff that should really be inline. r=peterv 2012-11-20 11:36:06 -05:00
Boris Zbarsky
77eb8146ff Bug 813419. Add a non-null-checking version of xpc_UnmarkGrayObject. r=mccr8 2012-11-20 11:36:06 -05:00
Ehsan Akhgari
d6d6c3d26a Backed out 6 changesets (bug 814821, bug 815158, bug 814195) for test failures
Backed out changeset 0c2011091748 (bug 815158)
Backed out changeset 9d70b4460508 (bug 814195)
Backed out changeset bf8746658a72 (bug 814821)
Backed out changeset e73366b088d7 (bug 814821)
Backed out changeset 49fc6d535c41 (bug 814821)
Backed out changeset 987aea26a43a (bug 814821)
2012-11-27 16:30:39 -05:00
Peter Van der Beken
c15e9ce14c Fix for bug 814195 (Replace Element quickstubs with new binding methods). r=bz.
--HG--
extra : rebase_source : 349ceea8412f4133e1b9de4e2859d7663da27fa5
2012-11-22 12:09:43 +01:00
Peter Van der Beken
bbe8e49a7f Fix for bug 814821 (Dromaeo dom-traverse regression from bug 812333) - part 4: inline xpc_qsUnwrapObj. r=bz.
--HG--
extra : rebase_source : 8506cc86db7ebfe8832ed5696aeb45c79364af1f
2012-11-27 10:20:05 +01:00
Peter Van der Beken
25dce7afd5 Fix for bug 814821 (Dromaeo dom-traverse regression from bug 812333) - part 3: reorder castNativeFromWrapper. r=bz.
--HG--
extra : rebase_source : ad4c96a240140f56b1b451df3b57a4d5c47ee3ee
2012-11-27 10:20:05 +01:00
Nicolas B. Pierron
eaf17fb9d0 Bug 810062 - Toggle JSOPTIONs before the compartment creation. r=bhackett 2012-11-19 18:07:20 -08:00
Bill McCloskey
4e8591dd0b Bug 747066 - Inline xpc_UnmarkGray (r=terrence) 2012-11-19 10:59:01 -08:00
Nicholas Nethercote
f41b18a4d6 Bug 789398 - Rework the type inference memory reporters. r=bhackett.
--HG--
extra : rebase_source : 945c35907d0d4a62b904664da7b5f2b35a182034
2012-11-18 14:40:01 -08:00
Jim Mathies
21f4b948a5 Bug 810810 - Add support for 'APluginsDL' to the xpcshell directory service provider and return the GRE folder when queried. r=bsmedberg, glandium 2012-11-17 14:35:16 -06:00
Jonathan Griffin
79264276f7 Backed out a94288026ea5 (Bug 811784) for turning all b2g emulator tests red 2012-11-16 18:30:22 -08:00
Kyle Huey
c728f95e75 Bug 811784: Account for subscripts when figuring out what object to stick properties on. r=mrbkap
--HG--
extra : rebase_source : 6da8a33c512b2e5758094f4a2108e5c342c7c28c
2012-11-16 08:54:58 -08:00
Ed Morley
a72389aba9 Backout 4bc502c08da4 (bug 811784) for xpcshell failures 2012-11-16 18:16:33 +00:00
Kyle Huey
ee01241abe Bug 811784: Account for subscripts when figuring out what object to stick properties on. r=mrbkap 2012-11-16 08:54:58 -08:00
Kannan Vijayan
96d5dc12c8 Bug 803730 - Mochitest for bug. 2012-11-15 22:57:18 -05:00
Bobby Holley
d18e457a84 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-15 10:16:36 -08:00
Peter Van der Beken
a1d0e1ff9a Fix for bug 811895 (Fix WN Xray special methods so they can take new DOM binding objects). r=bz.
--HG--
extra : rebase_source : 4b4ade0c3cddee9241e94f2e20216cee73a8e284
2012-09-26 16:17:51 +02:00
Benoit Jacob
f5eae0f15f Bug 807437 - Eliminate redundant Traverse/Unlink CC macros - part 2: handmade fixups - r=mccr8 2012-11-15 02:32:40 -05:00
Benoit Jacob
7cc7c472e5 Bug 806279 - CC macros refactoring: part 3: fold the TRAVERSE_NATIVE and AMBIGUOUS cases - r=mccr8,smaug 2012-11-15 02:32:39 -05:00
Boris Zbarsky
05ba9f02c1 Bug 811449 part 8. Get rid of nsGenericElement. r=peterv 2012-11-14 14:10:08 -08:00
Peter Van der Beken
0a5f44ada8 Fix for bug 807075 (New DOM binding APIs for HTMLElement). r=bz.
--HG--
extra : rebase_source : 842b9397d2b050f880c44d3366bcc838e6615fd5
2012-11-11 00:30:15 +01:00
Ben Turner
c8cb7e42d3 Bug 809661 - Need a speedy way to construct a thread list for SMS messages. r=sicking 2012-11-14 11:49:56 -08:00
Bobby Holley
6a7c5df33e Bug 569506 - Tearoff tests. r=mrbkap 2012-11-14 10:15:13 -08:00
Bobby Holley
7c36e30523 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-14 09:56:26 -08:00
Bobby Holley
2988e5c227 Bug 800915 - Reimplement PUNCTURE consumers in terms of isSafeToUnwrap() and remove PUNCTURE API. r=mrbkap 2012-11-14 09:56:25 -08:00
Bobby Holley
8b01117ea3 Bug 800915 - Add infrastructure to flag security wrappers as unsafe to unwrap. r=mrbkap 2012-11-14 09:56:25 -08:00
Bobby Holley
6f63d40f85 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
35b84cb08f Backout 54c4f2ff78e3 (bug 807075) for Windows compilation errors 2012-11-14 16:45:28 +00:00
Peter Van der Beken
f19ca9b71f 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
54188f6e82 Backout f2c60518351d Bug 809661 2012-11-13 14:44:18 -08:00
Ben Turner
073357cfca 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
e690de14af 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
437ea18f52 Backout Bug 810987. 2012-11-13 10:27:37 -08:00
Kyle Huey
1605b8037a Backed out changeset 62886fd1aaa4 2012-11-13 10:25:24 -08:00
Kyle Huey
a63f21401a Bug 810987: Followup bustage fix. 2012-11-13 10:24:08 -08:00
Kyle Huey
f6db28c28a 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
6c4fbc534b Backout bcb591d32bd6 (bug 809674) on suspicion of breaking B2G marionette-webapi 2012-11-13 13:48:21 +00:00
Ryan VanderMeulen
5f0fd7aeda 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
2e39ac86be 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
59915360cc 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
118da73481 Bug 800915 - Add infrastructure to flag security wrappers as unsafe to unwrap. r=mrbkap 2012-11-12 17:35:32 -08:00
Bobby Holley
b892d5b7f5 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
b12489b1f9 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
380b933b23 Bug 810743 - First check for pending exceptions, _then_ examine the invoke result. r=mrbkap 2012-11-12 16:17:24 -08:00
Bill McCloskey
849c947155 Bug 810560 - Followup (r=luke) 2012-11-12 15:17:01 -08:00
Bill McCloskey
0437a8fe30 Bug 810560 - Fix scheduledForDestruction assertion (r=luke)
--HG--
extra : rebase_source : 6c25ad6b505e818d66f1caaea907c55355f7559a
2012-11-12 14:57:53 -08:00
Peter Van der Beken
b2ba5959ec 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
c458934d6c 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
4b67a43418 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
c6fc79b890 Bug 803376 - Allow wrappers to be reused (r=bholley) 2012-09-11 17:14:24 -07:00
Boris Zbarsky
30a5c69587 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
63fb55a443 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
c5d3248393 Bug 809218 - Expose atob and btoa functions in xpcshell; r=mrbkap 2012-11-08 13:45:41 -08:00
Bobby Holley
2bea60dc84 Bug 809547 - Tests. r=bz 2012-11-07 22:40:48 -08:00
Benoit Jacob
56d845628e Bug 809715 - Use MFBT's IsBaseOf to simplify QS_IS_NODE - r=ehsan 2012-11-07 21:33:31 -05:00
Bobby Holley
e0e591c636 Bug 805807 - Filter setters. r=mrbkap 2012-11-07 15:45:50 -08:00
Bobby Holley
de1677f0a5 Bug 802557 - Mochitests. r=bz 2012-11-07 15:43:09 -08:00
Bobby Holley
feda3eae48 Bug 806751 - Pile more garbage into GetWrappedNativeOfJSObject. r=mrbkap
--HG--
extra : rebase_source : 9d290c7058dd4a1984aff94ef84376913947189e
2012-11-07 14:12:14 -08:00
Nathan Froyd
d0462ba0b8 Backout a9cfcf4b62d9 (bug 803730), a5e214d4f8b0 (bug 803730), for intermittent oranges in newly added tests 2012-11-07 14:58:29 -05:00
Kannan Vijayan
836e79de84 Bug 803730 - Add mochitest for bug. 2012-11-07 13:03:31 -05:00
Bobby Holley
3738ed83b2 Bug 809318 - Fix flakey tests. r=philor 2012-11-07 09:39:32 -08:00
Bobby Holley
ab93542be6 Bug 808457 - Add Telemetry for Components.lookupMethod and Components.interfaces. r=mrbkap 2012-11-07 08:28:35 -08:00
Bobby Holley
a209826b20 Bug 808611 - Move valueOf to nsIDOMLocation. r=mrbkap 2012-11-07 08:27:23 -08:00
Bobby Holley
660d2e75d8 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
b971f025e1 Bug 781425 - Part 1: Enconding and dictionary. r=mounir, sr=sicking 2012-11-06 18:23:13 -05:00
Bobby Holley
5373164479 Bug 807179 - Add a constructor for JSPropertyDescriptor. r=luke 2012-11-05 17:49:44 -08:00
Bobby Holley
5ea4e75026 Bug 800864 - Add some more tests. r=bz 2012-11-05 17:15:53 -08:00
Bobby Holley
53bb913470 Bug 793969 - Tests. r=mrbkap 2012-11-05 17:10:34 -08:00
Boris Zbarsky
d1b570c89c 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
0f7dbe062a Merge mozilla-central into mozilla-inbound 2012-11-04 11:09:45 -05:00
Ms2ger
c1e34c61d4 Bug 801991 - Remove the ability to generate custom quickstubs; r=peterv 2012-11-04 09:00:06 +01:00
Bobby Holley
2669b93e81 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
6c9faad2ad 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
8fee429f73 Bug 731471 - Crashtesty-mochitest. r=me 2012-11-04 07:41:01 -08:00
Peter Van der Beken
649ff82d77 Test for bug 798264. 2012-10-12 12:48:25 +02:00
Ed Morley
982b0d39e4 Backout 23c9f61a243b & 6ca11f4b470c (bug 805807) for mochitest-1 orange in test_contextmenu.html 2012-11-02 14:12:51 +00:00
Bobby Holley
6559feed97 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
f485a6c791 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
Nicholas Nethercote
0a726cdb19 Bug 806283 - Split up and add native iterators to "object/misc" memory reports. r=jorendorff.
--HG--
extra : rebase_source : 867e178d0c921de9e144fb274e1c0d77c8845b81
2012-11-01 16:51:04 -07:00
Kyle Huey
0469a02b25 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon
--HG--
extra : rebase_source : 98337b6a8c07d05e8c961a452dd05a7d75c3c60b
2012-10-31 09:13:28 -07:00
Tom Schuster
dc7288d8a6 Bug 805222 - Change some usages of GetFunctionId to GetFunctionDisplayId for better JS stacktrace. r=bholley,robcee 2012-10-31 13:34:42 +01:00
Vicamo Yang
a78b5b38c7 Backout 67cb43bb8865: Breaks B2G Marionette 2012-10-31 16:35:11 +08:00
Andrew McCreight
6d19137a54 Bug 806433 - Make mReleaseRunnable a ref ptr. r=smaug 2012-10-30 20:01:31 -07:00
Jonas Sicking
00c5245c10 Bug 806587: Restore getCodebasePrincipal since extensions use it. r=mounir 2012-10-30 22:24:41 +01:00
Boris Zbarsky
a14a96d2cf Bug 801819. Remove nsIDOMCSS2Properties and the classinfo bits for CSS declarations. r=peterv,dbaron 2012-10-30 17:14:06 -04:00
Terrence Cole
a80f8cc0af Bug 805080 - Remove unused CESU8 support from SpiderMonkey; r=luke
We have many CESU8 paths in SpiderMonkey which are completely unused and
untested. We have many more "UTF-8" paths which are really mislabled CESU8 paths
and visa-versa. This patch attempts to disentable all of the various encoding
options in SpiderMonkey.
2012-10-29 13:55:17 -07:00
Bobby Holley
cfc92feb20 Bug 804630 - Tests for exposing prototype properties on a derived object. r=mrbkap 2012-10-30 18:29:11 +01:00
Kyle Huey
9a3674d80a Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-30 12:28:11 -07:00
Ed Morley
4144129728 Backout a145ded68994, e0cf397089ec & 1545e91c658e (bug 798491) for bustage on a CLOSED TREE 2012-10-30 17:02:31 +00:00
Kyle Huey
c52440cc57 Bug 798491: Followup bustage fix. 2012-10-30 08:42:47 -07:00
Kyle Huey
50b5d3f681 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-30 08:26:12 -07:00
Jacek Szpot
761b11160f Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Peter Van der Beken
669602b5e0 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript). r=bz.
Switch from using the interface objects from the Xrays compartment to wrapping
interface objects and interface prototype objects in Xrays. Make dom binding
Xrays deal with both instance objects and interface and interface prototype
objects.
2012-10-09 20:50:27 +02:00
Bobby Holley
5dafb39b7f Bug 803068 - Merge DirectWrapper and Wrapper. r=ejpbruel
--HG--
extra : rebase_source : a2b98a9585c6f7761747cfaf55684e6eeed91344
2012-10-29 16:52:53 +01:00
Bobby Holley
b871af67e5 Bug 803068 - Manually grab the BaseProxyHandler derived traps in SandboxProxyHandler. r=ejpbruel
Let's just bite the bullet and do this here. It will let us get rid of
IndirectProxyHandler, which has really overcomplicated our proxy hierarchy.

--HG--
extra : rebase_source : 7e81529936bc256d672e40537eb6abca6374e52c
2012-10-29 16:52:53 +01:00
Bobby Holley
9176d2ad9c Bug 797206 - Remove GetPrincipalFromContext. r=bz 2012-10-29 15:55:36 +01:00
Peter Van der Beken
2d58c35ce6 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - rename ProtoOrIfaceArray. r=bz.
--HG--
extra : rebase_source : c426270fc1ebee818629bd94dfc8d11af59bfc00
2012-10-09 20:50:27 +02:00
Peter Van der Beken
c2c9421a38 Fix for bug 804992 (Enable objects with new DOM bindings to be parent of other DOM objects). r=bz.
--HG--
extra : rebase_source : f07cade82dad0216d94e68dd0c0f495977abeb31
2012-09-12 22:29:30 +02:00
Peter Van der Beken
0e30cf87b1 Fix for bug 804732 (Remove mCachedDOMPrototypes). r=bz.
--HG--
extra : rebase_source : dc9ffe5f37dbc0542cbb47384b2d25472c70d801
2012-10-23 22:11:58 +02:00
Nicholas Nethercote
b78a6d0425 Bug 805915 (part 5) - Add more detail to shape memory reports. r=luke.
--HG--
extra : rebase_source : f1a05ea15b78e5f33d6398accca3333ab29fa1c6
2012-10-29 08:51:21 +11:00
Nicholas Nethercote
b602643bc5 Bug 805915 (part 4) - Add more detail to string memory reports. r=luke.
--HG--
extra : rebase_source : 010e28f10917ae4cc9d0d11abace9bcdabf0aba8
2012-10-29 08:51:21 +11:00
Nicholas Nethercote
fe068d7611 Bug 805915 (part 2) - Add more detail to object memory reports. r=luke.
--HG--
extra : rebase_source : e54ece88753280ccac284f6265fd92310dc1bec6
2012-10-29 08:51:21 +11:00
Nicholas Nethercote
9c33f3f643 Bug 805915 (part 1) - Rename the "cross-compartment-wrappers" memory report. r=luke.
--HG--
extra : rebase_source : a9689bde17b043bc8bec55c0307c0bbf94768232
2012-10-29 08:51:21 +11:00
Ryan VanderMeulen
443e3884bc Bug 799917 - Backout for various regressions. 2012-10-28 08:49:20 -04:00
Bill McCloskey
a6cd2f8c4f Bug 692267 - Remove jsgc.h from INSTALLED_HEADERS (r=terrence) 2012-10-26 11:17:24 -07:00
Andrew Quartey
3f4e29b9f0 Bug 792581 - part 20: Replace LL_UI2L macro with int64_t cast. r=ehsan 2012-10-25 19:25:57 -04:00
Nikhil Marathe
03b0de5c8a Bug 804174 - Inline CallerHasUniversalXPConnect with IsCallerChrome. r=mccr8 2012-10-25 16:10:53 -07:00
Bobby Holley
11a3279da2 Bug 797821 - Null check to fix intermittent orange. r=me 2012-10-25 18:36:45 +02:00
Ehsan Akhgari
8e702f60c5 Backed out 2 changesets (bug 579517)
Backed out changeset 5298adc70963
Backed out changeset 86ccf7c918ce (bug 579517)
2012-10-25 12:32:24 -04:00
Ehsan Akhgari
f3c0ac7a23 Code hygiene: don't use PR_TRUE and PR_FALSE, and use stdint types instead of PRInt types (no bug really, but you could say bug 579517) 2012-10-25 11:48:19 -04:00
Bobby Holley
2afd934910 Bug 797821 - Address Ms2ger's review comments. r=me 2012-10-25 17:01:09 +02:00
Bobby Holley
35f4a1d02f Bug 797821 - Remove the XPConnect Compartment Set. r=mrbkap 2012-10-25 17:01:09 +02:00
Bobby Holley
e5281ffe10 Bug 797821 - Hoist XPConnect-y stuff out of the compartment private and into the XPCWrappedNativeScope. r=mrbkap
This change means we no longer have to keep around a set of XPConnect compartments.
We keep the compartment private around for non-xpconnecty stuff like about:memory
instrumentation that needs to happen on non-xpconnect compartments.
2012-10-25 17:01:09 +02:00
Bobby Holley
fecbbb3ade Bug 797821 - Removed the unused reserved slot for XPConnect globals. r=mrbkap 2012-10-25 17:01:09 +02:00
Bobby Holley
678c7b3e05 Bug 797821 - Remove JSCLASS_XPCONNECT_GLOBAL flag. r=mrbkap 2012-10-25 17:01:09 +02:00
Bobby Holley
2cf0594417 Bug 797821 - Decide whether we need to trace DOM stuff based on more relevant information than JSCLASS_XPCONNECT_GLOBAL. r=mrbkap
This will let us rip out that flag.
2012-10-25 17:01:08 +02:00
Bobby Holley
5d518d9c54 Bug 797821 - Remove FindInJSObjectScope and friends. r=mrbkap
\o/
2012-10-25 17:01:08 +02:00
Bobby Holley
0cdf333aaa Bug 797821 - Replace usage of XPCWrappedNativeScope::FindInJSObjectScope(ccx, obj) with GetObjectScope(obj). r=mrbkap 2012-10-25 17:01:08 +02:00
Bobby Holley
7ec5eb0580 Bug 797821 - Create XPCWrappedNativeScopes immediately after global creation. r=mrbkap 2012-10-25 17:01:08 +02:00
Bobby Holley
f0c6fb319b Bug 797821 - Remove xpc_NewSystemInheritingJSObject and cached mJSPrototypeObject. r=mrbkap
xpc_NewSystemInheritingJSObject is totally unnecessary now that the system bit
has been removed (\o/). Furthermore, the mJSPrototypeObject optimization is
really dumb. it complicates tracing significantly, and we don't actually use it
in any critical places: XPCWrappedNative and slim wrapper creation use a different
prototype, so this is used only for the creation of tearoff reflectors (seldom/
never used), XPCWrappedNativeProto objects, and the nohelper prototype on the
scope (once per scope).

We could actually just pass NULL to JS_NewObject and let it deal. However, this
would actually trigger a dynamic lookup for the prototype object of the
associated JSClass, which isn't what we want. So we just explicitly pass in
Object.prototype.
2012-10-25 17:01:08 +02:00
Bobby Holley
c2707a9093 Bug 797821 - Remove unused aNative parameter to XPCWrappedNativeScope creation. r=mrbkap 2012-10-25 17:01:08 +02:00
Bobby Holley
467b5d350e Bug 797821 - Stop storing mScriptObjectPrincipal. r=mrbkap 2012-10-25 17:01:08 +02:00
Bobby Holley
6e408995a1 Bug 797821 - Stop making nsXBLDocumentInfo and nsXULPrototypeDocument globals with XPConnect. r=mrbkap
We already weren't creating a scope for them. They're generally pretty isolated
and are just used for holding functions that get cloned into other scopes.
Apparently mccr8 once found an edge from an nsXULPrototypeDocument scope into
another scope, but I don't think that should really break anything.
2012-10-25 17:01:07 +02:00
Bobby Holley
2c3ca83d1f Bug 797821 - Allow compartment privates to be lazily created when using them just for storing about:memory URIs. r=mrbkap
This will allow us to stop making nsXULPrototypeDocument and nsXBLDocumentInfo
globals XPConnect globals.
2012-10-25 17:01:07 +02:00
Bobby Holley
115b01b88b Bug 797821 - Stop passing wantXrays directly to CreateGlobalObject. r=mrbkap
This can happen after the fact where it needs to.
2012-10-25 17:01:07 +02:00
Bobby Holley
9fa3c57db6 Bug 797821 - Loosen the CompartmentPrivate contract so that having one does not imply being in the compartment set. r=mrbkap
The compartment set goes away in later patches anyway. This is to allow us to
create compartment privates for things like XUL prototype document globals
without having to put them in the set and trace expandos and such.
2012-10-25 17:01:07 +02:00
Bobby Holley
c563a12b76 Bug 797821 - Simplify the call signature for XPC::CreateGlobalObject. r=mrbkap 2012-10-25 17:01:07 +02:00
Bobby Holley
64e6dab665 Bug 797821 - Remove CreateNewGlobal. r=mrbkap
It doesn't do anything useful at this point.
2012-10-25 17:01:07 +02:00
Bobby Holley
669dc56dfe Bug 797821 - Remove the dependency of XPCWrappedNativeScope instantiation on XPCCallContext and expose the raw constructor. r=mrbkap 2012-10-25 17:01:07 +02:00
Bobby Holley
ededf3d730 Bug 801576 - Android bustage fix. r=me 2012-10-24 14:18:39 +02:00
Bobby Holley
5a6219b643 Bug 801576 - Add tests for the same-origin policy. r=mrbkap 2012-10-24 12:04:19 +02:00
Bobby Holley
f2880fe1d1 Bug 801576 - Forbid cross-origin access to the History object. r=mrbkap 2012-10-24 12:04:18 +02:00
Ryan VanderMeulen
72c7e10300 Merge m-c to inbound. 2012-10-23 22:41:34 -04:00
Ryan VanderMeulen
7d0be33071 Merge the last PGO-green inbound changeset to m-c. 2012-10-23 22:28:33 -04:00
Olli Pettay
c370341643 Bug 780770, nsThread::SetMainThreadObserver, r=bz+bholley 2012-10-24 01:26:36 +03:00
Benjamin Peterson
a7f69029d0 Bug 804404 - Set source hook in XPC initialization. r=bz 2012-10-23 18:09:00 -04:00
Chuck Lee
6a13b77a08 Bug 780142 - Rewrite MozWifiConnectionInfoEvent. r=smaug 2012-10-22 18:18:26 +08:00
Chuck Lee
c686d1e157 Bug 780142 - Rewrite WifiStatusChangeEvent. r=smaug 2012-10-22 17:17:18 +08:00
Nick Hurley
3b308213ec Bug 536324 part 3 - Change consumers of nsIChannel. r=sworkman 2012-10-22 10:51:07 -07:00
Andres Hernandez
8fbf84fbd1 Bug 769298 - Avoid logging script errors coming from private windows in the global error console 2012-10-19 15:52:21 -06:00
Boris Zbarsky
b598ec354c Bug 801712 part 2. Switch ImageData to WebIDL bindings. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky
7a7136cc71 Bug 801712 part 1. Add the WebIDL binding API to ImageData. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky
7b364a60a1 Bug 801723. WebIDL binding objects may not have classinfo even if they're nsISupports. r=peterv 2012-10-22 13:08:51 -04:00
Bobby Holley
10241f928c Bug 789224 - Separate certificate principals out from CAPS. r=dveditz
There's no longer any reason why "certificate principals" need to be principals at all.
I tried to rip them out entirely, but it looks like they're still used vestigially at XPI
install time to display author information. But there's no reason that they have to be
porkbarreled into the security-critical objects that we pass around all over the place.
So let's make them their own deal.

I was tempted to call them "certificate holders", but that would involve renaming methods and
cause more compat fuss than necessary.

--HG--
rename : caps/idl/nsISignatureVerifier.idl => security/manager/ssl/public/nsISignatureVerifier.idl
2012-10-22 08:29:56 +02:00
Bobby Holley
02f7765031 Bug 789224 - Remove capability manager stuff in nsScriptSecurityManager. r=mrbkap 2012-10-22 08:29:55 +02:00
Peter Van der Beken
052fbed287 Fix for bug 803872 (Remove remaining references to the dom.new_bindings pref). r=Ms2ger. 2012-10-21 13:06:55 +02:00
Ms2ger
bf2b5f9bda Bug 796903 - Part b: Remove classinfo from DOMImplementation; r=bz 2012-10-21 09:38:41 +02:00
Olli Pettay
e2db7fffa5 Bug 802829 - Don't add nsXPCWrappedJS objects to CC graph if they only point to a certainly alive object, r=mccr8 2012-10-20 22:53:25 +03:00
Peter Van der Beken
9af14c557f Fix for bug 801083 (Remove old proxy-based list bindings). r=bz. 2012-10-13 14:50:24 +02:00
foudfou
04435bb71f Bug 799537 - Sort xpconnect chrome mochitests in tests/chrome. r=bholley 2012-10-19 23:16:07 +02:00
foudfou
1bf98be1e7 Bug 799537 - Move xpconnect chrome mochitests in tests/mochitest to tests/chrome. r=bholley
--HG--
rename : js/xpconnect/tests/mochitest/test_bug361111.xul => js/xpconnect/tests/chrome/test_bug361111.xul
rename : js/xpconnect/tests/mochitest/test_bug760131.html => js/xpconnect/tests/chrome/test_bug760131.html
2012-10-19 22:44:26 +02:00
Bobby Holley
2b400bf0e8 Bug 793969 - Define an identity transformation at the Xray layer. r=mrbkap 2012-10-19 21:00:48 +02:00
Isaac Aggrey
f3cb73b9c7 Bug 794510: Part 1 - Build with NO_NSPR_10_SUPPORT by default; r=ehsan,glandium,wtc 2012-10-11 01:00:54 -05:00
Peter Van der Beken
e4c543b77c Fix for bug 773780 (Add API for new DOM bindings for Node). r=bz.
--HG--
extra : rebase_source : 5dd51c4ad5274da9235c8c341b0531f234e95a91
2012-10-09 14:31:24 +02:00
Ryan VanderMeulen
caba3228c3 Bug 798123 - Fix build bustage. r=Waldo
CLOSED TREE
2012-10-18 22:21:38 -04:00