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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceNotScriptWrappable.cpp

Issue 564063002: Generate simple code for "trivial" conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 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 "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceNotScriptWrappable.h" 8 #include "V8TestInterfaceNotScriptWrappable.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 27 matching lines...) Expand all
38 { 38 {
39 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 39 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
40 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeGetter(info); 40 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeGetter(info);
41 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 41 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
42 } 42 }
43 43
44 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info) 44 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info)
45 { 45 {
46 v8::Handle<v8::Object> holder = info.Holder(); 46 v8::Handle<v8::Object> holder = info.Holder();
47 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(holder); 47 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(holder);
48 TONATIVE_VOID(TestInterfaceNotScriptWrappable*, cppValue, V8TestInterfaceNot ScriptWrappable::toImplWithTypeCheck(info.GetIsolate(), v8Value)); 48 TestInterfaceNotScriptWrappable* cppValue = V8TestInterfaceNotScriptWrappabl e::toImplWithTypeCheck(info.GetIsolate(), v8Value);
49 impl->setAttr1(WTF::getPtr(cppValue)); 49 impl->setAttr1(WTF::getPtr(cppValue));
50 } 50 }
51 51
52 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info) 52 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
53 { 53 {
54 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 54 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
55 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeSetter(v8Value, inf o); 55 TestInterfaceNotScriptWrappableV8Internal::attr1AttributeSetter(v8Value, inf o);
56 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 56 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
57 } 57 }
58 58
59 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 59 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
60 { 60 {
61 if (UNLIKELY(info.Length() < 1)) { 61 if (UNLIKELY(info.Length() < 1)) {
62 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f unc", "TestInterfaceNotScriptWrappable", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate()); 62 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("f unc", "TestInterfaceNotScriptWrappable", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate());
63 return; 63 return;
64 } 64 }
65 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(info.Holder()); 65 TestInterfaceNotScriptWrappable* impl = V8TestInterfaceNotScriptWrappable::t oImpl(info.Holder());
66 TestInterfaceNotScriptWrappable* arg; 66 TestInterfaceNotScriptWrappable* arg;
67 { 67 {
68 v8::TryCatch block; 68 arg = V8TestInterfaceNotScriptWrappable::toImplWithTypeCheck(info.GetIso late(), info[0]);
69 V8RethrowTryCatchScope rethrow(block);
70 TONATIVE_VOID_INTERNAL(arg, V8TestInterfaceNotScriptWrappable::toImplWit hTypeCheck(info.GetIsolate(), info[0]));
71 } 69 }
72 impl->func(arg); 70 impl->func(arg);
73 } 71 }
74 72
75 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 73 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
76 { 74 {
77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
78 TestInterfaceNotScriptWrappableV8Internal::funcMethod(info); 76 TestInterfaceNotScriptWrappableV8Internal::funcMethod(info);
79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 77 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
80 } 78 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return 0; 162 return 0;
165 } 163 }
166 164
167 template<> 165 template<>
168 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNotScriptWrappable* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate) 166 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNotScriptWrappable* impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate)
169 { 167 {
170 return toV8(impl, creationContext, isolate); 168 return toV8(impl, creationContext, isolate);
171 } 169 }
172 170
173 } // namespace blink 171 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698