/work/obj-fuzz/dom/bindings/TCPSocketEvent.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 TCPSocketEvent.webidl BY Codegen.py - DO NOT EDIT */ |
8 | | |
9 | | #include "EventBinding.h" |
10 | | #include "TCPSocketEvent.h" |
11 | | #include "TCPSocketEventBinding.h" |
12 | | #include "js/GCAPI.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrimitiveConversions.h" |
15 | | #include "mozilla/dom/TCPSocket.h" |
16 | | #include "mozilla/dom/TCPSocketEvent.h" |
17 | | |
18 | | namespace mozilla { |
19 | | namespace dom { |
20 | | |
21 | | |
22 | | NS_IMPL_CYCLE_COLLECTION_CLASS(TCPSocketEvent) |
23 | | |
24 | | NS_IMPL_ADDREF_INHERITED(TCPSocketEvent, Event) |
25 | | NS_IMPL_RELEASE_INHERITED(TCPSocketEvent, Event) |
26 | | |
27 | 0 | NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(TCPSocketEvent, Event) |
28 | 0 | NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END |
29 | | |
30 | 0 | NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(TCPSocketEvent, Event) |
31 | 0 | NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mData) |
32 | 0 | NS_IMPL_CYCLE_COLLECTION_TRACE_END |
33 | | |
34 | 0 | NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(TCPSocketEvent, Event) |
35 | 0 | tmp->mData.setUndefined(); |
36 | 0 | NS_IMPL_CYCLE_COLLECTION_UNLINK_END |
37 | | |
38 | 0 | NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPSocketEvent) |
39 | 0 | NS_INTERFACE_MAP_END_INHERITING(Event) |
40 | | |
41 | | TCPSocketEvent::TCPSocketEvent(mozilla::dom::EventTarget* aOwner) |
42 | | : Event(aOwner, nullptr, nullptr) |
43 | 0 | { |
44 | 0 | } |
45 | | |
46 | | TCPSocketEvent::~TCPSocketEvent() |
47 | 0 | { |
48 | 0 | mData = JS::UndefinedValue(); |
49 | 0 | mozilla::DropJSObjects(this); |
50 | 0 | } |
51 | | |
52 | | void |
53 | | TCPSocketEvent::GetData(JS::MutableHandle<JS::Value> aRetVal) const |
54 | 0 | { |
55 | 0 | JS::ExposeValueToActiveJS(mData); |
56 | 0 | aRetVal.set(mData); |
57 | 0 | } |
58 | | |
59 | | TCPSocketEvent* |
60 | | TCPSocketEvent::AsTCPSocketEvent() |
61 | 0 | { |
62 | 0 | return this; |
63 | 0 | } |
64 | | |
65 | | JSObject* |
66 | | TCPSocketEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
67 | 0 | { |
68 | 0 | return TCPSocketEvent_Binding::Wrap(aCx, this, aGivenProto); |
69 | 0 | } |
70 | | |
71 | | already_AddRefed<TCPSocketEvent> |
72 | | TCPSocketEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const TCPSocketEventInit& aEventInitDict) |
73 | 0 | { |
74 | 0 | RefPtr<TCPSocketEvent> e = new TCPSocketEvent(aOwner); |
75 | 0 | bool trusted = e->Init(aOwner); |
76 | 0 | e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable); |
77 | 0 | e->mData = aEventInitDict.mData; |
78 | 0 | e->SetTrusted(trusted); |
79 | 0 | e->SetComposed(aEventInitDict.mComposed); |
80 | 0 | mozilla::HoldJSObjects(e.get()); |
81 | 0 | return e.forget(); |
82 | 0 | } |
83 | | |
84 | | already_AddRefed<TCPSocketEvent> |
85 | | TCPSocketEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const TCPSocketEventInit& aEventInitDict, ErrorResult& aRv) |
86 | 0 | { |
87 | 0 | nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports()); |
88 | 0 | return Constructor(owner, aType, aEventInitDict); |
89 | 0 | } |
90 | | |
91 | | void |
92 | | TCPSocketEvent::GetData(JSContext* cx, JS::MutableHandle<JS::Value> aRetVal) const |
93 | 0 | { |
94 | 0 | GetData(aRetVal); |
95 | 0 | } |
96 | | |
97 | | |
98 | | } // namespace dom |
99 | | } // namespace mozilla |