Commit Graph

40 Commits

Author SHA1 Message Date
Bobby Holley
bc263edfd1 Bug 767306 - Temporarily make assertion from bug 766641 non-fatal. r=me 2012-06-22 12:01:18 +02:00
Bobby Holley
e2f3857460 Bug 763433 - Clarify compartment situation in Xray wrapper. r=mrbkap
Adding to the mess of the NodePrincipal (et al) check isn't great, but I'm refactoring that in bug 761704.
2012-06-18 15:47:09 +02:00
Bobby Holley
fad04808e5 Bug 763381 - Fix up compartment situation for expando objects. r=mrbkap 2012-06-18 15:28:11 +02:00
Bobby Holley
405597cd58 Bug 763381 - Pass cx around in more places. r=mrbkap 2012-06-18 15:28:11 +02:00
Bobby Holley
5a0c0cab62 Bug 758415 - Rip out old expando architecture. r=mrbkap 2012-06-05 19:07:37 +02:00
Bobby Holley
afed1aef96 Bug 758415 - Switch WN Xrays to use the new expando infrastructure. r=mrbkap 2012-06-05 19:07:37 +02:00
Bobby Holley
9e1e636aba Bug 758415 - Copy expando objects during object transplanting. r=mrbkap 2012-06-05 19:07:37 +02:00
Bobby Holley
dcc253b239 Bug 758415 - Implement expando object infrastructure for WN Xrays. r=mrbkap
Note: This overloads the naming of some of the existing infrastructure,
but the signatures etc are sufficient to disambiguate. The other infrastructure
goes away in a subsequent patch.

Note: We tag sandbox expandos with their global to make sure that the expandos
are never shared between sandboxes. A consequence of this scheme is that an
expando from a sandbox to an object will _always_ result in a GC edge back to
the sandbox, meaning that the sandbox is always kept alive for the lifetime of
the expando target. This could happen before, but only if a non-primitive expando
was placed (since the value of the expando would live in the consumer's
compartment). We could avoid this edge by using a reference-counted Identity()
object instead, but I suspect it's not worth worrying about.
2012-06-05 19:07:37 +02:00
Ms2ger
b3005a41a7 Bug 758143 - Add xpc::GetCompartmentPrivate; r=bholley 2012-05-25 09:18:31 +02:00
Gervase Markham
cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Brian Hackett
b4c002a912 Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 15:03:45 -07:00
Brian Hackett
4f8baecc9e Backed out changeset 5fc7462dd394 for android orange. 2012-05-19 11:52:55 -07:00
Brian Hackett
b7d2500332 Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 09:48:09 -07:00
Eddy Bruel
ece393a870 Bug 703537 - Add IndirectProxyhandler; r=bholley,jorendorff 2012-05-17 13:19:37 +02:00
Boris Zbarsky
830492af6c Bug 742217. Reduce the use of nested namespaces in our binding code. r=peterv,bent
In the new setup, all per-interface DOM binding files are exported into
mozilla/dom.  General files not specific to an interface are also exported into
mozilla/dom.

In terms of namespaces, most things now live in mozilla::dom.  Each interface
Foo that has generated code has a mozilla::dom::FooBinding namespace for said
generated code (and possibly a mozilla::bindings::FooBinding_workers if there's
separate codegen for workers).

IDL enums are a bit weird: since the name of the enum and the names of its
entries all end up in the same namespace, we still generate a C++ namespace
with the name of the IDL enum type with "Values" appended to it, with a
::valuelist inside for the actual C++ enum.  We then typedef
EnumFooValues::valuelist to EnumFoo.  That makes it a bit more difficult to
refer to the values, but means that values from different enums don't collide
with each other.

The enums with the proto and constructor IDs in them now live under the
mozilla::dom::prototypes and mozilla::dom::constructors namespaces respectively.
Again, this lets us deal sanely with the whole "enum value names are flattened
into the namespace the enum is in" deal.

