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

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

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make constructors explicit Created 6 years, 6 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 "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 double doubleArg; 68 double doubleArg;
69 V8StringResource<> stringArg; 69 V8StringResource<> stringArg;
70 TestInterfaceEmpty* testInterfaceEmptyArg; 70 TestInterfaceEmpty* testInterfaceEmptyArg;
71 Dictionary dictionaryArg; 71 Dictionary dictionaryArg;
72 Vector<String> sequenceStringArg; 72 Vector<String> sequenceStringArg;
73 Vector<Dictionary> sequenceDictionaryArg; 73 Vector<Dictionary> sequenceDictionaryArg;
74 Dictionary optionalDictionaryArg; 74 Dictionary optionalDictionaryArg;
75 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; 75 TestInterfaceEmpty* optionalTestInterfaceEmptyArg;
76 { 76 {
77 v8::TryCatch block; 77 v8::TryCatch block;
78 V8RethrowTryCatchScope rethrow(block);
78 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal ue())); 79 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal ue()));
79 TOSTRING_VOID_INTERNAL(stringArg, info[1]); 80 TOSTRING_VOID_INTERNAL(stringArg, info[1]);
80 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[2])); 81 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[2]));
81 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[3], info.GetIsolat e())); 82 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[3], info.GetIsolat e()));
82 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { 83 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
83 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an object."); 84 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an object.");
84 exceptionState.throwIfNeeded(); 85 exceptionState.throwIfNeeded();
85 block.ReThrow();
86 return; 86 return;
87 } 87 }
88 TONATIVE_VOID_INTERNAL(sequenceStringArg, toNativeArray<String>(info[4], 5, info.GetIsolate())); 88 TONATIVE_VOID_INTERNAL(sequenceStringArg, toNativeArray<String>(info[4], 5, info.GetIsolate()));
89 TONATIVE_VOID_INTERNAL(sequenceDictionaryArg, toNativeArray<Dictionary>( info[5], 6, info.GetIsolate())); 89 TONATIVE_VOID_INTERNAL(sequenceDictionaryArg, toNativeArray<Dictionary>( info[5], 6, info.GetIsolate()));
90 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[6], info.G etIsolate())); 90 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[6], info.G etIsolate()));
91 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg .isObject()) { 91 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg .isObject()) {
92 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg') is not an object."); 92 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg') is not an object.");
93 exceptionState.throwIfNeeded(); 93 exceptionState.throwIfNeeded();
94 block.ReThrow();
95 return; 94 return;
96 } 95 }
97 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toNativeWithTypeCheck(info.GetIsolate(), info[7])); 96 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toNativeWithTypeCheck(info.GetIsolate(), info[7]));
98 } 97 }
99 ExecutionContext* context = currentExecutionContext(isolate); 98 ExecutionContext* context = currentExecutionContext(isolate);
100 Document& document = *toDocument(currentExecutionContext(isolate)); 99 Document& document = *toDocument(currentExecutionContext(isolate));
101 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con text, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionaryArg, sequ enceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTestInterfa ceEmptyArg, exceptionState); 100 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con text, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionaryArg, sequ enceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTestInterfa ceEmptyArg, exceptionState);
102 if (exceptionState.throwIfNeeded()) 101 if (exceptionState.throwIfNeeded())
103 return; 102 return;
104 103
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 fromInternalPointer(object)->deref(); 240 fromInternalPointer(object)->deref();
242 } 241 }
243 242
244 template<> 243 template<>
245 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 244 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
246 { 245 {
247 return toV8(impl, creationContext, isolate); 246 return toV8(impl, creationContext, isolate);
248 } 247 }
249 248
250 } // namespace WebCore 249 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698