Bug 1436508 part 4. Remove some XPOM goop from ExtendableMessageEvent. r=masayuki
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 09 Feb 2018 11:17:08 -0500
changeset 403176 51d688aa1c80
parent 403175 cc87507a729b
child 403177 4e2f9290346a
push id33416
push userarchaeopteryx@coole-files.de
push date2018-02-09 22:32 +0000
treeherdermozilla-central@c2cddb0cbb20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1436508
milestone60.0a1
Bug 1436508 part 4. Remove some XPOM goop from ExtendableMessageEvent. r=masayuki MozReview-Commit-ID: Hx9NYaslnCM
dom/serviceworkers/ServiceWorkerEvents.h
--- a/dom/serviceworkers/ServiceWorkerEvents.h
+++ b/dom/serviceworkers/ServiceWorkerEvents.h
@@ -69,17 +69,16 @@ protected:
   bool
   WaitOnPromise(Promise& aPromise);
 
   explicit ExtendableEvent(mozilla::dom::EventTarget* aOwner);
   ~ExtendableEvent() {}
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
-  NS_FORWARD_TO_EVENT
 
   void
   SetKeepAliveHandler(ExtensionsHandler* aExtensionsHandler);
 
   virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
   {
     return mozilla::dom::ExtendableEventBinding::Wrap(aCx, this, aGivenProto);
   }
@@ -279,18 +278,16 @@ protected:
   explicit ExtendableMessageEvent(EventTarget* aOwner);
   ~ExtendableMessageEvent();
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ExtendableMessageEvent,
                                                          ExtendableEvent)
 
-  NS_FORWARD_TO_EVENT
-
   virtual JSObject* WrapObjectInternal(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
   {
     return mozilla::dom::ExtendableMessageEventBinding::Wrap(aCx, this, aGivenProto);
   }
 
   static already_AddRefed<ExtendableMessageEvent>
   Constructor(mozilla::dom::EventTarget* aOwner,
@@ -304,26 +301,24 @@ public:
               const ExtendableMessageEventInit& aOptions,
               ErrorResult& aRv);
 
   void GetData(JSContext* aCx, JS::MutableHandle<JS::Value> aData,
                ErrorResult& aRv);
 
   void GetSource(Nullable<OwningClientOrServiceWorkerOrMessagePort>& aValue) const;
 
-  NS_IMETHOD GetOrigin(nsAString& aOrigin)
+  void GetOrigin(nsAString& aOrigin) const
   {
     aOrigin = mOrigin;
-    return NS_OK;
   }
 
-  NS_IMETHOD GetLastEventId(nsAString& aLastEventId)
+  void GetLastEventId(nsAString& aLastEventId) const
   {
     aLastEventId = mLastEventId;
-    return NS_OK;
   }
 
   void GetPorts(nsTArray<RefPtr<MessagePort>>& aPorts);
 };
 
 } // namespace dom
 } // namespace mozilla