The main benefit of this setup (and the reason "Binding" got appended to the
per-interface namespaces) is that this way "using mozilla::dom" should Just
Work for consumers and still allow C++ code to sanely use the IDL interface
names for concrete classes, which is fairly desirable.
2012-05-03 00:35:38 -04:00
Mark Capella
51e7557847 Bug 723530 - double error reporting in ctype JS api implementation, r=bholley 2012-04-27 12:47:00 +02:00
Eddy Bruel
dfd82bd8f7 Bug 703537: Removing the fix trap r=jorendorff@mozilla.com 2012-04-27 17:09:32 -04:00
Boris Zbarsky
437043f031 Bug 726949. Instead of using the given proto for the sandbox directly, use a proxy that forwards to the given proto but rebinds all getters/setters/methods to use the given proto, not the sandbox global, as this. r=bholley, a=tracking-firefox
The code in XPCQuickStubs.h just moved from XPCQuickStubs.cpp.
2012-04-19 14:19:41 -04:00
Peter Van der Beken
6233c150b8 Fix for bug 740069 (Generate JS bindings in C++ with a python script for DOM objects on the main thread and in workers. Infrastructure and new bindings for XMLHttpRequest). Patch by bent/bz/bholley/jst/khuey/peterv, r=bent/bz/bholley/jlebar/khuey/peterv/sicking/smaug. 2012-03-30 21:42:20 -07:00
Peter Van der Beken
95159337cc Fix for bug 740064 (Refactor XrayWrapper). r=bholley. 2012-03-27 16:31:37 -07:00
Bobby Holley
f7c0464728 Bug 733984 - Explicitly disallow shadowing on location wrappers. r=mrbkap
This was taken care of in other ways before, but we need to be more explicit about it now that we're doing more Xray stuff with Location wrappers.
2012-03-23 15:58:18 -07:00
Bobby Holley
72175d1e30 Bug 733984 - Stop specializing createHolder, and simplify holder creation in WrapperFactory::Rewrap. r=mrbkap 2012-03-23 14:59:04 -07:00
Igor Bukanov
62a47e535b bug 736978 - remove JS_FinalizeStub. r=:billm
Currently the GC finalizes on the background thread only objects with null
JSClass::finalize. However, this implies that any object that uses
JS_FinalizeStub for the finalizer would be prevented from the background
finalization.

To fix this the patch removes JS_FinalizeStub replacing it with NULL in all
cases when the class has no custom finalizer. For style consistency the patch
also removed the usage of JSCLASS_NO_OPTIONAL_MEMBERS in the static
declarations as the compiler fills the missing fields with null in any cases.
2012-03-19 15:27:58 +01:00
Igor Bukanov
72341eba40 bug 730281 - remove cx argument from GC and compartment related functions. r=:billm 2012-02-29 13:18:16 +01:00
David Mandelin
f0690b22d1 Bug 730511: remove obsolete typedefs intN, uintN, r=luke 2012-02-28 15:11:11 -08:00
Daniel Holbert
73976bd753 Bug 730074: Use JSCLASS_NO_OPTIONAL_MEMBERS in JSClass definition within XrayWrapper.cpp, to fix build warning about missing braces. r=mrbkap 2012-02-24 14:31:49 +01:00
Ms2ger
dc9c393370 Bug 677079 - Part y: Move AutoIdVector to jsapi.h; r=evilpie 2012-01-15 09:13:11 +01:00
Ms2ger
cc1b920929 Bug 677079 - Part b: Use existing JSAPI functions where those are available; r=bholley 2012-01-15 09:13:07 +01:00
Ms2ger
67be67f349 Bug 714458 - Part c: Don't include jscntxt.h in xpcprivate.h; r=bholley
This removes the inclusion from xpcprivate.h, and adds the include to XPConnect
files that still need it, along with notes to clarify what these files need
from the include. These notes will be removed while fixing bug 677079.
2012-01-11 09:23:08 +01:00
Ms2ger
d8a8e3ccf9 Bug 714057 - Remove uintn users from XPConnect; r=bholley+khuey 2012-01-02 19:05:19 +01:00
Bobby Holley
3ecde813be Bug 706301 - Don't cache own properties on XrayProxy. r=mrbkap 2011-12-06 11:05:26 -08:00
Brian Hackett
18d7a22ab7 Merge MC -> JM 2011-12-03 10:34:26 -08:00
Felix Fung
316ce7cd16 Bug 498543 - Null-checking JS_THIS_OBJECT Results. r=jwalden 2011-12-01 13:30:28 -08:00
Brian Hackett
238ebe92d7 Replace uses of GetObjectGlobal with JS_GetGlobalForObject, no bug. 2011-11-09 10:34:54 -08:00
Blake Kaplan
4075e87d18 Bug 665279 - Resolve interface constants properly through Xray wrappers. r=peterv 2011-09-21 19:16:50 -07:00
Ehsan Akhgari
478ad1a412 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Bobby Holley
68d49e57e8 Bug 688012 - Manual fixup of overzealous brace hoisting. r=mrbkap 2011-10-14 10:52:49 -07:00
Bobby Holley
6d4a5a196d Bug 688012 - Hoist 'else' clauses to the line of the previous close-curly-brace. r=mrbkap
xpcfix -epc `find | grep -P "cpp$|h$" | perl -pe 's/\n/ /'`

This is a conservative pass, which doesn't catch absolutely all cases. But it should be good enough.
2011-10-14 10:52:48 -07:00
Bobby Holley
a5f7d97d7c Bug 688012 - Move the open-brace for if, else, for, while, and switch to the same line as the keyword or condition. r=mrbkap
xpcfix -bpc `find | grep -P "cpp$|h$" | perl -pe 's/\n/ /'`

This is a huge, repetitive patch, and I confess having only skimmed a lot of it. I'm reasonably confident in the tool here though.

Updated to fix 'else' as well.
2011-10-14 10:52:48 -07:00
Bobby Holley
ec90124839 Bug 691411 - Move js/src/xpconnect to js/xpconnect and rename source files while we're at it. r=khuey, sr=mrbkap 2011-10-14 10:52:47 -07:00