Commit Graph

207 Commits

Author SHA1 Message Date
Ms2ger
1e339d398b Bug 876602 - Move JS-implemented webidl construction code into C++; r=bz 2013-06-01 08:56:23 +02:00
Ms2ger
c1c1a92c3b Bug 876604 - Outparamdel UnwrapDOMObjectToISupports; r=bz 2013-06-01 08:56:02 +02:00
Peter Van der Beken
44c790a6fb Bug 874321 - Fix setting of expandos on Xrays for DOM bindings with named properties. r=bz.
--HG--
extra : rebase_source : 697545417d27696de05c0f22987e4cb187d226cd
2013-05-29 11:38:57 +02:00
Kyle Huey
3cc4ccd2f5 Bug 876555: Avoid including xpcprivate.h in most generated dom binding code. r=bz 2013-05-30 11:15:31 +08:00
Boris Zbarsky
e1d7ebf663 Bug 876805. Fix unsafe reference gc hazards in dom/ code. r=smaug 2013-05-29 16:16:04 -04:00
Jon Coppeard
6fec5f0632 Bug 876639 - Address unsafe references from JS_ParseJSON() - Fix browser r=smaug 2013-05-29 09:29:39 +01:00
Ed Morley
ebb42781a7 Backed out changeset 7acdb79e4d71 (bug 876639) 2013-05-29 12:09:10 +01:00
Jon Coppeard
a5f7aee9a5 Bug 876639 - Address unsafe references from JS_ParseJSON() - Fix browser r=smaug 2013-05-29 09:29:39 +01:00
Boris Zbarsky
0307d91885 Bug 865951. If the return value of a JS-implemented method or attribute is a JS-implemented interface and the returned object is not a DOM object, automatically wrap it up in an instance of that interface. r=mccr8
This does not invoke __init on the chrome object, since there are no
arguments to do it with anyway.  It also doesn't invoke init(), so
don't do this in cases in which the chrome-side object will need to
know its window.
2013-05-20 13:47:08 -04:00
Nathan Froyd
eba34f22d7 Bug 858131 - rewrite FloatingPoint.h to be C++-only instead of C-compatible C++; r+original-author=Waldo 2013-05-01 16:55:13 -04:00
Boris Zbarsky
299d72713e Bug 867863. Be a little more careful in GlobalObject initialization. r=peterv 2013-05-08 15:50:58 -04:00
Boris Zbarsky
4f17ea0254 Bug 869311. More rooting in dom/bindings and content/base. r=smaug 2013-05-07 22:34:56 -04:00
Bobby Holley
609401db48 Bug 868637 - Simplify DOM Bindings JSON parsing. r=bz
At this point we could really just hoist the JSAPI call, but it's just
cumbersome enough with all the casts that I don't really want to stick
it in the codegen.
2013-05-07 14:18:03 -07:00
Sankha Narayan Guria
7f0c4baace Bug 867414 - Rename SafeAutoJSContext to AutoSafeJSContext. r=bholley 2013-05-06 09:04:17 -04:00
Ms2ger
634a0652fb Bug 868411 - Handlify js::GetObjectProto; r=bz 2013-05-05 09:03:14 +02:00
Boris Zbarsky
fba1502aa7 Bug 865969 part 6. Fix rooting hazards in BindingUtils.cpp. r=smaug 2013-05-03 19:29:08 -04:00
Boris Zbarsky
0c03ae1518 Bug 742206 part 1. Introduce a simple mozilla::dom::Date for use in WebIDL bindings. r=smaug 2013-05-02 14:38:19 -04:00
Boris Zbarsky
d0cb8316ab Bug 860841. Hook up the proto chain of a WebIDL interface object to the interface object of its nearest ancestor interface that has one, as if these were ES6 classes. r=peterv 2013-05-02 14:38:19 -04:00
Boris Zbarsky
583e53379d Bug 861022 part 2. Root the global object in WebIDL prototype and interface object setup. r=peterv,terrence 2013-05-01 23:44:12 -04:00
Boris Zbarsky
e418358f16 Bug 861022 part 1. Root the non-globals in WebIDL prototype and interface object setup. r=peterv,terrence 2013-05-01 23:44:11 -04:00
Jim Blandy
7b5a4624a3 Bug 862531: Replace BaseProxyHandler::obj_toString with className. r=jorendorff 2013-04-30 14:44:50 -07:00
Boris Zbarsky
15316b1400 Bug 865961. Root the scope argument of wrap-the-xpconnect-object helpers in WebIDL bindings. r=ms2ger 2013-04-29 17:33:42 -04:00
Boris Zbarsky
e9fca1d653 Bug 865964. Remove dead WrapCallbackInterface code. r=smaug 2013-04-26 13:41:21 -04:00
Peter Van der Beken
7c90dee12e Bug 862092 - "Assertion failure: target->isNative() == obj->isNative()" adopting a <select>. r=bz.
--HG--
extra : rebase_source : 3eef5382c32927ac321db47003a974768cbdaf6e
2013-04-16 19:02:57 +02:00
Bobby Holley
629d0d4121 Bug 860438 - Straightforward cases. r=gabor 2013-04-18 11:36:03 -04:00
Ryan VanderMeulen
3b5b1e9f13 Backed out changeset 409285b3f69c (bug 862092) for mochitest-2 failures on a CLOSED TREE. 2013-04-17 11:48:34 -04:00
Peter Van der Beken
d80727e491 Bug 862092 - "Assertion failure: target->isNative() == obj->isNative()" adopting a <select>. r=bz.
--HG--
extra : rebase_source : 1905aa3aa956a599e9ce1de8866f7dc58feb73be
2013-04-16 19:02:57 +02:00
Jon Coppeard
1f1c0e6af9 Bug 861281 - GC: Root the wrap object API r=terrence r=bholley
--HG--
extra : rebase_source : 1d3ed88299ad8e9ad6812fb41aa48f03cc7aabae
2013-04-15 18:32:55 +01:00
Joshua Cranmer
45e3447406 Bug 856108 - Port static analyses to clang, part 2b: use MOZ_STACK_CLASS in dom. r=Ms2ger 2013-04-11 22:20:18 -05:00
Jacek Szpot
514f40e52a Bug 854503 - Rename JS unwrapping functions. r=bholley 2013-04-11 11:50:18 -07:00
Boris Zbarsky
d5740592e1 Bug 860473 part 3. Root ErrorResult::ThrowJSException. r=evilpie,smaug 2013-04-11 14:31:06 -04:00
Boris Zbarsky
4cf80a8cde Bug 860473 part 1. Root WebIDL dictionary ParseJSON. r=evilpie, smaug 2013-04-11 14:31:05 -04:00
Boris Zbarsky
081e372b68 Bug 856428. Don't try to root an uninitialized value. r=peterv 2013-04-08 17:05:22 -04:00
Boris Zbarsky
ecc404d587 Bug 688691. Warn when LenientThis actually causes us to not throw. r=ms2ger 2013-04-08 17:04:21 -04:00
Ryan VanderMeulen
24a4c17eff Backed out changeset a85d21e394c0 (bug 854503) for bustage. 2013-04-06 14:37:33 -04:00
Jacek Szpot
8ce12e971c Bug 854503 - Rename JS unwrapping functions. r=bholley 2013-04-04 12:14:32 +02:00
Boris Zbarsky
0d9204981d Bug 855700. Make returning an nsIVariant from a WebIDL interface work. r=smaug 2013-04-03 22:22:16 -04:00
Jose Cortes
21f2e0d958 Bug 842186 - Replace use of jsval with JS::Value in h and cpp files in the dom/bindings/ dom/plugins/ dom/src/ dom/activities/ directories. r=jwalden
--HG--
extra : rebase_source : 2757a7ab265153fa4c769a69a4947b9258e4413e
2013-04-02 16:05:37 -07:00
Boris Zbarsky
b105f502e9 Bug 855582 part 2. Make the bindings' various spec arrays const, and make the jitinfo structs static. r=khuey 2013-04-02 20:20:38 -04:00
Bobby Holley
e231772ba1 Bug 854480 - Remove old-style unwrapping from dom/bindings bindings. r=bz 2013-04-01 15:17:50 -07:00
Tom Schuster
045cb0fba7 Bug 828462 - Root Proxy/Wrapper in the browser. r=terrence,bz 2013-03-21 23:23:48 +01:00
Boris Zbarsky
d6b06cd620 Bug 843627 part 3. Enable WebIDL bindings for <embed> and <applet>. r=peterv 2013-03-17 10:42:05 -04:00
Boris Zbarsky
75f321cec4 Bug 827158 part 11. Move HTMLObjectElement to Web IDL bindings. r=peterv 2013-01-06 18:55:14 -05:00
Peter Van der Beken
74a5cb5265 Fix for bug 842799 (|Document.prototype instanceof Node| inside <script> returns false). r=bz. 2013-02-22 10:25:24 +01:00
Peter Van der Beken
c485f6afee Fix for bug 825628 (Implement NamedConstructor) - add codegen support for NamedConstructor. r=bz.
--HG--
extra : rebase_source : 8393995dca6f65cb49512874c1916ee745436638
2013-01-22 11:51:15 +01:00
Boris Zbarsky
5cee1946fc Bug 838691 part 1. Add support in Prefable for calling a function to determine whether a property should be exposed in a WebIDL binding. r=peterv 2013-02-19 11:54:40 -05:00
Boris Zbarsky
25deb6d78c Bug 839088 part 1. Add a way to throw a JS::Value on an ErrorResult. r=peterv 2013-02-19 11:54:40 -05:00
Masatoshi Kimura
1224fb0c27 Bug 841802 - Part 1: Add ErrorResult::ClearMessage(). r=bz 2013-02-19 22:30:28 +09:00
Peter Van der Beken
d07b3d8eef Fix for bug 838269 (Support cross-global |... instanceof DOMInterface|). r=bz.
--HG--
extra : rebase_source : e5ad1d7da8029394e3ecb38909eca406a675dbe9
2013-01-08 19:05:36 +01:00
Peter Van der Beken
e07d1dcdb8 Fix for bug 838228 (toString on an Xray for an interface object should stringify like Function.prototype.toString). r=bz.
--HG--
rename : content/html/content/test/test_map_attributes_reflection.html => content/html/content/test/test_ol_attributes_reflection.html
extra : rebase_source : 9bd7efb927e4eac96569ed629ee230dbf555fb63
2013-02-01 15:33:58 +01:00
Boris Zbarsky
27b20c21af Bug 824589. Convert XULElement to WebIDL. r=peterv
The assertions in nsINode and nsWrapperCache are to eagerly catch
failures to override those methods.

