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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor.cpp

Issue 460923002: Decouple arity errors creation from throwing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceConstructor.h" 8 #include "V8TestInterfaceConstructor.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab leAsFunction("Audio"), info.GetIsolate()); 232 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab leAsFunction("Audio"), info.GetIsolate());
233 return; 233 return;
234 } 234 }
235 235
236 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) { 236 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) {
237 v8SetReturnValue(info, info.Holder()); 237 v8SetReturnValue(info, info.Holder());
238 return; 238 return;
239 } 239 }
240 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 240 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
241 if (UNLIKELY(info.Length() < 1)) { 241 if (UNLIKELY(info.Length() < 1)) {
242 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 242 setMinimumArityTypeError(exceptionState, 1, info.Length());
243 exceptionState.throwIfNeeded();
243 return; 244 return;
244 } 245 }
245 V8StringResource<> arg; 246 V8StringResource<> arg;
246 V8StringResource<> optArg; 247 V8StringResource<> optArg;
247 { 248 {
248 TOSTRING_VOID_INTERNAL(arg, info[0]); 249 TOSTRING_VOID_INTERNAL(arg, info[0]);
249 if (UNLIKELY(info.Length() <= 1)) { 250 if (UNLIKELY(info.Length() <= 1)) {
250 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate()); 251 ExecutionContext* executionContext = currentExecutionContext(info.Ge tIsolate());
251 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 252 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
252 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(executionContext, document, arg, exceptionState); 253 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr eateForJSConstructor(executionContext, document, arg, exceptionState);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 fromInternalPointer(internalPointer)->deref(); 380 fromInternalPointer(internalPointer)->deref();
380 } 381 }
381 382
382 template<> 383 template<>
383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 384 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
384 { 385 {
385 return toV8(impl, creationContext, isolate); 386 return toV8(impl, creationContext, isolate);
386 } 387 }
387 388
388 } // namespace blink 389 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698