Closed
Bug 787574
Opened 12 years ago
Closed 12 years ago
Add a script for creating stub implementations of Web IDL interfaces
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
Details
Attachments
(1 file, 1 obsolete file)
2.97 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment on attachment 657460 [details] [diff] [review]
Patch (v1)
A few comments:
1) It would be better to put the class in the mozilla::dom namespace. That's
the namespace the bindings expect the implementation class to be in by
default; if you do it that way, you don't have to indicate the nativeType in
the conf file.
2) Does it make sense to make GetParentObject pure vitrtual so people have to
actually make sure to implement it correctly?
3) I would prefer we don't do the "moz" thing. Just SkeletonBinding. We
shouldn't really be prefixing DOM APIs anyway, if we can avoid it.
4) The indent on the WrapObject function header is going to be off depending on
the length of the classname. Perhaps just put it all on one line?
r=me with the above at least considered.
Attachment #657460 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #2)
> Comment on attachment 657460 [details] [diff] [review]
> Patch (v1)
>
> A few comments:
>
> 1) It would be better to put the class in the mozilla::dom namespace. That's
> the namespace the bindings expect the implementation class to be in by
> default; if you do it that way, you don't have to indicate the nativeType
> in
> the conf file.
Good point, I'll do that.
> 2) Does it make sense to make GetParentObject pure vitrtual so people have to
> actually make sure to implement it correctly?
Hmm, I thought about that... But I don't really want to advertize that GetParentObject needs to be virtual. How about I make the body of the function not compile by let's say, |return somethingSensible;|?
> 3) I would prefer we don't do the "moz" thing. Just SkeletonBinding. We
> shouldn't really be prefixing DOM APIs anyway, if we can avoid it.
OK, will do.
> 4) The indent on the WrapObject function header is going to be off depending
> on
> the length of the classname. Perhaps just put it all on one line?
Sure, I'll put it all on the same line.
Comment 4•12 years ago
|
||
> How about I make the body of the function not compile by let's say, |return
> somethingSensible;|?
Sounds good.
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #657460 -
Attachment is obsolete: true
Assignee | ||
Comment 6•12 years ago
|
||
Target Milestone: --- → mozilla18
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 8•12 years ago
|
||
Comment on attachment 658928 [details] [diff] [review]
Patch for landing
Review of attachment 658928 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/stubgenerator/Skeleton.h
@@ +7,5 @@
> +#include "nsWrapperCache.h"
> +#include "nsCycleCollectionParticipant.h"
> +#include "mozilla/Attributes.h"
> +
> +class JSContext;
Nit: I believe some compilers will warn here, because JSContext is actually a struct, not a class.
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to :Ms2ger from comment #8)
> Comment on attachment 658928 [details] [diff] [review]
> Patch for landing
>
> Review of attachment 658928 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/bindings/stubgenerator/Skeleton.h
> @@ +7,5 @@
> > +#include "nsWrapperCache.h"
> > +#include "nsCycleCollectionParticipant.h"
> > +#include "mozilla/Attributes.h"
> > +
> > +class JSContext;
>
> Nit: I believe some compilers will warn here, because JSContext is actually
> a struct, not a class.
Thanks, fixed. https://hg.mozilla.org/mozilla-central/rev/8f9db0705d2f
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•