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

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

Issue 2272613003: binding: Retires ExceptionState::throwIfNeeded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 3 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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "V8TestInterface3.h" 7 #include "V8TestInterface3.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 TestInterface3V8Internal::voidMethodDocumentMethod(info); 87 TestInterface3V8Internal::voidMethodDocumentMethod(info);
88 } 88 }
89 89
90 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 90 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
91 { 91 {
92 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface3", info.Holder(), info.GetIsolate()); 92 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface3", info.Holder(), info.GetIsolate());
93 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 93 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
94 ScriptState* scriptState = ScriptState::forReceiverObject(info); 94 ScriptState* scriptState = ScriptState::forReceiverObject(info);
95 Iterator* result = impl->iterableKeys(scriptState, exceptionState); 95 Iterator* result = impl->iterableKeys(scriptState, exceptionState);
96 if (exceptionState.hadException()) { 96 if (exceptionState.hadException()) {
97 exceptionState.throwIfNeeded();
98 return; 97 return;
99 } 98 }
100 v8SetReturnValue(info, result); 99 v8SetReturnValue(info, result);
101 } 100 }
102 101
103 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 102 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
104 { 103 {
105 TestInterface3V8Internal::keysMethod(info); 104 TestInterface3V8Internal::keysMethod(info);
106 } 105 }
107 106
108 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 107 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
109 { 108 {
110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface3", info.Holder(), info.GetIsolate()); 109 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface3", info.Holder(), info.GetIsolate());
111 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 110 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
112 ScriptState* scriptState = ScriptState::forReceiverObject(info); 111 ScriptState* scriptState = ScriptState::forReceiverObject(info);
113 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); 112 Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
114 if (exceptionState.hadException()) { 113 if (exceptionState.hadException()) {
115 exceptionState.throwIfNeeded();
116 return; 114 return;
117 } 115 }
118 v8SetReturnValue(info, result); 116 v8SetReturnValue(info, result);
119 } 117 }
120 118
121 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 119 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
122 { 120 {
123 TestInterface3V8Internal::valuesMethod(info); 121 TestInterface3V8Internal::valuesMethod(info);
124 } 122 }
125 123
126 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 124 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
127 { 125 {
128 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface3", info.Holder(), info.GetIsolate()); 126 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface3", info.Holder(), info.GetIsolate());
129 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 127 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
130 ScriptState* scriptState = ScriptState::forReceiverObject(info); 128 ScriptState* scriptState = ScriptState::forReceiverObject(info);
131 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); 129 Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
132 if (exceptionState.hadException()) { 130 if (exceptionState.hadException()) {
133 exceptionState.throwIfNeeded();
134 return; 131 return;
135 } 132 }
136 v8SetReturnValue(info, result); 133 v8SetReturnValue(info, result);
137 } 134 }
138 135
139 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 136 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
140 { 137 {
141 TestInterface3V8Internal::entriesMethod(info); 138 TestInterface3V8Internal::entriesMethod(info);
142 } 139 }
143 140
144 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 141 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
145 { 142 {
146 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestInterface3", info.Holder(), info.GetIsolate()); 143 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestInterface3", info.Holder(), info.GetIsolate());
147 if (UNLIKELY(info.Length() < 1)) { 144 if (UNLIKELY(info.Length() < 1)) {
148 setMinimumArityTypeError(exceptionState, 1, info.Length()); 145 setMinimumArityTypeError(exceptionState, 1, info.Length());
149 exceptionState.throwIfNeeded();
150 return; 146 return;
151 } 147 }
152 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 148 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
153 ScriptValue callback; 149 ScriptValue callback;
154 ScriptValue thisArg; 150 ScriptValue thisArg;
155 { 151 {
156 if (!info[0]->IsFunction()) { 152 if (!info[0]->IsFunction()) {
157 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 153 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
158 exceptionState.throwIfNeeded();
159 return; 154 return;
160 } 155 }
161 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ; 156 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ;
162 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); 157 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
163 } 158 }
164 ScriptState* scriptState = ScriptState::forReceiverObject(info); 159 ScriptState* scriptState = ScriptState::forReceiverObject(info);
165 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState); 160 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState);
166 if (exceptionState.hadException()) { 161 if (exceptionState.hadException()) {
167 exceptionState.throwIfNeeded();
168 return; 162 return;
169 } 163 }
170 } 164 }
171 165
172 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 166 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
173 { 167 {
174 TestInterface3V8Internal::forEachMethod(info); 168 TestInterface3V8Internal::forEachMethod(info);
175 } 169 }
176 170
177 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 171 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
178 { 172 {
179 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 173 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
180 v8SetReturnValueString(info, impl->readonlyStringifierAttribute(), info.GetI solate()); 174 v8SetReturnValueString(info, impl->readonlyStringifierAttribute(), info.GetI solate());
181 } 175 }
182 176
183 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 177 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
184 { 178 {
185 TestInterface3V8Internal::toStringMethod(info); 179 TestInterface3V8Internal::toStringMethod(info);
186 } 180 }
187 181
188 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 182 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
189 { 183 {
190 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface3", info.Holder(), info.GetIsolate()); 184 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface3", info.Holder(), info.GetIsolate());
191 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); 185 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
192 ScriptState* scriptState = ScriptState::forReceiverObject(info); 186 ScriptState* scriptState = ScriptState::forReceiverObject(info);
193 Iterator* result = impl->iterator(scriptState, exceptionState); 187 Iterator* result = impl->iterator(scriptState, exceptionState);
194 if (exceptionState.hadException()) { 188 if (exceptionState.hadException()) {
195 exceptionState.throwIfNeeded();
196 return; 189 return;
197 } 190 }
198 v8SetReturnValue(info, result); 191 v8SetReturnValue(info, result);
199 } 192 }
200 193
201 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 194 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
202 { 195 {
203 TestInterface3V8Internal::iteratorMethod(info); 196 TestInterface3V8Internal::iteratorMethod(info);
204 } 197 }
205 198
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 { 314 {
322 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 315 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
323 } 316 }
324 317
325 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8:: Local<v8::Value> value) 318 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8:: Local<v8::Value> value)
326 { 319 {
327 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr; 320 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr;
328 } 321 }
329 322
330 } // namespace blink 323 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698