/work/obj-fuzz/dom/bindings/SecurityPolicyViolationEvent.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 SecurityPolicyViolationEvent.webidl BY Codegen.py - DO NOT EDIT */ |
8 | | |
9 | | #include "EventBinding.h" |
10 | | #include "SecurityPolicyViolationEvent.h" |
11 | | #include "SecurityPolicyViolationEventBinding.h" |
12 | | #include "js/GCAPI.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrimitiveConversions.h" |
15 | | #include "mozilla/dom/SecurityPolicyViolationEvent.h" |
16 | | |
17 | | namespace mozilla { |
18 | | namespace dom { |
19 | | |
20 | | |
21 | | SecurityPolicyViolationEvent::SecurityPolicyViolationEvent(mozilla::dom::EventTarget* aOwner) |
22 | | : Event(aOwner, nullptr, nullptr) |
23 | 0 | { |
24 | 0 | } |
25 | | |
26 | | SecurityPolicyViolationEvent::~SecurityPolicyViolationEvent() |
27 | 0 | { |
28 | 0 | } |
29 | | |
30 | | SecurityPolicyViolationEvent* |
31 | | SecurityPolicyViolationEvent::AsSecurityPolicyViolationEvent() |
32 | 0 | { |
33 | 0 | return this; |
34 | 0 | } |
35 | | |
36 | | JSObject* |
37 | | SecurityPolicyViolationEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
38 | 0 | { |
39 | 0 | return SecurityPolicyViolationEvent_Binding::Wrap(aCx, this, aGivenProto); |
40 | 0 | } |
41 | | |
42 | | already_AddRefed<SecurityPolicyViolationEvent> |
43 | | SecurityPolicyViolationEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const SecurityPolicyViolationEventInit& aEventInitDict) |
44 | 0 | { |
45 | 0 | RefPtr<SecurityPolicyViolationEvent> e = new SecurityPolicyViolationEvent(aOwner); |
46 | 0 | bool trusted = e->Init(aOwner); |
47 | 0 | e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable); |
48 | 0 | e->mDocumentURI = aEventInitDict.mDocumentURI; |
49 | 0 | e->mReferrer = aEventInitDict.mReferrer; |
50 | 0 | e->mBlockedURI = aEventInitDict.mBlockedURI; |
51 | 0 | e->mViolatedDirective = aEventInitDict.mViolatedDirective; |
52 | 0 | e->mEffectiveDirective = aEventInitDict.mEffectiveDirective; |
53 | 0 | e->mOriginalPolicy = aEventInitDict.mOriginalPolicy; |
54 | 0 | e->mSourceFile = aEventInitDict.mSourceFile; |
55 | 0 | e->mSample = aEventInitDict.mSample; |
56 | 0 | e->mDisposition = aEventInitDict.mDisposition; |
57 | 0 | e->mStatusCode = aEventInitDict.mStatusCode; |
58 | 0 | e->mLineNumber = aEventInitDict.mLineNumber; |
59 | 0 | e->mColumnNumber = aEventInitDict.mColumnNumber; |
60 | 0 | e->SetTrusted(trusted); |
61 | 0 | e->SetComposed(aEventInitDict.mComposed); |
62 | 0 | return e.forget(); |
63 | 0 | } |
64 | | |
65 | | already_AddRefed<SecurityPolicyViolationEvent> |
66 | | SecurityPolicyViolationEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const SecurityPolicyViolationEventInit& aEventInitDict, ErrorResult& aRv) |
67 | 0 | { |
68 | 0 | nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports()); |
69 | 0 | return Constructor(owner, aType, aEventInitDict); |
70 | 0 | } |
71 | | |
72 | | void |
73 | | SecurityPolicyViolationEvent::GetDocumentURI(nsString& aRetVal) const |
74 | 0 | { |
75 | 0 | aRetVal = mDocumentURI; |
76 | 0 | } |
77 | | |
78 | | void |
79 | | SecurityPolicyViolationEvent::GetReferrer(nsString& aRetVal) const |
80 | 0 | { |
81 | 0 | aRetVal = mReferrer; |
82 | 0 | } |
83 | | |
84 | | void |
85 | | SecurityPolicyViolationEvent::GetBlockedURI(nsString& aRetVal) const |
86 | 0 | { |
87 | 0 | aRetVal = mBlockedURI; |
88 | 0 | } |
89 | | |
90 | | void |
91 | | SecurityPolicyViolationEvent::GetViolatedDirective(nsString& aRetVal) const |
92 | 0 | { |
93 | 0 | aRetVal = mViolatedDirective; |
94 | 0 | } |
95 | | |
96 | | void |
97 | | SecurityPolicyViolationEvent::GetEffectiveDirective(nsString& aRetVal) const |
98 | 0 | { |
99 | 0 | aRetVal = mEffectiveDirective; |
100 | 0 | } |
101 | | |
102 | | void |
103 | | SecurityPolicyViolationEvent::GetOriginalPolicy(nsString& aRetVal) const |
104 | 0 | { |
105 | 0 | aRetVal = mOriginalPolicy; |
106 | 0 | } |
107 | | |
108 | | void |
109 | | SecurityPolicyViolationEvent::GetSourceFile(nsString& aRetVal) const |
110 | 0 | { |
111 | 0 | aRetVal = mSourceFile; |
112 | 0 | } |
113 | | |
114 | | void |
115 | | SecurityPolicyViolationEvent::GetSample(nsString& aRetVal) const |
116 | 0 | { |
117 | 0 | aRetVal = mSample; |
118 | 0 | } |
119 | | |
120 | | SecurityPolicyViolationEventDisposition |
121 | | SecurityPolicyViolationEvent::Disposition() const |
122 | 0 | { |
123 | 0 | return mDisposition; |
124 | 0 | } |
125 | | |
126 | | uint16_t |
127 | | SecurityPolicyViolationEvent::StatusCode() const |
128 | 0 | { |
129 | 0 | return mStatusCode; |
130 | 0 | } |
131 | | |
132 | | int32_t |
133 | | SecurityPolicyViolationEvent::LineNumber() const |
134 | 0 | { |
135 | 0 | return mLineNumber; |
136 | 0 | } |
137 | | |
138 | | int32_t |
139 | | SecurityPolicyViolationEvent::ColumnNumber() const |
140 | 0 | { |
141 | 0 | return mColumnNumber; |
142 | 0 | } |
143 | | |
144 | | |
145 | | } // namespace dom |
146 | | } // namespace mozilla |