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

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

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 "V8TestInterfaceGarbageCollected.h" 8 #include "V8TestInterfaceGarbageCollected.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 76 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
77 { 77 {
78 if (UNLIKELY(info.Length() < 1)) { 78 if (UNLIKELY(info.Length() < 1)) {
79 throwMinimumArityTypeErrorForMethod("func", "TestInterfaceGarbageCollect ed", 1, info.Length(), info.GetIsolate()); 79 throwMinimumArityTypeErrorForMethod("func", "TestInterfaceGarbageCollect ed", 1, info.Length(), info.GetIsolate());
80 return; 80 return;
81 } 81 }
82 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat ive(info.Holder()); 82 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat ive(info.Holder());
83 TestInterfaceGarbageCollected* arg; 83 TestInterfaceGarbageCollected* arg;
84 { 84 {
85 v8::TryCatch block; 85 V8TryPropagate block;
86 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toNativeWit hTypeCheck(info.GetIsolate(), info[0])); 86 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceGarbageCollected::toNativeWit hTypeCheck(info.GetIsolate(), info[0]));
87 } 87 }
88 impl->func(arg); 88 impl->func(arg);
89 } 89 }
90 90
91 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 91 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
92 { 92 {
93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
94 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); 94 TestInterfaceGarbageCollectedV8Internal::funcMethod(info);
95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
96 } 96 }
97 97
98 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 98 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
99 { 99 {
100 v8::Isolate* isolate = info.GetIsolate(); 100 v8::Isolate* isolate = info.GetIsolate();
101 if (UNLIKELY(info.Length() < 1)) { 101 if (UNLIKELY(info.Length() < 1)) {
102 throwMinimumArityTypeErrorForConstructor("TestInterfaceGarbageCollected" , 1, info.Length(), info.GetIsolate()); 102 throwMinimumArityTypeErrorForConstructor("TestInterfaceGarbageCollected" , 1, info.Length(), info.GetIsolate());
103 return; 103 return;
104 } 104 }
105 V8StringResource<> str; 105 V8StringResource<> str;
106 { 106 {
107 TOSTRING_VOID_INTERNAL_NOTRYCATCH(str, info[0]); 107 TOSTRING_VOID_INTERNAL(str, info[0]);
108 } 108 }
109 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected:: create(str); 109 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected:: create(str);
110 110
111 v8::Handle<v8::Object> wrapper = info.Holder(); 111 v8::Handle<v8::Object> wrapper = info.Holder();
112 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im pl.release(), &V8TestInterfaceGarbageCollected::wrapperTypeInfo, wrapper, isolat e, WrapperConfiguration::Independent); 112 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im pl.release(), &V8TestInterfaceGarbageCollected::wrapperTypeInfo, wrapper, isolat e, WrapperConfiguration::Independent);
113 v8SetReturnValue(info, wrapper); 113 v8SetReturnValue(info, wrapper);
114 } 114 }
115 115
116 } // namespace TestInterfaceGarbageCollectedV8Internal 116 } // namespace TestInterfaceGarbageCollectedV8Internal
117 117
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 { 216 {
217 } 217 }
218 218
219 template<> 219 template<>
220 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 220 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
221 { 221 {
222 return toV8(impl, creationContext, isolate); 222 return toV8(impl, creationContext, isolate);
223 } 223 }
224 224
225 } // namespace WebCore 225 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698