The classinfo change for XULTreeBuilder is needed because one of those
is returned via an nsIXULTemplateBuilder attribute on XULElement.
Alternately, I could mark it notflattened in Bindings.conf, but Enn
said he prefers this anyway.

The change to the QI impl in BindingUtils is needed because when
XPConnect converts an IID from C++ to JS it makes is an nsJSID, not an
nsJSIID.  We've run into this before, sadly.

I removed "id" from nsIDOMXULElement because it's already on Element.
I suppose I could have left it there, but this seems cleaner.

The nsJSIID::HasInstance changes are needed to support XBL-implemented
interfaces.  Sadly, this does mean that if the underlying object QIs
to something but we didn't put those props on the WebIDL we'll end up
testing true for instanceof but not exposing the props.  I don't see
an obviously better way.  We should work on killing off uses of
"instanceof someinterface".

The browser.js change is needed to avoid throwing exceptions during
browser-chrome tests that are now getting reported because our
swapFrameLoaders is no longer an XPConnect method.
2013-01-29 12:51:55 -05:00
Boris Zbarsky
66e49b02aa Back out bug 824589 (rev 22695cac3896) on suspicion of Ts regression 2013-01-29 17:18:06 -05:00
Boris Zbarsky
8231be64a0 Bug 824589. Convert XULElement to WebIDL. r=peterv
The assertions in nsINode and nsWrapperCache are to eagerly catch
failures to override those methods.

