OLD | NEW |
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 "V8TestTypedefs.h" | 8 #include "V8TestTypedefs.h" |
9 | 9 |
10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 namespace WebCore { | 44 namespace WebCore { |
45 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V
8TestTypedefs::domTemplate, V8TestTypedefs::derefObject, 0, 0, 0, V8TestTypedefs
::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; | 45 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V
8TestTypedefs::domTemplate, V8TestTypedefs::derefObject, 0, 0, 0, V8TestTypedefs
::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; |
46 | 46 |
47 namespace TestTypedefsV8Internal { | 47 namespace TestTypedefsV8Internal { |
48 | 48 |
49 template <typename T> void V8_USE(T) { } | 49 template <typename T> void V8_USE(T) { } |
50 | 50 |
51 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 51 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
52 { | 52 { |
53 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 53 v8::Handle<v8::Object> holder = info.Holder(); |
| 54 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
54 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); | 55 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); |
55 } | 56 } |
56 | 57 |
57 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 58 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
58 { | 59 { |
59 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
60 TestTypedefsV8Internal::unsignedLongLongAttrAttributeGetter(info); | 61 TestTypedefsV8Internal::unsignedLongLongAttrAttributeGetter(info); |
61 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 62 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
62 } | 63 } |
63 | 64 |
64 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 65 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
65 { | 66 { |
66 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestTypedefs", info.Holder(), info.GetIsolate()); | 67 v8::Handle<v8::Object> holder = info.Holder(); |
67 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 68 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestTypedefs", holder, info.GetIsolate()); |
| 69 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
68 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); | 70 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); |
69 impl->setUnsignedLongLongAttr(cppValue); | 71 impl->setUnsignedLongLongAttr(cppValue); |
70 } | 72 } |
71 | 73 |
72 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 74 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
73 { | 75 { |
74 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
75 TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); | 77 TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); |
76 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
77 } | 79 } |
78 | 80 |
79 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 81 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
80 { | 82 { |
81 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 83 v8::Handle<v8::Object> holder = info.Holder(); |
82 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestTypedefs", info.Holder(), info.GetIsolate()); | 84 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
| 85 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestTypedefs", holder, info.GetIsolate()); |
83 int jsValue = impl->attrWithGetterException(exceptionState); | 86 int jsValue = impl->attrWithGetterException(exceptionState); |
84 if (UNLIKELY(exceptionState.throwIfNeeded())) | 87 if (UNLIKELY(exceptionState.throwIfNeeded())) |
85 return; | 88 return; |
86 v8SetReturnValueInt(info, jsValue); | 89 v8SetReturnValueInt(info, jsValue); |
87 } | 90 } |
88 | 91 |
89 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 92 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
90 { | 93 { |
91 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
92 TestTypedefsV8Internal::attrWithGetterExceptionAttributeGetter(info); | 95 TestTypedefsV8Internal::attrWithGetterExceptionAttributeGetter(info); |
93 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
94 } | 97 } |
95 | 98 |
96 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 99 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
97 { | 100 { |
98 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestTypedefs", info.Holder(), info.GetIsolate()); | 101 v8::Handle<v8::Object> holder = info.Holder(); |
99 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 102 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestTypedefs", holder, info.GetIsolate()); |
| 103 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
100 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 104 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
101 impl->setAttrWithGetterException(cppValue); | 105 impl->setAttrWithGetterException(cppValue); |
102 } | 106 } |
103 | 107 |
104 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 108 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
105 { | 109 { |
106 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
107 TestTypedefsV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info
); | 111 TestTypedefsV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info
); |
108 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
109 } | 113 } |
110 | 114 |
111 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 115 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
112 { | 116 { |
113 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 117 v8::Handle<v8::Object> holder = info.Holder(); |
| 118 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
114 v8SetReturnValueInt(info, impl->attrWithSetterException()); | 119 v8SetReturnValueInt(info, impl->attrWithSetterException()); |
115 } | 120 } |
116 | 121 |
117 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 122 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
118 { | 123 { |
119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
120 TestTypedefsV8Internal::attrWithSetterExceptionAttributeGetter(info); | 125 TestTypedefsV8Internal::attrWithSetterExceptionAttributeGetter(info); |
121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
122 } | 127 } |
123 | 128 |
124 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 129 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
125 { | 130 { |
126 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestTypedefs", info.Holder(), info.GetIsolate()); | 131 v8::Handle<v8::Object> holder = info.Holder(); |
127 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 132 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestTypedefs", holder, info.GetIsolate()); |
| 133 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
128 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 134 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
129 impl->setAttrWithSetterException(cppValue, exceptionState); | 135 impl->setAttrWithSetterException(cppValue, exceptionState); |
130 exceptionState.throwIfNeeded(); | 136 exceptionState.throwIfNeeded(); |
131 } | 137 } |
132 | 138 |
133 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 139 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
134 { | 140 { |
135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
136 TestTypedefsV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info
); | 142 TestTypedefsV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info
); |
137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
138 } | 144 } |
139 | 145 |
140 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 146 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
141 { | 147 { |
142 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 148 v8::Handle<v8::Object> holder = info.Holder(); |
143 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestTypedefs", info.Holder(), info.GetIsolate()); | 149 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
| 150 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestTypedefs", holder, info.GetIsolate()); |
144 String jsValue = impl->stringAttrWithGetterException(exceptionState); | 151 String jsValue = impl->stringAttrWithGetterException(exceptionState); |
145 if (UNLIKELY(exceptionState.throwIfNeeded())) | 152 if (UNLIKELY(exceptionState.throwIfNeeded())) |
146 return; | 153 return; |
147 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 154 v8SetReturnValueString(info, jsValue, info.GetIsolate()); |
148 } | 155 } |
149 | 156 |
150 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 157 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
151 { | 158 { |
152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
153 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); | 160 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); |
154 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
155 } | 162 } |
156 | 163 |
157 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 164 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
158 { | 165 { |
159 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 166 v8::Handle<v8::Object> holder = info.Holder(); |
| 167 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
160 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 168 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
161 impl->setStringAttrWithGetterException(cppValue); | 169 impl->setStringAttrWithGetterException(cppValue); |
162 } | 170 } |
163 | 171 |
164 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 172 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
165 { | 173 { |
166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
167 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue
, info); | 175 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue
, info); |
168 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
169 } | 177 } |
170 | 178 |
171 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 179 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
172 { | 180 { |
173 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 181 v8::Handle<v8::Object> holder = info.Holder(); |
| 182 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
174 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); | 183 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); |
175 } | 184 } |
176 | 185 |
177 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 186 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
178 { | 187 { |
179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
180 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); | 189 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); |
181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
182 } | 191 } |
183 | 192 |
184 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 193 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
185 { | 194 { |
186 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestTypedefs", info.Holder(), info.GetIsolate()); | 195 v8::Handle<v8::Object> holder = info.Holder(); |
187 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 196 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestTypedefs", holder, info.GetIsolate()); |
| 197 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
188 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
189 impl->setStringAttrWithSetterException(cppValue, exceptionState); | 199 impl->setStringAttrWithSetterException(cppValue, exceptionState); |
190 exceptionState.throwIfNeeded(); | 200 exceptionState.throwIfNeeded(); |
191 } | 201 } |
192 | 202 |
193 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 203 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
194 { | 204 { |
195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
196 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue
, info); | 206 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue
, info); |
197 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 fromInternalPointer(object)->deref(); | 529 fromInternalPointer(object)->deref(); |
520 } | 530 } |
521 | 531 |
522 template<> | 532 template<> |
523 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 533 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
524 { | 534 { |
525 return toV8(impl, creationContext, isolate); | 535 return toV8(impl, creationContext, isolate); |
526 } | 536 } |
527 | 537 |
528 } // namespace WebCore | 538 } // namespace WebCore |
OLD | NEW |