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

1542 Коммитов

Автор SHA1 Сообщение Дата
Bobby Holley 576ed40412 Bug 839792 - Revert Tamper-proofing. r=bz
This reverts bug 821850 part 16, and updates the tests accordingly.
2013-02-13 19:16:19 +01:00
Bobby Holley 4d172878d3 Bug 839792 - Do XBL lookups on the shadow prototype. r=bz 2013-02-13 19:16:19 +01:00
Bobby Holley d363548cc4 Bug 839792 - Store members on a shadow proto in the XBL scope. r=bz 2013-02-13 19:16:19 +01:00
Bobby Holley 8a446dd113 Bug 834732 - Remove PushBehavior. r=mrbkap
Now that we only have ALWAYS_PUSH and ASSERT_SCRIPT_CONTEXT, we have uniform
release-mode behavior everywhere. Remove the crap.
2013-02-13 00:22:26 +01:00
Bobby Holley fbadb5c010 Bug 834732 - Get rid of footgun bool param for nsCxPusher and use an explicit enum. r=mrbkap
The goal here is to get rid of this crap entirely, and make nsCxPusher always
push. But that's a scary change, so we do it in chunks. This patch, in particular,
should have zero behavioral change. This means preserving some very wrong behavior.
For instance, currently SafeAutoJSContext never pushes a damn thing, because the
safe JSContext doesn't have an associated nsIScriptContext. We preserve this
behavior, and in fact convert various similarly-buggy consumers to
SafeAutoJSContext, so that we can hoist the behavioral change into a subsequent
patch.
2013-02-13 00:22:26 +01:00
Bobby Holley c7647744c5 Bug 821850 - Tests. r=bz 2013-02-08 14:24:22 +00:00
Bobby Holley 1152972979 Bug 821850 - Clone XBL into the XBL scope's compartment. r=bz 2013-02-08 14:24:22 +00:00
Bobby Holley af54a3636a Bug 821850 - Dynamically waive Xray for field access by XBL script on bound nodes. r=bz 2013-02-08 14:24:22 +00:00
Bobby Holley 2e9cd3a563 Bug 821850 - Add API to lookup implementation members on XBL bindings. r=bz 2013-02-08 14:24:21 +00:00
Bobby Holley 6d84c3998c Bug 821850 - Make XBL prototype setup tamper-proof for Xrays. r=bz
We make the class object readonly/non-configurable, as well as all the properties
and methods on the class object.
2013-02-08 14:24:21 +00:00
Bobby Holley 829accdf70 Bug 821850 - Unwrap |callee| before passing it to InstallXBLField. r=bz
InstallXBLField knows how to handle cross-compartment |callee|. However,
The current value will always be wrapped. We need to unwrap said wrappers,
otherwise we'll end up with objects that aren't functions.
2013-02-08 14:24:21 +00:00
Bobby Holley 6242563e83 Bug 821850 - Install XBL field accessors on prototype objects at setup time, and nuke XBLResolve. r=bz 2013-02-08 14:24:21 +00:00
Bobby Holley 956da626e2 Bug 821850 - Hoist Field machinery into nsXBLProtoImplField. r=bz
This is a pure cut/paste except for removing |static| from XBLResolve.
XBLResolve will go away soon, so there's no need to put it in a header.
2013-02-08 14:24:21 +00:00
Bobby Holley 13f064c989 Bug 821850 - Remove unused arguments from InstallMember and simplify calling convention. r=bz
Let's just pass a JSContext and do Requests/Compartments in the caller.
2013-02-08 14:24:21 +00:00
Bobby Holley db71e5ca7c Bug 821850 - Store a strong ref to the JSClass in nsXBLBinding. r=bz 2013-02-08 14:24:20 +00:00
Bobby Holley 225d119eed Bug 821850 - Make DoInitJSClass unconditionally fill in aClassObject. r=bz
Right now, DoInitJSClass only returns non-null if the class object is new
(and thus needs to have members installed on it). The code then goes and
unconditionally tries to install the members, null-checking and aborting
each time.