The classinfo change for XULTreeBuilder is needed because one of those
is returned via an nsIXULTemplateBuilder attribute on XULElement.
Alternately, I could mark it notflattened in Bindings.conf, but Enn
said he prefers this anyway.

The change to the QI impl in BindingUtils is needed because when
XPConnect converts an IID from C++ to JS it makes is an nsJSID, not an
nsJSIID.  We've run into this before, sadly.

I removed "id" from nsIDOMXULElement because it's already on Element.
I suppose I could have left it there, but this seems cleaner.

The nsJSIID::HasInstance changes are needed to support XBL-implemented
interfaces.  Sadly, this does mean that if the underlying object QIs
to something but we didn't put those props on the WebIDL we'll end up
testing true for instanceof but not exposing the props.  I don't see
an obviously better way.  We should work on killing off uses of
"instanceof someinterface".

The browser.js change is needed to avoid throwing exceptions during
browser-chrome tests that are now getting reported because our
swapFrameLoaders is no longer an XPConnect method.
2013-01-29 12:51:55 -05:00
Peter Van der Beken
b9d2ae906f Fix for bug 816088 (webIDL bindings try to extract nsISupports from the global object in static properties in workers). r=bz.
--HG--
extra : rebase_source : 5668d9e01bff0fe7831d98018428856e5940a620
2012-12-03 17:07:49 +01:00
Ed Morley
bc0702d0d7 Backout f3c145bd1dd2 & 5075690572a9 for OS X startup failures 2013-01-28 11:08:21 +00:00
Peter Van der Beken
b46afdef94 Fix for bug 816088 (webIDL bindings try to extract nsISupports from the global object in static properties in workers). r=bz.
--HG--
extra : rebase_source : 68e5630591f6209e2af9c5cd2321fed8edd3de24
2012-12-03 17:07:49 +01:00
Peter Van der Beken
f2a13d3e89 Fix for bug 827546 (|non editable element|.QueryInterface(Components.interfaces.nsIDOMNSEditableElement) does not throw anymore) - throw on QI failure. r=bz. 2013-01-14 11:29:49 +01:00
Andrew McCreight
6f2b4df7a3 Bug 777385 - Support (some) Paris bindings objects as weak map keys. r=peterv
This adds support for many kinds of Paris bindings objects as weak map keys.
This patch supports nsISupports objects as well as non-cycle-collected
non-nsISupports objects. What is needed for support is to preserve any wrapper,
if the object is wrapper cached. In other cases, we don't need to do anything.
2012-11-09 10:59:02 -08:00
Jeff Walden
d9889b3184 Bug 826447 - Change all the proxy API signatures to take unsigned flags, rather than bool set, so that it's easier to find all tests of JSRESOLVE_ASSIGNING. r=bz
--HG--
extra : rebase_source : 3b88b411965087984d7973a90f8fa1b06457a6ce
2013-01-03 15:31:36 -06:00
Nicholas Nethercote
bd7d66d93a Bug 824883 - Fix three warnings in dom/ code. r=bz.
--HG--
extra : rebase_source : 3763606a23b66493596787ca33cec32618efa2f1
2012-12-26 20:24:59 -08:00
Peter Van der Beken
2e848596ed Fix for bug 820577 (Support reparenting for new DOM binding objects). r=bholley/bz.
--HG--
extra : rebase_source : 66dad56b8f543790ffa7e595ccd684c4673403df
2012-09-26 16:17:46 +02:00
Jeff Walden
7146c23e80 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
Boris Zbarsky
15e523cee0 Bug 818379. Make sure interface objects have a 'length' property even if they're not real function objects. r=peterv 2012-12-14 14:10:49 -05:00
Boris Zbarsky
d1c8d3b88e Bug 815803. Now that JSSLOT_PROXY_PRIVATE == 0, simplify binding code that had to deal with different slot indices on proxy and non-proxy objects. r=peterv 2012-12-06 15:21:19 -05:00
Boris Zbarsky
b3142f98f8 Bug 816376. Create vanilla objects for the interface object of callback interfaces. r=peterv 2012-12-06 15:21:18 -05:00
Peter Van der Beken
1830a6a0b7 Fix for bug 814821 (Dromaeo dom-traverse regression from bug 812333) - part 1: use qsObjectHelper instead of xpcObjectHelper in HandleNewBindingWrappingFailure. r=bz.
--HG--
extra : rebase_source : 32e20aec9cf2ea8a6e8d878ce758f792e6b8a67f
2012-11-27 10:20:04 +01:00
Ehsan Akhgari
7d0b7e0454 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
9b1c163cdc Fix for bug 814821 (Dromaeo dom-traverse regression from bug 812333) - part 1: use qsObjectHelper instead of xpcObjectHelper in HandleNewBindingWrappingFailure. r=bz.
--HG--
extra : rebase_source : 748e0343d37e2b9a25b5b6644bebff428474310c
2012-11-27 10:20:04 +01:00
Peter Van der Beken
a428926b2d 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
Bobby Holley
46b9d205df 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
Masatoshi Kimura
32a0cfd0f7 Bug 801487 - Implement ErrorResult::ThrowTypeError. r=bz 2012-11-06 18:23:14 -05: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
Peter Van der Beken
9e18022b7d Fix for bug 763643 (Implement static operations and attributes for WebIDL). r=bz.
--HG--
extra : rebase_source : d9dd5450af5d2b1f3e7e3a738ec2efdc7f7053da
2012-10-19 09:34:28 +02:00
Peter Van der Beken
704bdbee45 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - followup to fix problem pointed out by reviewer. r=bz.
--HG--
extra : rebase_source : 13271029cb0c7cd18b98fa2ed409e43f1df13e47
2012-10-29 21:55:13 +01:00
Peter Van der Beken
1ef60a85a4 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
Boris Zbarsky
f2b84a3ae9 Bug 793267. Add support for [Unforgeable] in WebIDL. r=peterv
Unforgeable attributes are defined directly on the object, not on the
prototype.  So we keep them in a separate spec array and define them
during object creation as needed.

