Bug 1257042: Remove the worker descriptor for PushEvent and PushMessageData. r=bz

This commit is contained in:
Kyle Huey 2016-03-16 13:44:24 -07:00
Родитель 19dc2d2aab
Коммит 171ac8799b
4 изменённых файлов: 20 добавлений и 12 удалений

Просмотреть файл

@ -935,13 +935,11 @@ DOMInterfaces = {
'PushEvent': {
'headerFile': 'ServiceWorkerEvents.h',
'nativeType': 'mozilla::dom::workers::PushEvent',
'workers': True
},
'PushMessageData': {
'headerFile': 'ServiceWorkerEvents.h',
'nativeType': 'mozilla::dom::workers::PushMessageData',
'workers': True
},
'PushManager': [{

Просмотреть файл

@ -37,6 +37,9 @@
#include "mozilla/dom/workers/bindings/ServiceWorker.h"
#ifndef MOZ_SIMPLEPUSH
#include "mozilla/dom/PushEventBinding.h"
#include "mozilla/dom/PushMessageDataBinding.h"
#include "nsIUnicodeDecoder.h"
#include "nsIUnicodeEncoder.h"
@ -1022,6 +1025,12 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PushMessageData)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
JSObject*
PushMessageData::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::PushMessageDataBinding::Wrap(aCx, this, aGivenProto);
}
void
PushMessageData::Json(JSContext* cx, JS::MutableHandle<JS::Value> aRetval,
ErrorResult& aRv)
@ -1131,6 +1140,12 @@ NS_INTERFACE_MAP_END_INHERITING(ExtendableEvent)
NS_IMPL_CYCLE_COLLECTION_INHERITED(PushEvent, ExtendableEvent, mData)
JSObject*
PushEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::PushEventBinding::Wrap(aCx, this, aGivenProto);
}
#endif /* ! MOZ_SIMPLEPUSH */
ExtendableMessageEvent::ExtendableMessageEvent(EventTarget* aOwner)

Просмотреть файл

@ -16,8 +16,6 @@
#include "mozilla/dom/workers/bindings/ServiceWorker.h"
#ifndef MOZ_SIMPLEPUSH
#include "mozilla/dom/PushEventBinding.h"
#include "mozilla/dom/PushMessageDataBinding.h"
#include "mozilla/dom/File.h"
#endif
@ -33,6 +31,8 @@ class MessagePort;
class MessagePortList;
class Request;
class ResponseOrPromise;
struct PushEventInit;
} // namespace dom
} // namespace mozilla
@ -188,10 +188,7 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PushMessageData)
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
{
return mozilla::dom::PushMessageDataBinding_workers::Wrap(aCx, this, aGivenProto);
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
nsISupports* GetParentObject() const {
return mOwner;
@ -228,10 +225,7 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PushEvent, ExtendableEvent)
NS_FORWARD_TO_EVENT
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
{
return mozilla::dom::PushEventBinding_workers::Wrap(aCx, this, aGivenProto);
}
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
static already_AddRefed<PushEvent>
Constructor(mozilla::dom::EventTarget* aOwner,

Просмотреть файл

@ -26,6 +26,7 @@
#include "mozilla/dom/InternalHeaders.h"
#include "mozilla/dom/NotificationEvent.h"
#include "mozilla/dom/PromiseNativeHandler.h"
#include "mozilla/dom/PushEventBinding.h"
#include "mozilla/dom/RequestBinding.h"
using namespace mozilla;