Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp

Issue 2733763003: Reimplement [PutForwards] per spec (Closed)
Patch Set: avoid using v8::Maybe Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 60 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
61 61
62 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextAttribute()), impl); 62 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextAttribute()), impl);
63 } 63 }
64 64
65 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 65 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
66 v8::Isolate* isolate = info.GetIsolate(); 66 v8::Isolate* isolate = info.GetIsolate();
67 ALLOW_UNUSED_LOCAL(isolate); 67 ALLOW_UNUSED_LOCAL(isolate);
68 68
69 v8::Local<v8::Object> holder = info.Holder(); 69 v8::Local<v8::Object> holder = info.Holder();
70 ALLOW_UNUSED_LOCAL(holder);
71
70 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 72 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
71 73
72 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextAttribute"); 74 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextAttribute");
73 75
74 // Prepare the value to be set. 76 // Prepare the value to be set.
75 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 77 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
76 78
77 // Type check per: http://heycam.github.io/webidl/#es-interface 79 // Type check per: http://heycam.github.io/webidl/#es-interface
78 if (!cppValue) { 80 if (!cppValue) {
79 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 81 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
80 return; 82 return;
81 } 83 }
82 84
83 impl->setSecureContextAttribute(cppValue); 85 impl->setSecureContextAttribute(cppValue);
84 } 86 }
85 87
86 static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::Functi onCallbackInfo<v8::Value>& info) { 88 static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::Functi onCallbackInfo<v8::Value>& info) {
87 v8::Local<v8::Object> holder = info.Holder(); 89 v8::Local<v8::Object> holder = info.Holder();
88 90
89 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 91 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
90 92
91 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextRuntimeEnabledAttrib ute()), impl); 93 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextRuntimeEnabledAttrib ute()), impl);
92 } 94 }
93 95
94 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 96 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
95 v8::Isolate* isolate = info.GetIsolate(); 97 v8::Isolate* isolate = info.GetIsolate();
96 ALLOW_UNUSED_LOCAL(isolate); 98 ALLOW_UNUSED_LOCAL(isolate);
97 99
98 v8::Local<v8::Object> holder = info.Holder(); 100 v8::Local<v8::Object> holder = info.Holder();
101 ALLOW_UNUSED_LOCAL(holder);
102
99 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 103 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
100 104
101 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextRuntimeEnabledAttribute"); 105 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextRuntimeEnabledAttribute");
102 106
103 // Prepare the value to be set. 107 // Prepare the value to be set.
104 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 108 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
105 109
106 // Type check per: http://heycam.github.io/webidl/#es-interface 110 // Type check per: http://heycam.github.io/webidl/#es-interface
107 if (!cppValue) { 111 if (!cppValue) {
108 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 112 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
109 return; 113 return;
110 } 114 }
111 115
112 impl->setSecureContextRuntimeEnabledAttribute(cppValue); 116 impl->setSecureContextRuntimeEnabledAttribute(cppValue);
113 } 117 }
114 118
115 static void secureContextWindowExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) { 119 static void secureContextWindowExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) {
116 v8::Local<v8::Object> holder = info.Holder(); 120 v8::Local<v8::Object> holder = info.Holder();
117 121
118 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 122 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
119 123
120 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedAttribu te()), impl); 124 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedAttribu te()), impl);
121 } 125 }
122 126
123 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 127 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
124 v8::Isolate* isolate = info.GetIsolate(); 128 v8::Isolate* isolate = info.GetIsolate();
125 ALLOW_UNUSED_LOCAL(isolate); 129 ALLOW_UNUSED_LOCAL(isolate);
126 130
127 v8::Local<v8::Object> holder = info.Holder(); 131 v8::Local<v8::Object> holder = info.Holder();
132 ALLOW_UNUSED_LOCAL(holder);
133
128 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 134 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
129 135
130 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWindowExposedAttribute"); 136 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWindowExposedAttribute");
131 137
132 // Prepare the value to be set. 138 // Prepare the value to be set.
133 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 139 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
134 140
135 // Type check per: http://heycam.github.io/webidl/#es-interface 141 // Type check per: http://heycam.github.io/webidl/#es-interface
136 if (!cppValue) { 142 if (!cppValue) {
137 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 143 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
138 return; 144 return;
139 } 145 }
140 146
141 impl->setSecureContextWindowExposedAttribute(cppValue); 147 impl->setSecureContextWindowExposedAttribute(cppValue);
142 } 148 }
143 149
144 static void secureContextWorkerExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) { 150 static void secureContextWorkerExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) {
145 v8::Local<v8::Object> holder = info.Holder(); 151 v8::Local<v8::Object> holder = info.Holder();
146 152
147 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 153 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
148 154
149 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedAttribu te()), impl); 155 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedAttribu te()), impl);
150 } 156 }
151 157
152 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 158 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
153 v8::Isolate* isolate = info.GetIsolate(); 159 v8::Isolate* isolate = info.GetIsolate();
154 ALLOW_UNUSED_LOCAL(isolate); 160 ALLOW_UNUSED_LOCAL(isolate);
155 161
156 v8::Local<v8::Object> holder = info.Holder(); 162 v8::Local<v8::Object> holder = info.Holder();
163 ALLOW_UNUSED_LOCAL(holder);
164
157 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 165 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
158 166
159 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWorkerExposedAttribute"); 167 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWorkerExposedAttribute");
160 168
161 // Prepare the value to be set. 169 // Prepare the value to be set.
162 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 170 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
163 171
164 // Type check per: http://heycam.github.io/webidl/#es-interface 172 // Type check per: http://heycam.github.io/webidl/#es-interface
165 if (!cppValue) { 173 if (!cppValue) {
166 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 174 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
167 return; 175 return;
168 } 176 }
169 177
170 impl->setSecureContextWorkerExposedAttribute(cppValue); 178 impl->setSecureContextWorkerExposedAttribute(cppValue);
171 } 179 }
172 180
173 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) { 181 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) {
174 v8::Local<v8::Object> holder = info.Holder(); 182 v8::Local<v8::Object> holder = info.Holder();
175 183
176 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 184 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
177 185
178 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedRuntime EnabledAttribute()), impl); 186 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedRuntime EnabledAttribute()), impl);
179 } 187 }
180 188
181 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 189 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
182 v8::Isolate* isolate = info.GetIsolate(); 190 v8::Isolate* isolate = info.GetIsolate();
183 ALLOW_UNUSED_LOCAL(isolate); 191 ALLOW_UNUSED_LOCAL(isolate);
184 192
185 v8::Local<v8::Object> holder = info.Holder(); 193 v8::Local<v8::Object> holder = info.Holder();
194 ALLOW_UNUSED_LOCAL(holder);
195
186 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 196 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
187 197
188 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWindowExposedRuntimeEnabledAttribute"); 198 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWindowExposedRuntimeEnabledAttribute");
189 199
190 // Prepare the value to be set. 200 // Prepare the value to be set.
191 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 201 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
192 202
193 // Type check per: http://heycam.github.io/webidl/#es-interface 203 // Type check per: http://heycam.github.io/webidl/#es-interface
194 if (!cppValue) { 204 if (!cppValue) {
195 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 205 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
196 return; 206 return;
197 } 207 }
198 208
199 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue); 209 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
200 } 210 }
201 211
202 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) { 212 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) {
203 v8::Local<v8::Object> holder = info.Holder(); 213 v8::Local<v8::Object> holder = info.Holder();
204 214
205 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 215 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
206 216
207 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedRuntime EnabledAttribute()), impl); 217 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedRuntime EnabledAttribute()), impl);
208 } 218 }
209 219
210 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 220 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
211 v8::Isolate* isolate = info.GetIsolate(); 221 v8::Isolate* isolate = info.GetIsolate();
212 ALLOW_UNUSED_LOCAL(isolate); 222 ALLOW_UNUSED_LOCAL(isolate);
213 223
214 v8::Local<v8::Object> holder = info.Holder(); 224 v8::Local<v8::Object> holder = info.Holder();
225 ALLOW_UNUSED_LOCAL(holder);
226
215 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder ); 227 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(holder );
216 228
217 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWorkerExposedRuntimeEnabledAttribute"); 229 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terfaceSecureContext", "secureContextWorkerExposedRuntimeEnabledAttribute");
218 230
219 // Prepare the value to be set. 231 // Prepare the value to be set.
220 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 232 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
221 233
222 // Type check per: http://heycam.github.io/webidl/#es-interface 234 // Type check per: http://heycam.github.io/webidl/#es-interface
223 if (!cppValue) { 235 if (!cppValue) {
224 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 236 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 {"secureContextWorkerExposedRuntimeEnabledMethod", V8TestInterfaceSecu reContext::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, v8:: None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMC onfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds} 515 {"secureContextWorkerExposedRuntimeEnabledMethod", V8TestInterfaceSecu reContext::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, v8:: None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMC onfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
504 }; 516 };
505 for (const auto& methodConfig : secureContextWorkerExposedRuntimeEnabled MethodMethodConfiguration) 517 for (const auto& methodConfig : secureContextWorkerExposedRuntimeEnabled MethodMethodConfiguration)
506 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, methodConfig); 518 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object >(), prototypeObject, interfaceObject, signature, methodConfig);
507 } 519 }
508 } 520 }
509 } 521 }
510 } 522 }
511 523
512 } // namespace blink 524 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698