зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1257042: Remove the worker descriptor for PushEvent and PushMessageData. r=bz
This commit is contained in:
Родитель
19dc2d2aab
Коммит
171ac8799b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче