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

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

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 10 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 "V8TestNode.h" 8 #include "V8TestNode.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 30 matching lines...) Expand all
41 { 41 {
42 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 42 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
43 TestNodeV8Internal::hrefAttributeGetter(info); 43 TestNodeV8Internal::hrefAttributeGetter(info);
44 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 44 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
45 } 45 }
46 46
47 static void hrefAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property CallbackInfo<void>& info) 47 static void hrefAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property CallbackInfo<void>& info)
48 { 48 {
49 v8::Local<v8::Object> holder = info.Holder(); 49 v8::Local<v8::Object> holder = info.Holder();
50 TestNode* impl = V8TestNode::toImpl(holder); 50 TestNode* impl = V8TestNode::toImpl(holder);
51 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 51 V8StringResource<> cppValue = v8Value;
52 if (!cppValue.prepare())
53 return;
52 impl->setHref(cppValue); 54 impl->setHref(cppValue);
53 } 55 }
54 56
55 static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> v8Value, const v8::PropertyCallbackInfo<void>& info) 57 static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> v8Value, const v8::PropertyCallbackInfo<void>& info)
56 { 58 {
57 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 59 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
58 TestNodeV8Internal::hrefAttributeSetter(v8Value, info); 60 TestNodeV8Internal::hrefAttributeSetter(v8Value, info);
59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 61 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
60 } 62 }
61 63
62 static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 64 static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
63 { 65 {
64 v8::Local<v8::Object> holder = info.Holder(); 66 v8::Local<v8::Object> holder = info.Holder();
65 TestNode* impl = V8TestNode::toImpl(holder); 67 TestNode* impl = V8TestNode::toImpl(holder);
66 v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate()); 68 v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate());
67 } 69 }
68 70
69 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 71 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
70 { 72 {
71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 73 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
72 TestNodeV8Internal::hrefThrowsAttributeGetter(info); 74 TestNodeV8Internal::hrefThrowsAttributeGetter(info);
73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 75 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
74 } 76 }
75 77
76 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr opertyCallbackInfo<void>& info) 78 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr opertyCallbackInfo<void>& info)
77 { 79 {
78 v8::Local<v8::Object> holder = info.Holder(); 80 v8::Local<v8::Object> holder = info.Holder();
79 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", " TestNode", holder, info.GetIsolate()); 81 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", " TestNode", holder, info.GetIsolate());
80 TestNode* impl = V8TestNode::toImpl(holder); 82 TestNode* impl = V8TestNode::toImpl(holder);
81 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 83 V8StringResource<> cppValue = v8Value;
84 if (!cppValue.prepare())
85 return;
82 impl->setHrefThrows(cppValue, exceptionState); 86 impl->setHrefThrows(cppValue, exceptionState);
83 exceptionState.throwIfNeeded(); 87 exceptionState.throwIfNeeded();
84 } 88 }
85 89
86 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 90 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
87 { 91 {
88 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 92 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
89 TestNodeV8Internal::hrefThrowsAttributeSetter(v8Value, info); 93 TestNodeV8Internal::hrefThrowsAttributeSetter(v8Value, info);
90 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 94 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
91 } 95 }
92 96
93 static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info) 97 static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
94 { 98 {
95 v8::Local<v8::Object> holder = info.Holder(); 99 v8::Local<v8::Object> holder = info.Holder();
96 TestNode* impl = V8TestNode::toImpl(holder); 100 TestNode* impl = V8TestNode::toImpl(holder);
97 v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate()); 101 v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate());
98 } 102 }
99 103
100 static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info) 104 static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
101 { 105 {
102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
103 TestNodeV8Internal::hrefCallWithAttributeGetter(info); 107 TestNodeV8Internal::hrefCallWithAttributeGetter(info);
104 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
105 } 109 }
106 110
107 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info) 111 static void hrefCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
108 { 112 {
109 v8::Local<v8::Object> holder = info.Holder(); 113 v8::Local<v8::Object> holder = info.Holder();
110 TestNode* impl = V8TestNode::toImpl(holder); 114 TestNode* impl = V8TestNode::toImpl(holder);
111 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 115 V8StringResource<> cppValue = v8Value;
116 if (!cppValue.prepare())
117 return;
112 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 118 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
113 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); 119 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
114 } 120 }
115 121
116 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 122 static void hrefCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
117 { 123 {
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 124 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
119 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info); 125 TestNodeV8Internal::hrefCallWithAttributeSetter(v8Value, info);
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 126 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
121 } 127 }
(...skipping 10 matching lines...) Expand all
132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
133 TestNodeV8Internal::hrefByteStringAttributeGetter(info); 139 TestNodeV8Internal::hrefByteStringAttributeGetter(info);
134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
135 } 141 }
136 142
137 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info) 143 static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
138 { 144 {
139 v8::Local<v8::Object> holder = info.Holder(); 145 v8::Local<v8::Object> holder = info.Holder();
140 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString ", "TestNode", holder, info.GetIsolate()); 146 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefByteString ", "TestNode", holder, info.GetIsolate());
141 TestNode* impl = V8TestNode::toImpl(holder); 147 TestNode* impl = V8TestNode::toImpl(holder);
142 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va lue, exceptionState), exceptionState); 148 V8StringResource<> cppValue = toByteString(v8Value, exceptionState);
149 if (exceptionState.throwIfNeeded())
150 return;
143 impl->setHrefByteString(cppValue); 151 impl->setHrefByteString(cppValue);
144 } 152 }
145 153
146 static void hrefByteStringAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 154 static void hrefByteStringAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
147 { 155 {
148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
149 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info); 157 TestNodeV8Internal::hrefByteStringAttributeSetter(v8Value, info);
150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
151 } 159 }
152 160
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 239 }
232 240
233 void V8TestNode::derefObject(ScriptWrappable* scriptWrappable) 241 void V8TestNode::derefObject(ScriptWrappable* scriptWrappable)
234 { 242 {
235 #if !ENABLE(OILPAN) 243 #if !ENABLE(OILPAN)
236 scriptWrappable->toImpl<TestNode>()->deref(); 244 scriptWrappable->toImpl<TestNode>()->deref();
237 #endif 245 #endif
238 } 246 }
239 247
240 } // namespace blink 248 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698