This means that we have to pass that separate spec array to the Xray
helpers, unfortunately, which somewhat complicates those.
2012-10-24 16:10:49 -04:00
Olli Pettay
94fafd006f Bug 797806 - Helper method to handle stringified JSON in C++, part2, r=khuey 2012-10-16 18:37:44 +03:00
Olli Pettay
725f23d5ee Bug 797806 - Helper method to handle stringified JSON in C++, r=khuey 2012-10-16 17:52:10 +03:00
Peter Van der Beken
de52d9ea80 Fix for bug 798264 (Split property tables). r=bz.
--HG--
extra : rebase_source : 71456ae48d3d3e6014e8095837f7942cfe733a37
2012-10-09 20:50:05 +02:00
Boris Zbarsky
3e1f7e4e46 Bug 792890. Fix JS-wrapping of callback interfaces to just return the underlying JS object. r=peterv
There are several changes here:

1) When wrapping a callback interface object for JS, just extract the
   underlying JSObject from inside it and hand that object out.

2) Flag callback interface descriptors as "not concrete" (only matters
   for cases when they have constants on the interface object) and not
   wrappercached (will catch bugs if someone tries to treat them as a
   Gecko object).

3) Fix a preexisting bug in sequence wrapping where we'd try to
   JS_DefineElement twice if we were wrapping a null value for a
   sequence of nullable interface objects.
