/work/obj-fuzz/dom/bindings/UDPMessageEvent.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim:set ts=2 sw=2 sts=2 et cindent: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | /* THIS FILE IS AUTOGENERATED FROM UDPMessageEvent.webidl BY Codegen.py - DO NOT EDIT */ |
8 | | |
9 | | #include "EventBinding.h" |
10 | | #include "UDPMessageEvent.h" |
11 | | #include "UDPMessageEventBinding.h" |
12 | | #include "js/GCAPI.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrimitiveConversions.h" |
15 | | #include "mozilla/dom/UDPMessageEvent.h" |
16 | | |
17 | | namespace mozilla { |
18 | | namespace dom { |
19 | | |
20 | | |
21 | | NS_IMPL_CYCLE_COLLECTION_CLASS(UDPMessageEvent) |
22 | | |
23 | | NS_IMPL_ADDREF_INHERITED(UDPMessageEvent, Event) |
24 | | NS_IMPL_RELEASE_INHERITED(UDPMessageEvent, Event) |
25 | | |
26 | 0 | NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(UDPMessageEvent, Event) |
27 | 0 | NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END |
28 | | |
29 | 0 | NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(UDPMessageEvent, Event) |
30 | 0 | NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mData) |
31 | 0 | NS_IMPL_CYCLE_COLLECTION_TRACE_END |
32 | | |
33 | 0 | NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(UDPMessageEvent, Event) |
34 | 0 | tmp->mData.setUndefined(); |
35 | 0 | NS_IMPL_CYCLE_COLLECTION_UNLINK_END |
36 | | |
37 | 0 | NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UDPMessageEvent) |
38 | 0 | NS_INTERFACE_MAP_END_INHERITING(Event) |
39 | | |
40 | | UDPMessageEvent::UDPMessageEvent(mozilla::dom::EventTarget* aOwner) |
41 | | : Event(aOwner, nullptr, nullptr) |
42 | 0 | { |
43 | 0 | } |
44 | | |
45 | | UDPMessageEvent::~UDPMessageEvent() |
46 | 0 | { |
47 | 0 | mData = JS::UndefinedValue(); |
48 | 0 | mozilla::DropJSObjects(this); |
49 | 0 | } |
50 | | |
51 | | void |
52 | | UDPMessageEvent::GetData(JS::MutableHandle<JS::Value> aRetVal) const |
53 | 0 | { |
54 | 0 | JS::ExposeValueToActiveJS(mData); |
55 | 0 | aRetVal.set(mData); |
56 | 0 | } |
57 | | |
58 | | UDPMessageEvent* |
59 | | UDPMessageEvent::AsUDPMessageEvent() |
60 | 0 | { |
61 | 0 | return this; |
62 | 0 | } |
63 | | |
64 | | JSObject* |
65 | | UDPMessageEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
66 | 0 | { |
67 | 0 | return UDPMessageEvent_Binding::Wrap(aCx, this, aGivenProto); |
68 | 0 | } |
69 | | |
70 | | already_AddRefed<UDPMessageEvent> |
71 | | UDPMessageEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const UDPMessageEventInit& aEventInitDict) |
72 | 0 | { |
73 | 0 | RefPtr<UDPMessageEvent> e = new UDPMessageEvent(aOwner); |
74 | 0 | bool trusted = e->Init(aOwner); |
75 | 0 | e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable); |
76 | 0 | e->mRemoteAddress = aEventInitDict.mRemoteAddress; |
77 | 0 | e->mRemotePort = aEventInitDict.mRemotePort; |
78 | 0 | e->mData = aEventInitDict.mData; |
79 | 0 | e->SetTrusted(trusted); |
80 | 0 | e->SetComposed(aEventInitDict.mComposed); |
81 | 0 | mozilla::HoldJSObjects(e.get()); |
82 | 0 | return e.forget(); |
83 | 0 | } |
84 | | |
85 | | already_AddRefed<UDPMessageEvent> |
86 | | UDPMessageEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const UDPMessageEventInit& aEventInitDict, ErrorResult& aRv) |
87 | 0 | { |
88 | 0 | nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports()); |
89 | 0 | return Constructor(owner, aType, aEventInitDict); |
90 | 0 | } |
91 | | |
92 | | void |
93 | | UDPMessageEvent::GetRemoteAddress(nsString& aRetVal) const |
94 | 0 | { |
95 | 0 | aRetVal = mRemoteAddress; |
96 | 0 | } |
97 | | |
98 | | uint16_t |
99 | | UDPMessageEvent::RemotePort() const |
100 | 0 | { |
101 | 0 | return mRemotePort; |
102 | 0 | } |
103 | | |
104 | | void |
105 | | UDPMessageEvent::GetData(JSContext* cx, JS::MutableHandle<JS::Value> aRetVal) const |
106 | 0 | { |
107 | 0 | GetData(aRetVal); |
108 | 0 | } |
109 | | |
110 | | |
111 | | } // namespace dom |
112 | | } // namespace mozilla |