Instead, let's use an explicit boolean and one early return. This lets us
get a reference to our JSClass no matter what, which we need.
2013-02-08 14:24:20 +00:00
Bobby Holley 9069c014a7 Bug 821850 - Remove bogus comment/check and replace with an assert. r=bz
This confused me, because fields are, in fact, exposed via the prototype
via the complicated two-step solution defined in InstallField. As it turns
out, CompilePrototypeMembers throws if mClassObject ends up null.
2013-02-08 14:24:20 +00:00
Bobby Holley 70d03d5e68 Bug 821850 - Pass nsXBLBinding instead of nsIContent during implementation installation. r=bz
This lets us hook up the binding to the JSClass.
2013-02-08 14:24:20 +00:00
Bobby Holley a2ecfc1280 Bug 821850 - Make XBL-in-content tests Xray-safe. r=bz
We use XPCNativeWrapper.unwrap rather than .wrappedJSObject so that the tests
are agnostic to whether there's an Xray wrapper or not.

I converted test_tree_column_reorder.xul into a chrome test because it does
all sorts of crazy introspection on the binding, and it really should be
a chrome test anyway.
2013-02-08 14:24:19 +00:00
Josh Matthews 046e3e7e12 Bug 829360 - Keep non-browser windows from extending the lifetime of the private session. r=bz 2013-02-04 23:22:51 +00:00
Mounir Lamouri 2594d14867 Bug 833009 - Remove "nsContentUtils.h" inclusions from headers in content/xbl/. r=Ms2ger 2013-02-01 10:56:02 +00:00
Bobby Holley c865dc3ca6 Bug 833412 - Remove AddBinding/RemoveBinding and remove dead code. r=bz 2013-01-24 18:45:50 +01:00
Bobby Holley 36383885bc Bug 833412 - Make nsXMLPrettyPrinter use nsXBLService/BindingManger to load/remove bindings. r=bz 2013-01-24 18:45:50 +01:00
Bobby Holley 04da52d3d7 Bug 833412 - Fix tests that call addBinding. r=bz 2013-01-24 18:45:49 +01:00
Olli Pettay a2de630b4d Bug 831421 - Arrow keys are broken in test-ipc.xul, r=neil 2013-01-24 18:38:59 +02:00
Bobby Holley d0c7862f5e Bug 832041 - Remove nsJSContext::CompileEventHandler and move consumers to nsJSUtils::CompileFunction. r=bz 2013-01-23 07:12:50 +01:00
Steve Fink 9effec722d Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence 2012-12-31 12:40:21 -08:00
Steve Fink d8da3e7b9a Backed out changeset fce4e0f8a553 (bug 828753) for breaking windows warnings-as-errors (stop adding JSObject forward decls, please!) 2013-01-18 13:20:21 -08:00
Steve Fink 0dee2fb42d Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence
--HG--
extra : rebase_source : c8806b27677594925ad0e6b54c47af5cf17e1153
2012-12-31 12:40:21 -08:00
Bobby Holley 9fce3b092f Bug 824864 - Pass EvaluateString out-param as a pointer, not a reference. r=bz 2013-01-16 18:50:27 -08:00
Bobby Holley 5515799556 Bug 824864 - Rename EvaluateStringWithValue to EvaluateString. r=bz
Now that there's only one of them, we can get rid of the silly suffix. \o/
2013-01-16 18:50:26 -08:00
Bobby Holley a14609b21a Bug 824864 - Improve the API for EvaluateStringWithValue. r=bz
There are a few changes we make here:
1 - Having callers pass JS::CompileOptions directly.
2 - Removing aUndefined, which makes no sense and is unused by consumers.
3 - Making aScopeObject and aRetValue non-optional, via references.
3 - Adding an argument to optionally coerce the return value to a string.

