nsIDOMMozCellBroadcastMessage ported to WebIDL

RESOLVED DUPLICATE of bug 906398

Status

()

Core
DOM
RESOLVED DUPLICATE of bug 906398
5 years ago
3 years ago

People

(Reporter: baku, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Comment hidden (empty)
(Reporter)

Comment 1

5 years ago
Created attachment 735241 [details] [diff] [review]
patch
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+
(Reporter)

Comment 3

5 years ago
(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.
(Reporter)

Comment 5

5 years ago
Created attachment 735774 [details] [diff] [review]
m-c patch

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 906398
You need to log in before you can comment on or make changes to this bug.