2012-10-10 15:57:57 -04:00
Bobby Holley
02fbd34534 Bug 761695 - Implement expando traps for ProxyXrayTraits DOMXrayTraits. r=peterv
For new DOM proxies, we could probably use the Xray expando machinery for the
regular expando object as well, and free up one of the reserved slots. That's
more than I want to bite off for the moment, though.

I also decided not to block on bug 760095 and just kick the problem of globals
with new binding down the road a little bit.
2012-10-05 18:59:23 +02:00
Bill McCloskey
88913893e5 Bug 787856 - Convert js::GetObjectProto to support lazy protos (r=bhackett) 2012-09-03 16:42:10 -07:00
Luke Wagner
94264a0bc8 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley)
--HG--
extra : rebase_source : 12acf2288285f5caefd7fecea8207de3a47eab5b
2012-08-21 18:42:53 -07:00
Peter Van der Beken
13f425b97c Fix for bug 768692 (Move DOM list binding generation to the new DOM binding codegen). r=bzbarsky.
--HG--
extra : rebase_source : 651a0fac4c9a87ef1c0a9cd91588c6421fd050c4
2012-05-22 15:46:20 +02:00
Eric Faust
6b5acbfcaf Bug 747287 - Followup: Add cast to fix build. (r=me) 2012-08-07 22:57:07 -07:00
Eric Faust
3e8a5ebf81 Bug 781040 - Fault in methods and accessors with JSJitinfos on ResolveProperty. (r=bz,benjamin) 2012-08-07 22:26:19 -07:00
Eric Faust
17695b5079 Bug 775788 - Modify JSFunctionSpec to accept JSJitInfos. (r=luke) 2012-08-07 22:26:19 -07:00
Boris Zbarsky
a00c8cb2bd Bug 747287 - Part 3: Add callback interface to allow JIT to interrogate DOM. (r=peterv) 2012-08-07 22:26:18 -07:00
Eric Faust
b451a97a53 Bug 747287 - Part 1: Generate JSJitInfos and specialized accessors for Paris bindings. (r=peterv) 2012-08-07 22:26:18 -07:00
Ms2ger
e1e44bb6f1 Bug 774705 - Part b: Throw a TypeError when trying to construct an interface without a constructor; r=bz 2012-08-04 09:44:00 +02:00
Ed Morley
bba173e66e Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger
5363dc0480 Bug 774705 - Part b: Throw a TypeError when trying to construct an interface without a constructor; r=bz 2012-08-04 09:44:00 +02:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Benjamin Peterson
d1064385b3 Bug 761723 - Save script sources to implement Function.prototype.toString. r=jorendorff,njn,jimb,jst,Ms2ger
--HG--
extra : rebase_source : de1b55647780a30f98fe84d29ee3cb4a437a3ece
2012-07-20 20:17:38 +02:00
Peter Van der Beken
d5f4fcc033 Fix for bug 774775 (XRayWrapper does not handle new bindings constants) - refactor code. r=bz.
--HG--
extra : rebase_source : 317d5942dde4427384320cb334f794f7fef37a2e
2012-07-18 13:52:07 +02:00
Ms2ger
2be7de56d2 Bug 765464 - Part c: Throw some TypeErrors; r=khuey 2012-07-18 12:36:08 +02:00
Bobby Holley
50c7e8bc6b Bug 763341 - Handle wrappers in new dom binding QI. r=bz
The |ok| parent check goes away because it's ill-conceived. All it's really checking is that proxies are parented to the global, and it's impossible to port to SpecialPowers, because SpecialPowers will think that the proxy is parented to the SpecialPowers global. I don't think this check is very important, so I removed it.
2012-06-12 15:44:21 +02:00
Boris Zbarsky
b4e6056558 Bug 761707 part 2. Drop the vestigial jsclass argument to UnwrapDOMObject. r=bholley 2012-06-06 15:59:46 -04:00
Boris Zbarsky
1e84000e3b Bug 753522. Add support for controlling the existence of methods, properties, interface constants, etc with a pref. r=peterv 2012-05-23 12:44:48 -04:00
Ms2ger
5623a92079 Bug 754968 - Part c: Make BindingUtils.h not require private xpconnect headers; r=bholley 2012-05-18 10:29:40 +02:00
David Rajchenbach-Teller
50cef29c5b Bug 739740 - Export libc constants to JS. r=khuey 2012-05-09 12:00:48 +02:00
Ryan VanderMeulen
270738f819 Back out b5fd22efe23d (bug 739740) due to bustage. r=TryFTW 2012-05-03 18:51:14 -04:00
David Rajchenbach-Teller
256ca5f4b1 Bug 739740 - Export libc constants to JS. r=khuey,glandium 2012-04-30 12:14:38 +02:00
Peter Van der Beken
ed885d50a9 Fix for bug 741367 (Creating second XMLHttpRequest via Components.Constructor throws NS_ERROR_FAILURE): don't overwrite content-defined properties. r=bz.
--HG--
extra : rebase_source : f9c7fe34d4cde28cafea0536e305704e2dc04ff7
2012-04-27 09:57:09 +02:00
Peter Van der Beken
7eb62e9704 Fix for bug 742156 (Stringifying EventTarget throws): implement a toString method for interface objects. r=bz.
--HG--
extra : rebase_source : cd692b5231e4d183e0bbd368965e704ede54661f
2012-05-02 15:28:17 +02:00
Boris Zbarsky
577419e736 Bug 748983. Fix the instanceof behavior for new bindings in situations where we don't need a custom hasInstance hook. r=peterv 2012-05-03 00:35:38 -04:00
Boris Zbarsky
32c7f6e634 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.

--HG--
rename : dom/bindings/Utils.cpp => dom/bindings/BindingUtils.cpp
rename : dom/bindings/Utils.h => dom/bindings/BindingUtils.h
2012-05-03 00:35:38 -04:00