Closed Bug 859808 Opened 11 years ago Closed 10 years ago

nsIDOMMozCellBroadcastMessage ported to WebIDL

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 906398

People

(Reporter: baku, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

      No description provided.
Attached patch patchSplinter Review
Attachment #735241 - Flags: review?(Ms2ger)
Comment on attachment 735241 [details] [diff] [review]
patch

Review of attachment 735241 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with these comments.

::: dom/bindings/Bindings.conf
@@ +248,5 @@
>  }],
>  
> +'MozCellBroadcast': {
> +    'nativeType': 'mozilla::dom::CellBroadcast',
> +    'headerFile': 'mozilla/dom/CellBroadcast.h'

Shouldn't need to have headerFile.

::: dom/cellbroadcast/src/CellBroadcast.cpp
@@ +8,4 @@
>  #include "nsIDOMMozCellBroadcastEvent.h"
>  #include "nsIDOMMozCellBroadcastMessage.h"
>  #include "mozilla/Services.h"
>  #include "nsDOMClassInfo.h"

Do you still need this?

::: dom/cellbroadcast/src/CellBroadcast.h
@@ +42,5 @@
> +  {
> +    return GetOwner();
> +  }
> +
> +  virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;

aTriedToWrap?

@@ +44,5 @@
> +  }
> +
> +  virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
> +
> +  inline JSObject* GetOnreceived(JSContext* aCx)

Use IMPL_EVENT_HANDLER

::: dom/webidl/MozCellBroadcast.webidl
@@ +5,5 @@
> + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> +
> +interface MozCellBroadcast : EventTarget {
> +  [TreatNonCallableAsNull, SetterThrows]
> +  attribute Function? onreceived;

This should just be

[SetterThrows]
attribute EventHandler onreceived;
Attachment #735241 - Flags: review?(Ms2ger) → review+
(In reply to :Ms2ger from comment #2)
> Comment on attachment 735241 [details] [diff] [review]
> patch
> 
> Review of attachment 735241 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r=me with these comments.
> 
> ::: dom/bindings/Bindings.conf
> @@ +248,5 @@
> >  }],
> >  
> > +'MozCellBroadcast': {
> > +    'nativeType': 'mozilla::dom::CellBroadcast',
> > +    'headerFile': 'mozilla/dom/CellBroadcast.h'
> 
> Shouldn't need to have headerFile.

No, otherwise the header file should be called MozCellBroadcast.h

Wait :) The only wait to test this patch was to write it for b2g18. This is the reason why I don't have IMPL_EVENT_HANDLER, aTriedToWrap & C.
> No, otherwise the header file should be called MozCellBroadcast.h

No, because the headerFile is derived from the nativeType.
Attached patch m-c patchSplinter Review
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: