Bug 1224061: Followup to fix b2g bustage r=me CLOSED TREE

This commit is contained in:
Kyle Huey 2015-11-13 10:27:43 +08:00
parent c9773e9cc2
commit 270f5a8d12
2 changed files with 2 additions and 9 deletions

View File

@ -1638,8 +1638,7 @@ BluetoothAdapter::DispatchEmptyEvent(const nsAString& aType)
{
RefPtr<Event> event = NS_NewDOMEvent(this, nullptr, nullptr);
nsresult rv = event->InitEvent(aType, false, false);
NS_ENSURE_SUCCESS_VOID(rv);
event->InitEvent(aType, false, false);
DispatchTrustedEvent(event);
}

View File

@ -90,13 +90,7 @@ SpeakerManager::DispatchSimpleEvent(const nsAString& aStr)
}
RefPtr<Event> event = NS_NewDOMEvent(this, nullptr, nullptr);
rv = event->InitEvent(aStr, false, false);
if (NS_FAILED(rv)) {
NS_WARNING("Failed to init the error event!!!");
return;
}
event->InitEvent(aStr, false, false);
event->SetTrusted(true);
rv = DispatchDOMEvent(nullptr, event, nullptr, nullptr);