Bug 1224061 followup to fix bustage. r=me on a CLOSED TREE IGNORE IDL
authorKyle Huey <khuey@kylehuey.com>
Fri, 13 Nov 2015 09:23:59 +0800
changeset 308670 bf864106469cefbea0cb1f9931d35a9b23350c73
parent 308669 2d0012628fce7ad775d48957449c62d23cdb5d1f
child 308671 31545e96d6e06544af2c5ccf61c48545617d526c
push id7513
push useratolfsen@mozilla.com
push dateFri, 13 Nov 2015 14:03:43 +0000
reviewersme
bugs1224061
milestone45.0a1
Bug 1224061 followup to fix bustage. r=me on a CLOSED TREE IGNORE IDL
dom/interfaces/events/nsIDOMEvent.idl
dom/workers/ServiceWorkerEvents.cpp
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -156,17 +156,17 @@ interface nsIDOMEvent : nsISupports
    *                       recommended that third parties adding their 
    *                       own events use their own prefix to avoid 
    *                       confusion and lessen the probability of 
    *                       conflicts with other new events.
    * @param   canBubbleArg Specifies whether or not the event can bubble.
    * @param   cancelableArg Specifies whether or not the event's default 
    *                        action can be prevented.
    */
-  [notxpcom]
+  [notxpcom,nostdcall]
   void                      initEvent(in DOMString eventTypeArg,
                                       in boolean canBubbleArg,
                                       in boolean cancelableArg);
 
   /**
    * Used to indicate whether preventDefault() has been called for this event.
    */
   readonly attribute boolean defaultPrevented;
--- a/dom/workers/ServiceWorkerEvents.cpp
+++ b/dom/workers/ServiceWorkerEvents.cpp
@@ -1041,21 +1041,17 @@ ExtendableMessageEvent::Constructor(cons
 /* static */ already_AddRefed<ExtendableMessageEvent>
 ExtendableMessageEvent::Constructor(mozilla::dom::EventTarget* aEventTarget,
                                     const nsAString& aType,
                                     const ExtendableMessageEventInit& aOptions,
                                     ErrorResult& aRv)
 {
   RefPtr<ExtendableMessageEvent> event = new ExtendableMessageEvent(aEventTarget);
 
-  aRv = event->InitEvent(aType, aOptions.mBubbles, aOptions.mCancelable);
-  if (NS_WARN_IF(aRv.Failed())) {
-    return nullptr;
-  }
-
+  event->InitEvent(aType, aOptions.mBubbles, aOptions.mCancelable);
   bool trusted = event->Init(aEventTarget);
   event->SetTrusted(trusted);
 
   event->mData = aOptions.mData;
   event->mOrigin = aOptions.mOrigin;
   event->mLastEventId = aOptions.mLastEventId;
 
   if (aOptions.mSource.WasPassed() && !aOptions.mSource.Value().IsNull()) {