Coercing jsvals to strings is the reason we currently have two nearly-identical
functions, EvaluateString and EvaluateStringWithValue, since the coercion can
trigger arbitrary script and thus needs to be bracketed by all the junk that
nsJSContext does. However, if callers can be guaranteed that the return value
will be a bonafide string, then they can easily extract the string themselves
if they so desire. This will allow us to combine the two functions.
2013-01-16 18:50:26 -08:00
Bobby Holley 5a19a07bef Bug 824864 - Move consumers of CompileFunction to the nsJSUtils version, and kill the nsJSContext version. r=bz
Note that the three consumers were all XBL, and were all passing aShared = true,
which had the effect of passing null for the target object. So we actually want
to pass JS::NullPtr() (the HandleObject version of nullptr) instead of
aClassObject in order to maintain the old behavior (whatever that is).
2013-01-16 18:50:25 -08:00
Trevor Saunders 83bcbe0d6b bug 822289 - remove NS_IMPL_CYCLE_COLLECTION_CLASS and friends r=mccr8 2013-01-12 07:40:33 -05:00
Boris Zbarsky e1197ccff3 Bug 830614. Wrapping a wrappercached WebIDL object should watch out for reentry via WrapNativeParent. r=peterv 2013-01-15 14:04:24 -05:00
Cameron McCormack 42c46424b4 Bug 508725 - Part 3: Create a rule processor for each style scope. r=dbaron 2013-01-09 10:25:47 +11:00
Cameron McCormack c067646b00 Backout bug 508725 (d267bb4b58b5, 50f71edffeb9, 6aec8e22fe60, e62e1f33958a, 0f146c435249, eb959b9f4862, 2b0ee42f3aa0, 02db01cd6796, 2ef0e517d43d, b650588e05c9 and a3c916829d56) for build failure on a CLOSED TREE. 2013-01-08 19:36:21 +11:00
Cameron McCormack 6b90406bb3 Bug 508725 - Part 3: Create a rule processor for each style scope. r=dbaron 2013-01-08 19:09:22 +11:00
Trevor Saunders 09f3b656b4 bug 825419 - outparamdel nsIDocShell::GetPresShell() r=smaug 2012-12-28 20:56:42 -05:00
Peter Van der Beken 6f6a341ee2 Fix for bug 815149 (Add support for SOWs and XBL bindings in new DOM bindings). r=bz.
--HG--
extra : rebase_source : c24544fd3d1c99651e279e687a07a02c5b994323
2012-09-12 22:29:30 +02:00
Bobby Holley 95ed36320f Bug 823279 - Mark deserialized XBL script as XBL. r=bz 2012-12-19 17:12:33 -08:00
Bill McCloskey 41af605210 Bug 821116 - Track line numbers for XBL properties (r=bz) 2012-12-17 12:22:38 -08:00
Masayuki Nakano 76345a848f Bug 813445 part.14 Make dom::EventListenerFlags for nsEventListenerManager r=smaug 2012-12-16 10:26:05 +09:00
Jeff Walden 120886ca73 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Jeff Muizelaar 47c921e73e Bug 801061. Switch from imgIRequest to imgRequestProxy. r=joe
This doesn't switch all of the users yet, but is a step in the right
direction.

--HG--
extra : rebase_source : 91b4fef3f67586179c119208d000cf7629e04963
2012-10-12 08:43:01 -04:00
Ed Morley 72deb1c273 Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-12-13 15:55:31 +00:00
Olli Pettay 0564f4d9ac Bug 806031, less surprising toString for XBL binding objects, r=bz
--HG--
extra : rebase_source : 8b518b55729b9233e2b80220d70dacc143e52264
2012-12-12 17:10:02 +02:00
Bobby Holley be465ba470 Bug 820666 - Tag XBL script for <field> elements and child scripts. r=jorendorff 2012-12-12 17:09:37 -08:00
Steve Fink 09f774c219 Bug 770238 - Defer releasing an nsXBLDocumentInfo to avoid calling JS during finalization. r=smaug
--HG--
extra : rebase_source : e25c70be77d0ce702435e0aa075d4be8e894c9b7
2012-12-06 10:44:31 -08:00
Mats Palmgren f128dda378 Bug 814677 - Replace XP_IS_SPACE with dom::IsSpaceCharacter and add form-feed to match DOM spec. r=bz 2012-11-30 17:04:11 +01:00