Bug 823107 - Make nsIDOMEvent::SetTrusted return void; r=smaug
authorMs2ger <ms2ger@gmail.com>
Sat, 22 Dec 2012 09:18:08 +0100
changeset 116681 57427d474c9a4f753380f6eba62a8d433f6cc5c1
parent 116680 dbb76b67ed73ef9a61bfe89953aaf15afe8f98df
child 116682 bf26f61a07489ea75bf294e143109e1fc83e0975
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs823107
milestone20.0a1
Bug 823107 - Make nsIDOMEvent::SetTrusted return void; r=smaug
content/base/src/WebSocket.cpp
content/base/src/nsContentUtils.cpp
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMEvent.h
content/events/src/nsDOMEventTargetHelper.cpp
dom/base/DOMRequest.cpp
dom/base/nsGlobalWindow.cpp
dom/bluetooth/BluetoothPropertyEvent.h
dom/bluetooth/nsIDOMBluetoothDeviceAddressEvent.idl
dom/bluetooth/nsIDOMBluetoothDeviceEvent.idl
dom/bluetooth/nsIDOMBluetoothPropertyEvent.idl
dom/cellbroadcast/interfaces/nsIDOMMozCellBroadcastEvent.idl
dom/file/LockedFile.cpp
dom/icc/interfaces/SimToolKit.idl
dom/icc/interfaces/nsIDOMICCCardLockErrorEvent.idl
dom/icc/src/StkCommandEvent.h
dom/indexedDB/IDBEvents.cpp
dom/indexedDB/nsIIDBVersionChangeEvent.idl
dom/interfaces/apps/nsIDOMMozApplicationEvent.idl
dom/interfaces/contacts/nsIDOMMozContactChangeEvent.idl
dom/interfaces/devicestorage/nsIDOMDeviceStorageChangeEvent.idl
dom/interfaces/events/nsIDOMAnimationEvent.idl
dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
dom/interfaces/events/nsIDOMCloseEvent.idl
dom/interfaces/events/nsIDOMCommandEvent.idl
dom/interfaces/events/nsIDOMCompositionEvent.idl
dom/interfaces/events/nsIDOMCustomEvent.idl
dom/interfaces/events/nsIDOMDataContainerEvent.idl
dom/interfaces/events/nsIDOMDeviceLightEvent.idl
dom/interfaces/events/nsIDOMDeviceMotionEvent.idl
dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
dom/interfaces/events/nsIDOMDeviceProximityEvent.idl
dom/interfaces/events/nsIDOMDragEvent.idl
dom/interfaces/events/nsIDOMEvent.idl
dom/interfaces/events/nsIDOMHashChangeEvent.idl
dom/interfaces/events/nsIDOMKeyEvent.idl
dom/interfaces/events/nsIDOMMessageEvent.idl
dom/interfaces/events/nsIDOMMouseEvent.idl
dom/interfaces/events/nsIDOMMouseScrollEvent.idl
dom/interfaces/events/nsIDOMMutationEvent.idl
dom/interfaces/events/nsIDOMNotifyAudioAvailableEvent.idl
dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
dom/interfaces/events/nsIDOMPageTransitionEvent.idl
dom/interfaces/events/nsIDOMPopStateEvent.idl
dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
dom/interfaces/events/nsIDOMProgressEvent.idl
dom/interfaces/events/nsIDOMScrollAreaEvent.idl
dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
dom/interfaces/events/nsIDOMSmartCardEvent.idl
dom/interfaces/events/nsIDOMTouchEvent.idl
dom/interfaces/events/nsIDOMTransitionEvent.idl
dom/interfaces/events/nsIDOMUIEvent.idl
dom/interfaces/events/nsIDOMUserProximityEvent.idl
dom/interfaces/events/nsIDOMWheelEvent.idl
dom/interfaces/load-save/nsIDOMLSProgressEvent.idl
dom/interfaces/settings/nsIDOMMozSettingsEvent.idl
dom/interfaces/smil/nsIDOMTimeEvent.idl
dom/interfaces/storage/nsIDOMStorageEvent.idl
dom/interfaces/svg/nsIDOMSVGEvent.idl
dom/interfaces/svg/nsIDOMSVGZoomEvent.idl
dom/interfaces/xul/nsIDOMXULCommandEvent.idl
dom/network/interfaces/nsIDOMDataErrorEvent.idl
dom/network/interfaces/nsIDOMUSSDReceivedEvent.idl
dom/network/src/DataErrorEvent.h
dom/network/src/USSDReceivedEvent.h
dom/sms/interfaces/nsIDOMSmsEvent.idl
dom/sms/src/SmsRequest.cpp
dom/telephony/CallEvent.h
dom/telephony/nsIDOMCallEvent.idl
dom/telephony/nsIDOMVoicemailEvent.idl
dom/wifi/nsIDOMMozWifiConnectionInfoEvent.idl
dom/wifi/nsIDOMMozWifiStatusChangeEvent.idl
security/manager/ssl/src/nsSmartCardEvent.cpp
--- a/content/base/src/WebSocket.cpp
+++ b/content/base/src/WebSocket.cpp
@@ -855,18 +855,17 @@ WebSocket::CreateAndDispatchSimpleEvent(
   nsCOMPtr<nsIDOMEvent> event;
   rv = NS_NewDOMEvent(getter_AddRefs(event), nullptr, nullptr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // it doesn't bubble, and it isn't cancelable
   rv = event->InitEvent(aName, false, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  event->SetTrusted(true);
 
   return DispatchDOMEvent(nullptr, event, nullptr, nullptr);
 }
 
 nsresult
 WebSocket::CreateAndDispatchMessageEvent(const nsACString& aData,
                                          bool isBinary)
 {
@@ -924,18 +923,17 @@ WebSocket::CreateAndDispatchMessageEvent
   nsCOMPtr<nsIDOMMessageEvent> messageEvent = do_QueryInterface(event);
   rv = messageEvent->InitMessageEvent(NS_LITERAL_STRING("message"),
                                       false, false,
                                       jsData,
                                       mUTF16Origin,
                                       EmptyString(), nullptr);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  event->SetTrusted(true);
 
   return DispatchDOMEvent(nullptr, event, nullptr, nullptr);
 }
 
 nsresult
 WebSocket::CreateAndDispatchCloseEvent(bool aWasClean,
                                        uint16_t aCode,
                                        const nsString &aReason)
@@ -955,18 +953,17 @@ WebSocket::CreateAndDispatchCloseEvent(b
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMCloseEvent> closeEvent = do_QueryInterface(event);
   rv = closeEvent->InitCloseEvent(NS_LITERAL_STRING("close"),
                                   false, false,
                                   aWasClean, aCode, aReason);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  event->SetTrusted(true);
 
   return DispatchDOMEvent(nullptr, event, nullptr, nullptr);
 }
 
 bool
 WebSocket::PrefEnabled()
 {
   return Preferences::GetBool("network.websocket.enabled", true);
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -3435,18 +3435,17 @@ nsresult GetEventAndTarget(nsIDocument* 
   nsCOMPtr<nsIDOMEvent> event;
   nsresult rv =
     domDoc->CreateEvent(NS_LITERAL_STRING("Events"), getter_AddRefs(event));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = event->InitEvent(aEventName, aCanBubble, aCancelable);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = event->SetTrusted(aTrusted);
-  NS_ENSURE_SUCCESS(rv, rv);
+  event->SetTrusted(aTrusted);
 
   rv = event->SetTarget(target);
   NS_ENSURE_SUCCESS(rv, rv);
 
   event.forget(aEvent);
   target.forget(aTargetOut);
   return NS_OK;
 }
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -259,21 +259,20 @@ nsDOMEvent::GetOriginalTarget(nsIDOMEven
 {
   if (mEvent->originalTarget) {
     return GetDOMEventTarget(mEvent->originalTarget, aOriginalTarget);
   }
 
   return GetTarget(aOriginalTarget);
 }
 
-NS_IMETHODIMP
+NS_IMETHODIMP_(void)
 nsDOMEvent::SetTrusted(bool aTrusted)
 {
   mEvent->mFlags.mIsTrusted = aTrusted;
-  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMEvent::Initialize(nsISupports* aOwner, JSContext* aCx, JSObject* aObj,
                        uint32_t aArgc, jsval* aArgv)
 {
   NS_ENSURE_TRUE(aArgc >= 1, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
 
--- a/content/events/src/nsDOMEvent.h
+++ b/content/events/src/nsDOMEvent.h
@@ -97,14 +97,14 @@ protected:
   NS_IMETHOD GetExplicitOriginalTarget(nsIDOMEventTarget** aExplicitOriginalTarget) { return _to GetExplicitOriginalTarget(aExplicitOriginalTarget); } \
   NS_IMETHOD PreventBubble() { return _to PreventBubble(); } \
   NS_IMETHOD PreventCapture() { return _to PreventCapture(); } \
   NS_IMETHOD GetPreventDefault(bool* aRetval) { return _to GetPreventDefault(aRetval); } \
   NS_IMETHOD GetIsTrusted(bool* aIsTrusted) { return _to GetIsTrusted(aIsTrusted); } \
   NS_IMETHOD SetTarget(nsIDOMEventTarget *aTarget) { return _to SetTarget(aTarget); } \
   NS_IMETHOD_(bool) IsDispatchStopped(void) { return _to IsDispatchStopped(); } \
   NS_IMETHOD_(nsEvent *) GetInternalNSEvent(void) { return _to GetInternalNSEvent(); } \
-  NS_IMETHOD SetTrusted(bool aTrusted) { return _to SetTrusted(aTrusted); }
+  NS_IMETHOD_(void) SetTrusted(bool aTrusted) { _to SetTrusted(aTrusted); }
 
 #define NS_FORWARD_TO_NSDOMEVENT_NO_SERIALIZATION_NO_DUPLICATION \
   NS_FORWARD_NSIDOMEVENT_NO_SERIALIZATION_NO_DUPLICATION(nsDOMEvent::)
 
 #endif // nsDOMEvent_h__
--- a/content/events/src/nsDOMEventTargetHelper.cpp
+++ b/content/events/src/nsDOMEventTargetHelper.cpp
@@ -216,18 +216,17 @@ nsDOMEventTargetHelper::DispatchTrustedE
   NS_ENSURE_SUCCESS(rv, rv);
 
   return DispatchTrustedEvent(event);
 }
 
 nsresult
 nsDOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event)
 {
-  nsresult rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  event->SetTrusted(true);
 
   bool dummy;
   return DispatchEvent(event, &dummy);
 }
 
 nsresult
 nsDOMEventTargetHelper::SetEventHandler(nsIAtom* aType,
                                         JSContext* aCx,
--- a/dom/base/DOMRequest.cpp
+++ b/dom/base/DOMRequest.cpp
@@ -157,20 +157,17 @@ DOMRequest::FireEvent(const nsAString& a
   }
 
   nsRefPtr<nsDOMEvent> event = new nsDOMEvent(nullptr, nullptr);
   nsresult rv = event->InitEvent(aType, aBubble, aCancelable);
   if (NS_FAILED(rv)) {
     return;
   }
 
-  rv = event->SetTrusted(true);
-  if (NS_FAILED(rv)) {
-    return;
-  }
+  event->SetTrusted(true);
 
   bool dummy;
   DispatchEvent(event, &dummy);
 }
 
 void
 DOMRequest::RootResultVal()
 {
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -8098,18 +8098,17 @@ nsGlobalWindow::FireHashchange(const nsA
   NS_ENSURE_TRUE(hashchangeEvent, NS_ERROR_UNEXPECTED);
 
   // The hashchange event bubbles and isn't cancellable.
   rv = hashchangeEvent->InitHashChangeEvent(NS_LITERAL_STRING("hashchange"),
                                             true, false,
                                             aOldURL, aNewURL);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = domEvent->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  domEvent->SetTrusted(true);
 
   bool dummy;
   return DispatchEvent(hashchangeEvent, &dummy);
 }
 
 nsresult
 nsGlobalWindow::DispatchSyncPopState()
 {
@@ -8153,18 +8152,17 @@ nsGlobalWindow::DispatchSyncPopState()
 
   // Initialize the popstate event, which does bubble but isn't cancellable.
   nsCOMPtr<nsIDOMPopStateEvent> popstateEvent = do_QueryInterface(domEvent);
   rv = popstateEvent->InitPopStateEvent(NS_LITERAL_STRING("popstate"),
                                         true, false,
                                         stateObj);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = domEvent->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  domEvent->SetTrusted(true);
 
   nsCOMPtr<nsIDOMEventTarget> outerWindow =
     do_QueryInterface(GetOuterWindow());
   NS_ENSURE_TRUE(outerWindow, NS_ERROR_UNEXPECTED);
 
   rv = domEvent->SetTarget(outerWindow);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -9137,18 +9135,17 @@ nsGlobalWindow::Observe(nsISupports* aSu
     nsRefPtr<nsDOMEvent> event = new nsDOMEvent(nullptr, nullptr);
     nsresult rv = event->InitEvent(
       !nsCRT::strcmp(aTopic, NS_NETWORK_ACTIVITY_BLIP_UPLOAD_TOPIC)
         ? NETWORK_UPLOAD_EVENT_NAME
         : NETWORK_DOWNLOAD_EVENT_NAME,
       false, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = event->SetTrusted(true);
-    NS_ENSURE_SUCCESS(rv, rv);
+    event->SetTrusted(true);
 
     bool dummy;
     return DispatchEvent(event, &dummy);
   }
 #endif // MOZ_B2G
 
   NS_WARNING("unrecognized topic in nsGlobalWindow::Observe");
   return NS_ERROR_FAILURE;
--- a/dom/bluetooth/BluetoothPropertyEvent.h
+++ b/dom/bluetooth/BluetoothPropertyEvent.h
@@ -32,21 +32,19 @@ public:
   Dispatch(nsIDOMEventTarget* aTarget, const nsAString& aEventType)
   {
     NS_ASSERTION(aTarget, "Null pointer!");
     NS_ASSERTION(!aEventType.IsEmpty(), "Empty event type!");
 
     nsresult rv = InitEvent(aEventType, false, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = SetTrusted(true);
-    NS_ENSURE_SUCCESS(rv, rv);
+    SetTrusted(true);
 
-    nsIDOMEvent* thisEvent =
-      static_cast<nsDOMEvent*>(const_cast<BluetoothPropertyEvent*>(this));
+    nsDOMEvent* thisEvent = this;
 
     bool dummy;
     rv = aTarget->DispatchEvent(thisEvent, &dummy);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
--- a/dom/bluetooth/nsIDOMBluetoothDeviceAddressEvent.idl
+++ b/dom/bluetooth/nsIDOMBluetoothDeviceAddressEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(afcb832f-bbb5-45fa-b703-f8185bd2d26d)]
+[scriptable, builtinclass, uuid(90c55b1c-2da5-4a30-bf09-0c70369a8d89)]
 interface nsIDOMBluetoothDeviceAddressEvent : nsIDOMEvent
 {
   readonly attribute DOMString  deviceAddress;
 
   [noscript] void initBluetoothDeviceAddressEvent(in DOMString aType,
                                                   in boolean aCanBubble,
                                                   in boolean aCancelable,
                                                   in DOMString aDeviceAddress);
--- a/dom/bluetooth/nsIDOMBluetoothDeviceEvent.idl
+++ b/dom/bluetooth/nsIDOMBluetoothDeviceEvent.idl
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMBluetoothDevice;
 
-[scriptable, builtinclass, uuid(819b4683-23a9-4af9-96b9-2c40a14ecb0b)]
+[scriptable, builtinclass, uuid(e53dd06e-acd7-444a-914a-5fb60df0ad5b)]
 interface nsIDOMBluetoothDeviceEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMBluetoothDevice device;
 
   [noscript] void initBluetoothDeviceEvent(in DOMString aType,
                                            in boolean aCanBubble,
                                            in boolean aCancelable,
                                            in nsIDOMBluetoothDevice aDevice);
--- a/dom/bluetooth/nsIDOMBluetoothPropertyEvent.idl
+++ b/dom/bluetooth/nsIDOMBluetoothPropertyEvent.idl
@@ -1,13 +1,13 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(5927bb1f-e8eb-4b40-ae20-cd02f34412ce)]
+[scriptable, builtinclass, uuid(ce268e66-2d1a-491a-833c-fb27dc50dc46)]
 interface nsIDOMBluetoothPropertyEvent : nsIDOMEvent
 {
   readonly attribute DOMString property;
 };
--- a/dom/cellbroadcast/interfaces/nsIDOMMozCellBroadcastEvent.idl
+++ b/dom/cellbroadcast/interfaces/nsIDOMMozCellBroadcastEvent.idl
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMMozCellBroadcastMessage;
 
-[scriptable, builtinclass, uuid(0be33bb9-930f-410b-8d61-a0fc5f4dcf7d)]
+[scriptable, builtinclass, uuid(f955095f-01e4-4520-b299-7124ec7c63aa)]
 interface nsIDOMMozCellBroadcastEvent : nsIDOMEvent
 {
   //[binaryname(MessageMoz)]
   readonly attribute nsIDOMMozCellBroadcastMessage message;
 
   [noscript] void initMozCellBroadcastEvent(in DOMString aType,
                                             in boolean aCanBubble,
                                             in boolean aCancelable,
--- a/dom/file/LockedFile.cpp
+++ b/dom/file/LockedFile.cpp
@@ -199,18 +199,17 @@ private:
 
 already_AddRefed<nsDOMEvent>
 CreateGenericEvent(const nsAString& aType, bool aBubbles, bool aCancelable)
 {
   nsRefPtr<nsDOMEvent> event(new nsDOMEvent(nullptr, nullptr));
   nsresult rv = event->InitEvent(aType, aBubbles, aCancelable);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, nullptr);
+  event->SetTrusted(true);
 
   return event.forget();
 }
 
 inline nsresult
 GetInputStreamForJSVal(const jsval& aValue, JSContext* aCx,
                        nsIInputStream** aInputStream, uint64_t* aInputLength)
 {
--- a/dom/icc/interfaces/SimToolKit.idl
+++ b/dom/icc/interfaces/SimToolKit.idl
@@ -452,17 +452,17 @@ dictionary MozStkCommand
    *
    * When typeOfCommand is
    * - STK_CMD_REFRESH
    * options is null.
    */
   jsval options;
 };
 
-[scriptable, builtinclass, uuid(06bbc6fa-9b59-4db6-b66b-3b26f9c379df)]
+[scriptable, builtinclass, uuid(21cd2f25-ebea-43f8-8255-eaa4e1182858)]
 interface nsIDOMMozStkCommandEvent : nsIDOMEvent
 {
   /**
    * See nsIDOMMozStkCommand for the detail of command.
    */
   [implicit_jscontext]
   readonly attribute jsval command;
 };
--- a/dom/icc/interfaces/nsIDOMICCCardLockErrorEvent.idl
+++ b/dom/icc/interfaces/nsIDOMICCCardLockErrorEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(109c1117-1199-47aa-aad2-ea9f456220fa)]
+[scriptable, builtinclass, uuid(05d269bc-7049-4df8-b72f-4318aaee54de)]
 interface nsIDOMICCCardLockErrorEvent : nsIDOMEvent
 {
   readonly attribute DOMString lockType;
   readonly attribute long retryCount;
 
   [noscript] void initICCCardLockErrorEvent(in DOMString aType,
                                             in boolean aCanBubble,
                                             in boolean aCancelable,
--- a/dom/icc/src/StkCommandEvent.h
+++ b/dom/icc/src/StkCommandEvent.h
@@ -30,21 +30,19 @@ public:
   Dispatch(nsIDOMEventTarget* aTarget, const nsAString& aEventType)
   {
     NS_ASSERTION(aTarget, "Null pointer!");
     NS_ASSERTION(!aEventType.IsEmpty(), "Empty event type!");
 
     nsresult rv = InitEvent(aEventType, false, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = SetTrusted(true);
-    NS_ENSURE_SUCCESS(rv, rv);
+    SetTrusted(true);
 
-    nsIDOMEvent* thisEvent =
-      static_cast<nsDOMEvent*>(const_cast<StkCommandEvent*>(this));
+    nsDOMEvent* thisEvent = this;
 
     bool dummy;
     rv = aTarget->DispatchEvent(thisEvent, &dummy);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
--- a/dom/indexedDB/IDBEvents.cpp
+++ b/dom/indexedDB/IDBEvents.cpp
@@ -44,42 +44,38 @@ mozilla::dom::indexedDB::CreateGenericEv
                                             Cancelable aCancelable)
 {
   nsRefPtr<nsDOMEvent> event(new nsDOMEvent(nullptr, nullptr));
   nsresult rv = event->InitEvent(aType,
                                  aBubbles == eDoesBubble ? true : false,
                                  aCancelable == eCancelable ? true : false);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, nullptr);
+  event->SetTrusted(true);
 
   return event.forget();
 }
 
 // static
 already_AddRefed<nsDOMEvent>
 IDBVersionChangeEvent::CreateInternal(const nsAString& aType,
                                       uint64_t aOldVersion,
                                       uint64_t aNewVersion)
 {
   nsRefPtr<IDBVersionChangeEvent> event(new IDBVersionChangeEvent());
 
   nsresult rv = event->InitEvent(aType, false, false);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, nullptr);
+  event->SetTrusted(true);
 
   event->mOldVersion = aOldVersion;
   event->mNewVersion = aNewVersion;
 
-  nsDOMEvent* result;
-  event.forget(&result);
-  return result;
+  return event.forget();
 }
 
 // static
 already_AddRefed<nsIRunnable>
 IDBVersionChangeEvent::CreateRunnableInternal(const nsAString& aType,
                                               uint64_t aOldVersion,
                                               uint64_t aNewVersion,
                                               nsIDOMEventTarget* aTarget)
--- a/dom/indexedDB/nsIIDBVersionChangeEvent.idl
+++ b/dom/indexedDB/nsIIDBVersionChangeEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(bb9797ae-6959-47cb-893e-73d3a7018d6d)]
+[scriptable, builtinclass, uuid(08a6b8b1-92fa-4f80-98cc-370143b11ff3)]
 interface nsIIDBVersionChangeEvent : nsIDOMEvent
 {
   readonly attribute unsigned long long oldVersion;
 
   [implicit_jscontext]
   readonly attribute jsval newVersion;
 };
--- a/dom/interfaces/apps/nsIDOMMozApplicationEvent.idl
+++ b/dom/interfaces/apps/nsIDOMMozApplicationEvent.idl
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface mozIDOMApplication;
 
-[scriptable, builtinclass, uuid(dae640fb-0a14-42d8-88d3-541c6f077820)]
+[scriptable, builtinclass, uuid(453ae38a-8d8d-465f-a718-3f01240f8f75)]
 interface nsIDOMMozApplicationEvent : nsIDOMEvent
 {
   readonly attribute mozIDOMApplication application;
 
   [noscript] void initMozApplicationEvent(in DOMString aType,
                                           in boolean aCanBubble,
                                           in boolean aCancelable,
                                           in mozIDOMApplication aApplication);
--- a/dom/interfaces/contacts/nsIDOMMozContactChangeEvent.idl
+++ b/dom/interfaces/contacts/nsIDOMMozContactChangeEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(b05dd60a-bfb8-4428-982e-c7f20e77b673)]
+[scriptable, builtinclass, uuid(7ee758eb-9353-4ade-8715-9953ea512ee2)]
 interface nsIDOMMozContactChangeEvent : nsIDOMEvent
 {
   readonly attribute DOMString contactID;
   readonly attribute DOMString reason;
 
   [noscript] void initMozContactChangeEvent(in DOMString aType,
                                             in boolean aCanBubble,
                                             in boolean aCancelable,
--- a/dom/interfaces/devicestorage/nsIDOMDeviceStorageChangeEvent.idl
+++ b/dom/interfaces/devicestorage/nsIDOMDeviceStorageChangeEvent.idl
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "domstubs.idl"
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(49bdda6f-430a-4cf8-b535-b97b5b1ed575), builtinclass]
+[scriptable, uuid(30eaf0b9-8f3f-49fe-818e-7b7d9fbf8f95), builtinclass]
 interface nsIDOMDeviceStorageChangeEvent : nsIDOMEvent
 {
 
   [noscript] void initDeviceStorageChangeEvent(in DOMString eventTypeArg,
                                                in boolean canBubbleArg,
                                                in boolean cancelableArg,
                                                in DOMString path,
                                                in DOMString reason);
--- a/dom/interfaces/events/nsIDOMAnimationEvent.idl
+++ b/dom/interfaces/events/nsIDOMAnimationEvent.idl
@@ -6,17 +6,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * Animation events are defined in:
  * http://www.w3.org/TR/css3-animations/#animation-events-
  * http://dev.w3.org/csswg/css3-animations/#animation-events-
  */
 
-[scriptable, builtinclass, uuid(ecb06edb-8e90-43ce-8f4b-3d1021222e3a)]
+[scriptable, builtinclass, uuid(778a701a-e8f2-4cfd-b431-79d6fb3889d8)]
 interface nsIDOMAnimationEvent : nsIDOMEvent {
   readonly attribute DOMString          animationName;
   readonly attribute float              elapsedTime;
   void               initAnimationEvent(in DOMString typeArg,
                                         in boolean canBubbleArg,
                                         in boolean cancelableArg,
                                         in DOMString propertyNameArg,
                                         in float elapsedTimeArg);
--- a/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
+++ b/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
@@ -10,17 +10,17 @@
  * sent to handlers of the "beforeunload" event. This event is
  * non-standard. Interface derived from Microsoft IE's event
  * implementation.
  *
  * http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events.asp
  *
  */
 
-[scriptable, builtinclass, uuid(e5c281d9-ce73-4f95-bc4d-e00d537b63cb)]
+[scriptable, builtinclass, uuid(ee7b8943-440e-4cc3-b25e-c17c8a821d8b)]
 interface nsIDOMBeforeUnloadEvent : nsIDOMEvent
 {
   /**
    * Attribute used to pass back a return value from a beforeunload
    * handler
    */
            attribute DOMString          returnValue;
 };
--- a/dom/interfaces/events/nsIDOMCloseEvent.idl
+++ b/dom/interfaces/events/nsIDOMCloseEvent.idl
@@ -7,17 +7,17 @@
 
 /**
  * The nsIDOMCloseEvent interface is the interface to the event
  * close on a WebSocket object.
  *
  * For more information on this interface, please see
  * http://dev.w3.org/html5/websockets/#closeevent
  */
-[scriptable, builtinclass, uuid(028a92e8-54ab-42ba-938a-9118d339164f)]
+[scriptable, builtinclass, uuid(0b85dc61-2436-4786-b153-097f5c3a33b6)]
 interface nsIDOMCloseEvent : nsIDOMEvent
 {
   readonly attribute boolean wasClean;
   readonly attribute unsigned short code;
   readonly attribute DOMString reason;
 
   void initCloseEvent(in DOMString aType,
                       in boolean aCanBubble,
--- a/dom/interfaces/events/nsIDOMCommandEvent.idl
+++ b/dom/interfaces/events/nsIDOMCommandEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(e2516013-4552-4638-b47b-9f0c24609e02)]
+[scriptable, builtinclass, uuid(3fdc07cb-3b2e-4c6e-a054-008a4f302202)]
 interface nsIDOMCommandEvent : nsIDOMEvent
 {
   readonly attribute DOMString command;
 
   void initCommandEvent(in DOMString typeArg,
                         in boolean canBubbleArg,
                         in boolean canCancelArg,
                         in DOMString command);
--- a/dom/interfaces/events/nsIDOMCompositionEvent.idl
+++ b/dom/interfaces/events/nsIDOMCompositionEvent.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(858d898a-33a8-4c0b-a9ff-fa9a81a5ce09)]
+[scriptable, builtinclass, uuid(ef545b90-a5f4-471c-b4f8-03b5e0f6fda2)]
 interface nsIDOMCompositionEvent : nsIDOMUIEvent
 {
   readonly attribute DOMString data;
   readonly attribute DOMString locale;
 
   void initCompositionEvent(in DOMString typeArg,
                             in boolean canBubbleArg,
                             in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMCustomEvent.idl
+++ b/dom/interfaces/events/nsIDOMCustomEvent.idl
@@ -1,17 +1,17 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(86e1b9ee-8080-4217-b3fa-025556d83597)]
+[scriptable, builtinclass, uuid(b56ae6ca-c822-489e-be71-2a9f3c56082e)]
 interface nsIDOMCustomEvent : nsIDOMEvent
 {
 
   readonly attribute nsIVariant detail;
 
   void initCustomEvent(in DOMString  typeArg, 
                        in boolean    canBubbleArg, 
                        in boolean    cancelableArg, 
--- a/dom/interfaces/events/nsIDOMDataContainerEvent.idl
+++ b/dom/interfaces/events/nsIDOMDataContainerEvent.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 #include "nsIVariant.idl"
 
-[scriptable, builtinclass, uuid(8d70345a-144d-48d8-a64d-7a61a15b453c)]
+[scriptable, builtinclass, uuid(dc6b39da-87ff-4b6f-b065-b52602602e06)]
 interface nsIDOMDataContainerEvent : nsIDOMEvent
 {
   /**
    * Return the data associated with the given key.
    *
    * @param  key  the key
    * @return      the data associated with the key
    */
--- a/dom/interfaces/events/nsIDOMDeviceLightEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceLightEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(9cc7684c-a239-428c-b4f1-34c510c98a1c)]
+[scriptable, builtinclass, uuid(0e4d1751-fdcd-4ee6-b82d-d3f5d992370d)]
 interface nsIDOMDeviceLightEvent : nsIDOMEvent
 {
   [noscript] void initDeviceLightEvent(in DOMString eventTypeArg,
                                        in boolean canBubbleArg,
                                        in boolean cancelableArg,
                                        in double value);
 
   readonly attribute double value;
--- a/dom/interfaces/events/nsIDOMDeviceMotionEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceMotionEvent.idl
@@ -16,17 +16,17 @@ interface nsIDOMDeviceAcceleration : nsI
 interface nsIDOMDeviceRotationRate : nsISupports
 {
   readonly attribute double alpha;
   readonly attribute double beta;
   readonly attribute double gamma;
 };
 
 
-[scriptable, builtinclass, uuid(1b3d39f2-8f8b-454f-83ad-acbdd32fa2c3)]
+[scriptable, builtinclass, uuid(64c300f8-4bf9-47d0-86bc-2fafd7de38c7)]
 interface nsIDOMDeviceMotionEvent : nsIDOMEvent
 {
   void initDeviceMotionEvent(in DOMString eventTypeArg,
                              in boolean canBubbleArg,
                              in boolean cancelableArg,
                              in nsIDOMDeviceAcceleration acceleration,
                              in nsIDOMDeviceAcceleration accelerationIncludingGravity,
                              in nsIDOMDeviceRotationRate rotationRate,
--- a/dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(8e37040a-dbbb-41d8-a019-eb687e5e8ec7)]
+[scriptable, builtinclass, uuid(f5921a77-3ac5-4374-bc0c-1ed52fe83123)]
 interface nsIDOMDeviceOrientationEvent : nsIDOMEvent
 {
   void initDeviceOrientationEvent(in DOMString eventTypeArg,
                                   in boolean canBubbleArg,
                                   in boolean cancelableArg,
                                   in double alpha,
                                   in double beta,
                                   in double gamma,
--- a/dom/interfaces/events/nsIDOMDeviceProximityEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceProximityEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(c33bec2d-5a0b-44ae-b035-d74cd519ec16)]
+[scriptable, builtinclass, uuid(86c7c396-9c2b-4d45-9c7c-b0dcda024105)]
 interface nsIDOMDeviceProximityEvent : nsIDOMEvent
 {
   [noscript] void initDeviceProximityEvent(in DOMString eventTypeArg,
                                            in boolean canBubbleArg,
                                            in boolean cancelableArg,
                                            in double value,
                                            in double min,
                                            in double max);
--- a/dom/interfaces/events/nsIDOMDragEvent.idl
+++ b/dom/interfaces/events/nsIDOMDragEvent.idl
@@ -3,17 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "domstubs.idl"
 #include "nsIDOMMouseEvent.idl"
 
 interface nsIDOMDataTransfer;
 
-[scriptable, builtinclass, uuid(2b3b587d-6426-415f-a6f0-4f86eaa562f1)]
+[scriptable, builtinclass, uuid(4d0fe952-7ca7-4730-a163-4454e39ed187)]
 interface nsIDOMDragEvent : nsIDOMMouseEvent
 {
   readonly attribute nsIDOMDataTransfer dataTransfer;
 
   void initDragEvent(in DOMString typeArg,
                      in boolean canBubbleArg,
                      in boolean cancelableArg,
                      in nsIDOMWindow aView,
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -33,17 +33,17 @@ class WheelEvent;
  * The nsIDOMEvent interface is the primary datatype for all events in
  * the Document Object Model.
  *
  * For more information on this interface please see 
  * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html and
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, builtinclass, uuid(270c945b-8a65-4170-bc0b-4ec1443cd39f)]
+[scriptable, builtinclass, uuid(c939eab8-1345-4344-875b-e0f2d8d89171)]
 interface nsIDOMEvent : nsISupports
 {
   // PhaseType
   /**
    * The event isn't being dispatched.
    */
   const unsigned short      NONE                           = 0;
   /**
@@ -242,17 +242,17 @@ interface nsIDOMEvent : nsISupports
   boolean                   getPreventDefault();
 
   readonly attribute boolean isTrusted;
 
   [noscript] void duplicatePrivateData();
   [noscript] void setTarget(in nsIDOMEventTarget aTarget);
   [notxpcom] boolean IsDispatchStopped();
   [notxpcom] nsEventPtr GetInternalNSEvent();
-  [noscript] void SetTrusted(in boolean aTrusted);
+  [noscript,notxpcom] void SetTrusted(in boolean aTrusted);
   [notxpcom] void Serialize(in IPCMessagePtr aMsg,
                             in boolean aSerializeInterfaceType);
   [notxpcom] boolean Deserialize(in ConstIPCMessagePtr aMsg, out voidPtr aIter);
   
 };
 
 dictionary EventInit
 {
--- a/dom/interfaces/events/nsIDOMHashChangeEvent.idl
+++ b/dom/interfaces/events/nsIDOMHashChangeEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(bf5ce408-971a-4e74-bc57-178f0f8781f3)]
+[scriptable, builtinclass, uuid(d83f3cb2-1fa4-4ee0-8eb1-8181f6d3e214)]
 interface nsIDOMHashChangeEvent : nsIDOMEvent
 {
   readonly attribute DOMString oldURL;
   readonly attribute DOMString newURL;
 
   void initHashChangeEvent(in DOMString typeArg,
                            in boolean canBubbleArg,
                            in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMKeyEvent.idl
+++ b/dom/interfaces/events/nsIDOMKeyEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(5d116380-8432-48cb-a717-200f04c39d2f)]
+[scriptable, builtinclass, uuid(ffbe684c-ca90-4b58-aa8c-9727f997f86d)]
 interface nsIDOMKeyEvent : nsIDOMUIEvent
 {
   const unsigned long DOM_VK_CANCEL         = 0x03;
   const unsigned long DOM_VK_HELP           = 0x06;
   const unsigned long DOM_VK_BACK_SPACE     = 0x08;
   const unsigned long DOM_VK_TAB            = 0x09;
   const unsigned long DOM_VK_CLEAR          = 0x0C;
   const unsigned long DOM_VK_RETURN         = 0x0D;
--- a/dom/interfaces/events/nsIDOMMessageEvent.idl
+++ b/dom/interfaces/events/nsIDOMMessageEvent.idl
@@ -7,17 +7,17 @@
 
 /**
  * The nsIDOMMessageEvent interface is used for server-sent events and for
  * cross-domain messaging.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#messageevent
  */
-[scriptable, builtinclass, uuid(ba747c2b-ec12-4e0d-8de4-d749a6b572e6)]
+[scriptable, builtinclass, uuid(bb869a03-5fc0-4a1b-838a-342e5025fc05)]
 interface nsIDOMMessageEvent : nsIDOMEvent
 {
   /**
    * Custom string data associated with this event.
    */
   [implicit_jscontext]
   readonly attribute jsval data;
   
--- a/dom/interfaces/events/nsIDOMMouseEvent.idl
+++ b/dom/interfaces/events/nsIDOMMouseEvent.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMMouseEvent interface is the datatype for all mouse events
  * in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, builtinclass, uuid(796c3436-5f89-4145-be3a-49808c09fdc6)]
+[scriptable, builtinclass, uuid(afb2e57b-2822-4969-b2a9-0cada6859534)]
 interface nsIDOMMouseEvent : nsIDOMUIEvent
 {
   readonly attribute long               screenX;
   readonly attribute long               screenY;
 
   readonly attribute long               mozMovementX;
   readonly attribute long               mozMovementY;
 
--- a/dom/interfaces/events/nsIDOMMouseScrollEvent.idl
+++ b/dom/interfaces/events/nsIDOMMouseScrollEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMMouseEvent.idl"
 
-[scriptable, builtinclass, uuid(bd3ab39d-eca0-4e2f-889d-4641a2e5d87d)]
+[scriptable, builtinclass, uuid(2bce5c03-5bed-4c22-8a6a-a3ac8f5563d7)]
 interface nsIDOMMouseScrollEvent : nsIDOMMouseEvent
 {
   const long HORIZONTAL_AXIS = 1;
   const long VERTICAL_AXIS = 2;
 
   readonly attribute long axis;
 
   void                initMouseScrollEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMMutationEvent.idl
+++ b/dom/interfaces/events/nsIDOMMutationEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(85e7c0c0-4dbd-40f4-9f58-8050071dcaae)]
+[scriptable, builtinclass, uuid(982d9800-1402-46e5-8ad2-56fb0f4905ef)]
 interface nsIDOMMutationEvent : nsIDOMEvent
 {
   const unsigned short      MODIFICATION       = 1;
   const unsigned short      ADDITION           = 2;
   const unsigned short      REMOVAL            = 3;
 
   readonly attribute nsIDOMNode       relatedNode;
   readonly attribute DOMString        prevValue;
--- a/dom/interfaces/events/nsIDOMNotifyAudioAvailableEvent.idl
+++ b/dom/interfaces/events/nsIDOMNotifyAudioAvailableEvent.idl
@@ -2,17 +2,17 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 #include "nsIVariant.idl"
 
-[scriptable, builtinclass, uuid(34139b4f-ac78-4372-98d3-12d6dcf478ef)]
+[scriptable, builtinclass, uuid(2345d43d-197a-4589-a4b7-983b41b76c25)]
 interface nsIDOMNotifyAudioAvailableEvent : nsIDOMEvent
 {
   [implicit_jscontext]
   readonly attribute jsval  frameBuffer;
 
   readonly attribute float  time;
 
   void initAudioAvailableEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
+++ b/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
@@ -7,17 +7,17 @@
 
 interface nsIDOMPaintRequestList;
 
 /**
  * The nsIDOMNotifyPaintEvent interface is used for the MozDOMAfterPaint
  * event, which fires at a window when painting has happened in
  * that window.
  */
-[scriptable, builtinclass, uuid(a61dc375-6631-4404-8205-b551afe826c3)]
+[scriptable, builtinclass, uuid(e3560df8-0926-48da-b13a-36d3938c95af)]
 interface nsIDOMNotifyPaintEvent : nsIDOMEvent
 {
   /**
    * Get a list of rectangles which are affected. The rectangles are in CSS pixels
    * relative to the viewport origin.
    * If the caller is not trusted (e.g., regular Web content) then only painting
    * caused by the current document is reported; in particular, painting in subdocuments
    * is not reported.
--- a/dom/interfaces/events/nsIDOMPageTransitionEvent.idl
+++ b/dom/interfaces/events/nsIDOMPageTransitionEvent.idl
@@ -6,17 +6,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * The nsIDOMPageTransitionEvent interface is used for the pageshow and
  * pagehide events, which are generic events that apply to both page
  * load/unload and saving/restoring a document from session history.
  */
 
-[scriptable, builtinclass, uuid(9f3ffe42-bbd2-428d-97f1-6c158c6eb2f9)]
+[scriptable, builtinclass, uuid(8a69a3d6-c7da-4caa-993c-7f9583d9f896)]
 interface nsIDOMPageTransitionEvent : nsIDOMEvent
 {
   /**
    * Set to true if the document has been or will be persisted across
    * firing of the event.  For example, if a document is being cached in
    * session history, |persisted| is true for the PageHide event.
    */
   readonly attribute boolean persisted;
--- a/dom/interfaces/events/nsIDOMPopStateEvent.idl
+++ b/dom/interfaces/events/nsIDOMPopStateEvent.idl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(17ab1333-6fc7-46f9-8513-a82dc6548642)]
+[scriptable, builtinclass, uuid(f0def4a3-0eb3-4c08-b476-582e37b8564b)]
 interface nsIDOMPopStateEvent : nsIDOMEvent
 {
   /**
    * The state associated with this popstate event
    */
   readonly attribute nsIVariant state;
 
   void initPopStateEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
+++ b/dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
@@ -7,17 +7,17 @@
 
 interface nsIURI;
 
 /**
  * The nsIDOMPopupBlockedEvent interface is the datatype for events
  * posted when a popup window is blocked.
  */
 
-[scriptable, builtinclass, uuid(80eb7f77-7f87-4559-9229-60ba5e05135f)]
+[scriptable, builtinclass, uuid(f6e77f79-d178-419d-8177-dfae4392d318)]
 interface nsIDOMPopupBlockedEvent : nsIDOMEvent
 {
   /**
    * The window object that attempted to open the blocked popup
    * (i.e. the window object on which open() was called).
    */
   readonly attribute nsIDOMWindow requestingWindow;
 
--- a/dom/interfaces/events/nsIDOMProgressEvent.idl
+++ b/dom/interfaces/events/nsIDOMProgressEvent.idl
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 /**
  * ProgressEvent can be used for measuring progress.
  */
 
-[scriptable, builtinclass, uuid(c5b7ec31-b846-4a9f-b81e-859e76a74f6b)]
+[scriptable, builtinclass, uuid(e0682338-4c3f-4d3a-9487-d7492ea76335)]
 interface nsIDOMProgressEvent : nsIDOMEvent
 {
   readonly attribute boolean lengthComputable;
   readonly attribute unsigned long long loaded;
   readonly attribute unsigned long long total;
   void initProgressEvent(in DOMString typeArg,
                          in boolean canBubbleArg,
                          in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMScrollAreaEvent.idl
+++ b/dom/interfaces/events/nsIDOMScrollAreaEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(d38655dd-3be4-4c91-a3b1-0818d396ddf0)]
+[scriptable, builtinclass, uuid(49ab3d1d-f549-4cdb-904c-f6b6d3a0ec9e)]
 interface nsIDOMScrollAreaEvent : nsIDOMUIEvent
 {
   // Scroll area client rect
   readonly attribute float x;
   readonly attribute float y;
   readonly attribute float width;
   readonly attribute float height;
 
--- a/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
+++ b/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
@@ -64,17 +64,17 @@
  * Default behavior:
  *
  * Some operating systems support default behaviors for gesture events
  * when they are not handled by the application. Consumers should
  * use event.preventDefault() to prevent default behavior when
  * consuming events.
  */
 
-[scriptable, builtinclass, uuid(0748e618-6612-45d7-8d34-1f56d546e04a)]
+[scriptable, builtinclass, uuid(0cd3fde1-0c99-49cc-a74e-9a9348864307)]
 interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent
 {
   /* Swipe direction constants */
   const unsigned long DIRECTION_UP = 1;
   const unsigned long DIRECTION_DOWN = 2;
   const unsigned long DIRECTION_LEFT = 4;
   const unsigned long DIRECTION_RIGHT = 8;
   
--- a/dom/interfaces/events/nsIDOMSmartCardEvent.idl
+++ b/dom/interfaces/events/nsIDOMSmartCardEvent.idl
@@ -1,13 +1,13 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(88ae203d-12b8-4a85-a69f-6f83a8b5c226)]
+[scriptable, builtinclass, uuid(3747df70-e31a-4399-a394-0f5f969874b5)]
 interface nsIDOMSmartCardEvent : nsIDOMEvent
 {
   readonly attribute DOMString   tokenName;
   [noscript] void Init(in nsIDOMEvent event);
 };
--- a/dom/interfaces/events/nsIDOMTouchEvent.idl
+++ b/dom/interfaces/events/nsIDOMTouchEvent.idl
@@ -40,17 +40,17 @@ interface nsIDOMTouch : nsISupports {
 
 [scriptable, uuid(60706eb7-d50d-4379-b01c-e78e6af84213)]
 interface nsIDOMTouchList : nsISupports {
   readonly attribute unsigned long length;
   nsIDOMTouch item(in unsigned long index);
   nsIDOMTouch identifiedTouch(in long identifier);
 };
 
-[scriptable, builtinclass, uuid(dfaac0c6-9c4a-4a95-8872-1d58f19d5768)]
+[scriptable, builtinclass, uuid(9a043d55-f59e-4790-8fc7-1fab1c727732)]
 interface nsIDOMTouchEvent : nsIDOMUIEvent {
   readonly attribute nsIDOMTouchList touches;
   readonly attribute nsIDOMTouchList targetTouches;
   readonly attribute nsIDOMTouchList changedTouches;
   readonly attribute boolean         altKey;
   readonly attribute boolean         metaKey;
   readonly attribute boolean         ctrlKey;
   readonly attribute boolean         shiftKey;
--- a/dom/interfaces/events/nsIDOMTransitionEvent.idl
+++ b/dom/interfaces/events/nsIDOMTransitionEvent.idl
@@ -6,17 +6,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * Transition events are defined in:
  * http://www.w3.org/TR/css3-transitions/#transition-events-
  * http://dev.w3.org/csswg/css3-transitions/#transition-events-
  */
 
-[scriptable, builtinclass, uuid(dd6b6318-a69b-4daf-99ad-617876782dfd)]
+[scriptable, builtinclass, uuid(9013310a-e376-40bc-b141-9b9ae3085daa)]
 interface nsIDOMTransitionEvent : nsIDOMEvent {
   readonly attribute DOMString           propertyName;
   readonly attribute float               elapsedTime;
   void               initTransitionEvent(in DOMString typeArg, 
                                          in boolean canBubbleArg, 
                                          in boolean cancelableArg, 
                                          in DOMString propertyNameArg,
                                          in float elapsedTimeArg);
--- a/dom/interfaces/events/nsIDOMUIEvent.idl
+++ b/dom/interfaces/events/nsIDOMUIEvent.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMUIEvent interface is the datatype for all UI events in the
  * Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, builtinclass, uuid(415453e6-132a-4902-9a99-cc480f0311b6)]
+[scriptable, builtinclass, uuid(d73852f8-7bd6-477d-8233-117dbf83860b)]
 interface nsIDOMUIEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMWindow       view;
   readonly attribute long               detail;
   void                      initUIEvent(in DOMString typeArg,
                                         in boolean canBubbleArg,
                                         in boolean cancelableArg,
                                         in nsIDOMWindow viewArg,
--- a/dom/interfaces/events/nsIDOMUserProximityEvent.idl
+++ b/dom/interfaces/events/nsIDOMUserProximityEvent.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(ae59b379-1c58-4baa-bef4-21fca57fc4c2)]
+[scriptable, builtinclass, uuid(5f1a4c25-e65d-4b50-a883-7498ab88c677)]
 interface nsIDOMUserProximityEvent : nsIDOMEvent
 {
   [noscript] void initUserProximityEvent(in DOMString eventTypeArg,
                                          in boolean canBubbleArg,
                                          in boolean cancelableArg,
                                          in boolean near);
 
   readonly attribute boolean near;
--- a/dom/interfaces/events/nsIDOMWheelEvent.idl
+++ b/dom/interfaces/events/nsIDOMWheelEvent.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMMouseEvent.idl"
 
-[scriptable, builtinclass, uuid(5b689c9c-ce82-4836-bb7b-f2fa0c3d2f32)]
+[scriptable, builtinclass, uuid(86e2b577-7e61-4ed5-8ddd-c1533bf07137)]
 interface nsIDOMWheelEvent : nsIDOMMouseEvent
 {
   const unsigned long DOM_DELTA_PIXEL = 0x00;
   const unsigned long DOM_DELTA_LINE  = 0x01;
   const unsigned long DOM_DELTA_PAGE  = 0x02;
 
   // Note that DOM Level 3 Events defines the type of delta values as float.
   // However, we should use double for them.  Javascript engine always uses
--- a/dom/interfaces/load-save/nsIDOMLSProgressEvent.idl
+++ b/dom/interfaces/load-save/nsIDOMLSProgressEvent.idl
@@ -2,15 +2,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMLSInput;
 
-[scriptable, builtinclass, uuid(522fb528-f550-4e0c-8745-f784bba7cfbe)]
+[scriptable, builtinclass, uuid(5343c259-78c1-4f20-a81f-5ddce4f0188e)]
 interface nsIDOMLSProgressEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMLSInput   input;
   readonly attribute unsigned long   position;
   readonly attribute unsigned long   totalSize;
 };
--- a/dom/interfaces/settings/nsIDOMMozSettingsEvent.idl
+++ b/dom/interfaces/settings/nsIDOMMozSettingsEvent.idl
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(109d5b5c-48b2-4d10-a881-72dcf4c27969)]
+[scriptable, builtinclass, uuid(d5081bf4-6a63-4ee6-8ce6-f488082dc08f)]
 interface nsIDOMMozSettingsEvent : nsIDOMEvent
 {
   readonly attribute DOMString  settingName;
   readonly attribute nsIVariant settingValue;
 
   [noscript] void initMozSettingsEvent(in DOMString aType,
                                        in boolean aCanBubble,
                                        in boolean aCancelable,
--- a/dom/interfaces/smil/nsIDOMTimeEvent.idl
+++ b/dom/interfaces/smil/nsIDOMTimeEvent.idl
@@ -8,17 +8,17 @@
 /**
  * The SMIL TimeEvent interface.
  *
  * For more information please refer to:
  * http://www.w3.org/TR/SMIL/smil-timing.html#Events-TimeEvent
  * http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent
  */
 
-[scriptable, builtinclass, uuid(a7ddd388-5fdf-4af8-b3ee-7e1baa636b66)]
+[scriptable, builtinclass, uuid(4a5a5fa6-2783-4171-b8bb-cae4ab06e6ff)]
 interface nsIDOMTimeEvent : nsIDOMEvent
 {
   readonly attribute long detail;
   readonly attribute nsIDOMWindow view;
   
   void initTimeEvent(in DOMString typeArg,
                      in nsIDOMWindow viewArg,
                      in long detailArg);
--- a/dom/interfaces/storage/nsIDOMStorageEvent.idl
+++ b/dom/interfaces/storage/nsIDOMStorageEvent.idl
@@ -11,17 +11,17 @@
  * http://dev.w3.org/html5/webstorage/#the-storage-event
  * for more information.
  *
  * Event sent to a window when a storage area changes.
  */
 
 interface nsIDOMStorage;
 
-[scriptable, builtinclass, uuid(0929c378-2ad6-4fde-a0db-8cd61bbb080c)]
+[scriptable, builtinclass, uuid(85f04275-4679-4e89-b43f-142bbbab1e89)]
 interface nsIDOMStorageEvent : nsIDOMEvent
 {
   /**
    * Attribute represents the key being changed. The key attribute is null
    * when change has been invoked by the storage clear() method.
    */
   readonly attribute DOMString key;
 
--- a/dom/interfaces/svg/nsIDOMSVGEvent.idl
+++ b/dom/interfaces/svg/nsIDOMSVGEvent.idl
@@ -5,12 +5,12 @@
 
 #include "nsIDOMEvent.idl"
 
 /**
  * For more information on this interface please see
  * http://www.w3.org/TR/SVG11/script.html#InterfaceSVGEvent
  */
 
-[scriptable, builtinclass, uuid(85c1aba6-6ab1-4b7d-b200-2c8ef39267ad)]
+[scriptable, builtinclass, uuid(d6a2c07c-8a67-4a6e-adde-f668edb4a852)]
 interface nsIDOMSVGEvent : nsIDOMEvent
 {
 };
--- a/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl
+++ b/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl
@@ -8,17 +8,17 @@
 /**
  * For more information on this interface please see
  * http://www.w3.org/TR/SVG11/script.html#InterfaceSVGZoomEvent
  */
 
 interface nsIDOMSVGRect;
 interface nsIDOMSVGPoint;
 
-[scriptable, builtinclass, uuid(77a0b46e-54cf-4e6e-a962-a2f52389da34)]
+[scriptable, builtinclass, uuid(9cf032c6-8485-4bde-90d4-0c8bbff27a12)]
 interface nsIDOMSVGZoomEvent : nsIDOMUIEvent
 {
   readonly attribute nsIDOMSVGRect  zoomRectScreen;
   readonly attribute float          previousScale;
   readonly attribute nsIDOMSVGPoint previousTranslate;
   readonly attribute float          newScale;
   readonly attribute nsIDOMSVGPoint newTranslate;
 };
--- a/dom/interfaces/xul/nsIDOMXULCommandEvent.idl
+++ b/dom/interfaces/xul/nsIDOMXULCommandEvent.idl
@@ -6,17 +6,17 @@
 
 /**
  * This interface is supported by command events, which are dispatched to
  * XUL elements as a result of mouse or keyboard activation.
  */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(bb7f2758-9a71-4701-984f-eb66f08c4356)]
+[scriptable, builtinclass, uuid(2d5b6e19-74bb-40af-9aac-59a1e53e3fcc)]
 interface nsIDOMXULCommandEvent : nsIDOMUIEvent
 {
   /**
    * Command events support the same set of modifier keys as mouse and key
    * events.
    */
   readonly attribute boolean ctrlKey;
   readonly attribute boolean shiftKey;
--- a/dom/network/interfaces/nsIDOMDataErrorEvent.idl
+++ b/dom/network/interfaces/nsIDOMDataErrorEvent.idl
@@ -1,11 +1,11 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(1cfc45ba-c5d4-11e1-b4c3-00265511db39)]
+[scriptable, builtinclass, uuid(494cf68f-0ca8-4cf9-924b-84cf379c9631)]
 interface nsIDOMDataErrorEvent : nsIDOMEvent
 {
   readonly attribute DOMString message;
 };
--- a/dom/network/interfaces/nsIDOMUSSDReceivedEvent.idl
+++ b/dom/network/interfaces/nsIDOMUSSDReceivedEvent.idl
@@ -1,12 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(c0de7fba-725f-4180-b1f1-83163014d1e2)]
+[scriptable, builtinclass, uuid(56e18850-96f1-4898-a0de-47e0c994c4ab)]
 interface nsIDOMUSSDReceivedEvent : nsIDOMEvent
 {
   readonly attribute DOMString message;
   [infallible] readonly attribute boolean sessionEnded;
 };
--- a/dom/network/src/DataErrorEvent.h
+++ b/dom/network/src/DataErrorEvent.h
@@ -29,21 +29,19 @@ public:
   Dispatch(nsIDOMEventTarget* aTarget, const nsAString& aEventType)
   {
     NS_ASSERTION(aTarget, "Null pointer!");
     NS_ASSERTION(!aEventType.IsEmpty(), "Empty event type!");
 
     nsresult rv = InitEvent(aEventType, false, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = SetTrusted(true);
-    NS_ENSURE_SUCCESS(rv, rv);
+    SetTrusted(true);
 
-    nsIDOMEvent* thisEvent =
-      static_cast<nsDOMEvent*>(const_cast<DataErrorEvent*>(this));
+    nsDOMEvent* thisEvent = this;
 
     bool dummy;
     rv = aTarget->DispatchEvent(thisEvent, &dummy);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
--- a/dom/network/src/USSDReceivedEvent.h
+++ b/dom/network/src/USSDReceivedEvent.h
@@ -30,21 +30,19 @@ public:
   Dispatch(nsIDOMEventTarget* aTarget, const nsAString& aEventType)
   {
     NS_ASSERTION(aTarget, "Null pointer!");
     NS_ASSERTION(!aEventType.IsEmpty(), "Empty event type!");
 
     nsresult rv = InitEvent(aEventType, false, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = SetTrusted(true);
-    NS_ENSURE_SUCCESS(rv, rv);
+    SetTrusted(true);
 
-    nsIDOMEvent* thisEvent =
-      static_cast<nsDOMEvent*>(const_cast<USSDReceivedEvent*>(this));
+    nsDOMEvent* thisEvent = this;
 
     bool dummy;
     rv = aTarget->DispatchEvent(thisEvent, &dummy);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
--- a/dom/sms/interfaces/nsIDOMSmsEvent.idl
+++ b/dom/sms/interfaces/nsIDOMSmsEvent.idl
@@ -2,14 +2,14 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMMozSmsMessage;
 
-[scriptable, builtinclass, uuid(3bde920e-6552-479c-919a-d66589a85a28)]
+[scriptable, builtinclass, uuid(89a5cdbc-5e43-4f9a-8d2c-64a582d64416)]
 interface nsIDOMMozSmsEvent : nsIDOMEvent
 {
   [binaryname(MessageMoz)]
   readonly attribute nsIDOMMozSmsMessage message;
 };
--- a/dom/sms/src/SmsRequest.cpp
+++ b/dom/sms/src/SmsRequest.cpp
@@ -285,18 +285,17 @@ SmsRequest::GetResult(jsval* aResult)
 
 nsresult
 SmsRequest::DispatchTrustedEvent(const nsAString& aEventName)
 {
   nsRefPtr<nsDOMEvent> event = new nsDOMEvent(nullptr, nullptr);
   nsresult rv = event->InitEvent(aEventName, false, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = event->SetTrusted(true);
-  NS_ENSURE_SUCCESS(rv, rv);
+  event->SetTrusted(true);
 
   bool dummy;
   return DispatchEvent(event, &dummy);
 }
 
 template <class T>
 nsresult
 SmsRequest::NotifySuccess(T aParam)
--- a/dom/telephony/CallEvent.h
+++ b/dom/telephony/CallEvent.h
@@ -34,21 +34,19 @@ public:
   Dispatch(nsIDOMEventTarget* aTarget, const nsAString& aEventType)
   {
     NS_ASSERTION(aTarget, "Null pointer!");
     NS_ASSERTION(!aEventType.IsEmpty(), "Empty event type!");
 
     nsresult rv = InitEvent(aEventType, false, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = SetTrusted(true);
-    NS_ENSURE_SUCCESS(rv, rv);
+    SetTrusted(true);
 
-    nsIDOMEvent* thisEvent =
-      static_cast<nsDOMEvent*>(const_cast<CallEvent*>(this));
+    nsDOMEvent* thisEvent = this;
 
     bool dummy;
     rv = aTarget->DispatchEvent(thisEvent, &dummy);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
--- a/dom/telephony/nsIDOMCallEvent.idl
+++ b/dom/telephony/nsIDOMCallEvent.idl
@@ -3,13 +3,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMTelephonyCall;
 
-[scriptable, builtinclass, uuid(d836f0e6-7305-4fdd-966e-ee261fa44001)]
+[scriptable, builtinclass, uuid(21c233f9-721b-4985-bb2b-585f978ceee5)]
 interface nsIDOMCallEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMTelephonyCall call;
 };
--- a/dom/telephony/nsIDOMVoicemailEvent.idl
+++ b/dom/telephony/nsIDOMVoicemailEvent.idl
@@ -3,16 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMMozVoicemailStatus;
 
-[scriptable, builtinclass, uuid(b2208967-2231-45e4-9a40-57b97908adf8)]
+[scriptable, builtinclass, uuid(8fd09b8e-1572-48ff-8719-f8f179afef4b)]
 interface nsIDOMMozVoicemailEvent : nsIDOMEvent
 {
   /**
    * The voicemail status that caused this event to fire
    */
   readonly attribute nsIDOMMozVoicemailStatus status;
 };
--- a/dom/wifi/nsIDOMMozWifiConnectionInfoEvent.idl
+++ b/dom/wifi/nsIDOMMozWifiConnectionInfoEvent.idl
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(1717f9d9-5fd8-43d8-a098-55924c6d37de)]
+[scriptable, builtinclass, uuid(627b2102-9605-40e0-a5bf-6d3ac672b328)]
 interface nsIDOMMozWifiConnectionInfoEvent : nsIDOMEvent
 {
     /**
      * Network object with an SSID field.
      */
     readonly attribute nsIVariant network;
 
     /**
--- a/dom/wifi/nsIDOMMozWifiStatusChangeEvent.idl
+++ b/dom/wifi/nsIDOMMozWifiStatusChangeEvent.idl
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(f3ef70b0-b2d3-4eb5-8ea4-008f8d330cd6)]
+[scriptable, builtinclass, uuid(251252ba-ed8c-47a0-8979-f7652b4d558a)]
 interface nsIDOMMozWifiStatusChangeEvent : nsIDOMEvent
 {
     /**
      * Network object with a SSID field describing the network affected by
      * this change. This might be null.
      */
     readonly attribute nsIVariant network;
 
--- a/security/manager/ssl/src/nsSmartCardEvent.cpp
+++ b/security/manager/ssl/src/nsSmartCardEvent.cpp
@@ -31,17 +31,18 @@ NS_IMPL_RELEASE(nsSmartCardEvent)
 
 //
 // Init must be called before we do anything with the event.
 //
 NS_IMETHODIMP nsSmartCardEvent::Init(nsIDOMEvent * aInner)
 {
   NS_ASSERTION(aInner, "SmartCardEvent initialized with a null Event");
   mInner = aInner;
-  return mInner->SetTrusted(true);
+  mInner->SetTrusted(true);
+  return NS_OK;
 }
 
 // nsSmartCard Specific methods
 NS_IMETHODIMP nsSmartCardEvent::GetTokenName(nsAString &aTokenName)
 {
   aTokenName = mTokenName;
   return NS_OK;
 }
@@ -66,20 +67,20 @@ NS_IMETHODIMP_(bool ) nsSmartCardEvent::
 }
 
 NS_IMETHODIMP_(nsEvent*) nsSmartCardEvent::GetInternalNSEvent()
 {
   NS_ASSERTION(mInner, "SmartCardEvent called without Init");
   return mInner->GetInternalNSEvent();
 }
 
-NS_IMETHODIMP nsSmartCardEvent::SetTrusted(bool aResult)
+NS_IMETHODIMP_(void) nsSmartCardEvent::SetTrusted(bool aResult)
 {
   NS_ASSERTION(mInner, "SmartCardEvent called without Init");
-  return mInner->SetTrusted(aResult);
+  mInner->SetTrusted(aResult);
 }
 
 void
 nsSmartCardEvent::Serialize(IPC::Message* aMsg,
                             bool aSerializeInterfaceType)
 {
   NS_ASSERTION(mInner, "SmartCardEvent called without Init");
   mInner->Serialize(aMsg, aSerializeInterfaceType);