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

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

Issue 221073003: Add helper functions for throwing arity-related TypeErrors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix style nits. Created 6 years, 8 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 | Annotate | Revision Log
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 "V8TestInterfaceNamedConstructor.h" 8 #include "V8TestInterfaceNamedConstructor.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 Document* document = currentDOMWindow(info.GetIsolate())->document(); 86 Document* document = currentDOMWindow(info.GetIsolate())->document();
87 ASSERT(document); 87 ASSERT(document);
88 88
89 // Make sure the document is added to the DOM Node map. Otherwise, the TestI nterfaceNamedConstructor instance 89 // Make sure the document is added to the DOM Node map. Otherwise, the TestI nterfaceNamedConstructor instance
90 // may end up being the only node in the map and get garbage-collected prema turely. 90 // may end up being the only node in the map and get garbage-collected prema turely.
91 toV8(document, info.Holder(), info.GetIsolate()); 91 toV8(document, info.Holder(), info.GetIsolate());
92 92
93 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceNamedConstructor", info.Holder(), info.GetIsolate()); 93 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceNamedConstructor", info.Holder(), info.GetIsolate());
94 if (UNLIKELY(info.Length() < 1)) { 94 if (UNLIKELY(info.Length() < 1)) {
95 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 95 throwArityTypeError(exceptionState, 1, info.Length());
96 exceptionState.throwIfNeeded();
97 return; 96 return;
98 } 97 }
99 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]) ; 98 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]) ;
100 V8TRYCATCH_VOID(bool, defaultUndefinedOptionalBooleanArg, info[1]->BooleanVa lue()); 99 V8TRYCATCH_VOID(bool, defaultUndefinedOptionalBooleanArg, info[1]->BooleanVa lue());
101 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedOptionalLongArg, toInt32(info [2], exceptionState), exceptionState); 100 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedOptionalLongArg, toInt32(info [2], exceptionState), exceptionState);
102 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt ionalStringArg, info[3]); 101 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt ionalStringArg, info[3]);
103 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp tionalstringArg, argumentOrNull(info, 4)); 102 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp tionalstringArg, argumentOrNull(info, 4));
104 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor:: createForJSConstructor(*document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull StringOptionalstringArg, exceptionState); 103 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor:: createForJSConstructor(*document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull StringOptionalstringArg, exceptionState);
105 if (exceptionState.throwIfNeeded()) 104 if (exceptionState.throwIfNeeded())
106 return; 105 return;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 fromInternalPointer(object)->deref(); 203 fromInternalPointer(object)->deref();
205 } 204 }
206 205
207 template<> 206 template<>
208 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 207 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
209 { 208 {
210 return toV8(impl, creationContext, isolate); 209 return toV8(impl, creationContext, isolate);
211 } 210 }
212 211
213 } // namespace WebCore 212 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698