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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); | 55 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); |
56 } | 56 } |
57 | 57 |
58 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) |
59 { | 59 { |
60 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 60 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
61 TestTypedefsV8Internal::unsignedLongLongAttrAttributeGetter(info); | 61 TestTypedefsV8Internal::unsignedLongLongAttrAttributeGetter(info); |
62 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 62 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
63 } | 63 } |
64 | 64 |
65 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 65 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
66 { | 66 { |
67 v8::Handle<v8::Object> holder = info.Holder(); | 67 v8::Handle<v8::Object> holder = info.Holder(); |
68 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestTypedefs", holder, info.GetIsolate()); | 68 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestTypedefs", holder, info.GetIsolate()); |
69 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 69 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
70 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); | 70 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, ex
ceptionState), exceptionState); |
71 impl->setUnsignedLongLongAttr(cppValue); | 71 impl->setUnsignedLongLongAttr(cppValue); |
72 } | 72 } |
73 | 73 |
74 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> v8Value, const v8::PropertyCallbackInfo<void>& info) |
75 { | 75 { |
76 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
77 TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); | 77 TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetter(v8Value, info); |
78 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
79 } | 79 } |
80 | 80 |
81 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 81 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
82 { | 82 { |
83 v8::Handle<v8::Object> holder = info.Holder(); | 83 v8::Handle<v8::Object> holder = info.Holder(); |
84 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 84 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
85 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestTypedefs", holder, info.GetIsolate()); | 85 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestTypedefs", holder, info.GetIsolate()); |
86 int jsValue = impl->attrWithGetterException(exceptionState); | 86 int v8Value = impl->attrWithGetterException(exceptionState); |
87 if (UNLIKELY(exceptionState.throwIfNeeded())) | 87 if (UNLIKELY(exceptionState.throwIfNeeded())) |
88 return; | 88 return; |
89 v8SetReturnValueInt(info, jsValue); | 89 v8SetReturnValueInt(info, v8Value); |
90 } | 90 } |
91 | 91 |
92 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) |
93 { | 93 { |
94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
95 TestTypedefsV8Internal::attrWithGetterExceptionAttributeGetter(info); | 95 TestTypedefsV8Internal::attrWithGetterExceptionAttributeGetter(info); |
96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
97 } | 97 } |
98 | 98 |
99 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 99 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
100 { | 100 { |
101 v8::Handle<v8::Object> holder = info.Holder(); | 101 v8::Handle<v8::Object> holder = info.Holder(); |
102 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestTypedefs", holder, info.GetIsolate()); | 102 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestTypedefs", holder, info.GetIsolate()); |
103 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 103 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
104 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 104 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
105 impl->setAttrWithGetterException(cppValue); | 105 impl->setAttrWithGetterException(cppValue); |
106 } | 106 } |
107 | 107 |
108 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> v8Value, const v8::PropertyCallbackInfo<void>& info) |
109 { | 109 { |
110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
111 TestTypedefsV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info
); | 111 TestTypedefsV8Internal::attrWithGetterExceptionAttributeSetter(v8Value, info
); |
112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
113 } | 113 } |
114 | 114 |
115 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 115 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
116 { | 116 { |
117 v8::Handle<v8::Object> holder = info.Holder(); | 117 v8::Handle<v8::Object> holder = info.Holder(); |
118 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 118 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
119 v8SetReturnValueInt(info, impl->attrWithSetterException()); | 119 v8SetReturnValueInt(info, impl->attrWithSetterException()); |
120 } | 120 } |
121 | 121 |
122 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) |
123 { | 123 { |
124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
125 TestTypedefsV8Internal::attrWithSetterExceptionAttributeGetter(info); | 125 TestTypedefsV8Internal::attrWithSetterExceptionAttributeGetter(info); |
126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
127 } | 127 } |
128 | 128 |
129 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 129 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
130 { | 130 { |
131 v8::Handle<v8::Object> holder = info.Holder(); | 131 v8::Handle<v8::Object> holder = info.Holder(); |
132 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestTypedefs", holder, info.GetIsolate()); | 132 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestTypedefs", holder, info.GetIsolate()); |
133 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 133 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
134 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 134 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
135 impl->setAttrWithSetterException(cppValue, exceptionState); | 135 impl->setAttrWithSetterException(cppValue, exceptionState); |
136 exceptionState.throwIfNeeded(); | 136 exceptionState.throwIfNeeded(); |
137 } | 137 } |
138 | 138 |
139 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> v8Value, const v8::PropertyCallbackInfo<void>& info) |
140 { | 140 { |
141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
142 TestTypedefsV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info
); | 142 TestTypedefsV8Internal::attrWithSetterExceptionAttributeSetter(v8Value, info
); |
143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
144 } | 144 } |
145 | 145 |
146 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 146 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
147 { | 147 { |
148 v8::Handle<v8::Object> holder = info.Holder(); | 148 v8::Handle<v8::Object> holder = info.Holder(); |
149 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 149 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
150 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestTypedefs", holder, info.GetIsolate()); | 150 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestTypedefs", holder, info.GetIsolate()); |
151 String jsValue = impl->stringAttrWithGetterException(exceptionState); | 151 String v8Value = impl->stringAttrWithGetterException(exceptionState); |
152 if (UNLIKELY(exceptionState.throwIfNeeded())) | 152 if (UNLIKELY(exceptionState.throwIfNeeded())) |
153 return; | 153 return; |
154 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 154 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
155 } | 155 } |
156 | 156 |
157 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) |
158 { | 158 { |
159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
160 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); | 160 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); |
161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
162 } | 162 } |
163 | 163 |
164 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 164 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
165 { | 165 { |
166 v8::Handle<v8::Object> holder = info.Holder(); | 166 v8::Handle<v8::Object> holder = info.Holder(); |
167 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 167 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
168 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 168 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
169 impl->setStringAttrWithGetterException(cppValue); | 169 impl->setStringAttrWithGetterException(cppValue); |
170 } | 170 } |
171 | 171 |
172 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> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
173 { | 173 { |
174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
175 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue
, info); | 175 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttributeSetter(v8Value
, info); |
176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
177 } | 177 } |
178 | 178 |
179 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 179 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
180 { | 180 { |
181 v8::Handle<v8::Object> holder = info.Holder(); | 181 v8::Handle<v8::Object> holder = info.Holder(); |
182 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 182 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
183 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); | 183 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); |
184 } | 184 } |
185 | 185 |
186 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) |
187 { | 187 { |
188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
189 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); | 189 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); |
190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
191 } | 191 } |
192 | 192 |
193 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 193 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
194 { | 194 { |
195 v8::Handle<v8::Object> holder = info.Holder(); | 195 v8::Handle<v8::Object> holder = info.Holder(); |
196 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestTypedefs", holder, info.GetIsolate()); | 196 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestTypedefs", holder, info.GetIsolate()); |
197 TestTypedefs* impl = V8TestTypedefs::toNative(holder); | 197 TestTypedefs* impl = V8TestTypedefs::toNative(holder); |
198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
199 impl->setStringAttrWithSetterException(cppValue, exceptionState); | 199 impl->setStringAttrWithSetterException(cppValue, exceptionState); |
200 exceptionState.throwIfNeeded(); | 200 exceptionState.throwIfNeeded(); |
201 } | 201 } |
202 | 202 |
203 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> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
204 { | 204 { |
205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
206 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue
, info); | 206 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttributeSetter(v8Value
, info); |
207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
208 } | 208 } |
209 | 209 |
210 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 210 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
211 { | 211 { |
212 v8::Handle<v8::Value> data = info.Data(); | 212 v8::Handle<v8::Value> data = info.Data(); |
213 ASSERT(data->IsExternal()); | 213 ASSERT(data->IsExternal()); |
214 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 214 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
215 if (!perContextData) | 215 if (!perContextData) |
216 return; | 216 return; |
217 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 217 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
218 } | 218 } |
219 | 219 |
220 static void TestTypedefsReplaceableAttributeSetter(v8::Local<v8::String> name, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 220 static void TestTypedefsReplaceableAttributeSetter(v8::Local<v8::String> name, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
221 { | 221 { |
222 info.This()->ForceSet(name, jsValue); | 222 info.This()->ForceSet(name, v8Value); |
223 } | 223 } |
224 | 224 |
225 static void TestTypedefsReplaceableAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 225 static void TestTypedefsReplaceableAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
226 { | 226 { |
227 TestTypedefsV8Internal::TestTypedefsReplaceableAttributeSetter(name, jsValue
, info); | 227 TestTypedefsV8Internal::TestTypedefsReplaceableAttributeSetter(name, v8Value
, info); |
228 } | 228 } |
229 | 229 |
230 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 230 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
231 { | 231 { |
232 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 232 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
233 if (UNLIKELY(info.Length() <= 0)) { | 233 if (UNLIKELY(info.Length() <= 0)) { |
234 impl->func(); | 234 impl->func(); |
235 return; | 235 return; |
236 } | 236 } |
237 V8TRYCATCH_VOID(Vector<int>, x, toNativeArray<int>(info[0], 1, info.GetIsola
te())); | 237 V8TRYCATCH_VOID(Vector<int>, x, toNativeArray<int>(info[0], 1, info.GetIsola
te())); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 if (!result.IsEmpty()) | 482 if (!result.IsEmpty()) |
483 return result; | 483 return result; |
484 | 484 |
485 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 485 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
486 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 486 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
487 configureV8TestTypedefsTemplate(result, isolate); | 487 configureV8TestTypedefsTemplate(result, isolate); |
488 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 488 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
489 return result; | 489 return result; |
490 } | 490 } |
491 | 491 |
492 bool V8TestTypedefs::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* iso
late) | 492 bool V8TestTypedefs::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* iso
late) |
493 { | 493 { |
494 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 494 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
495 } | 495 } |
496 | 496 |
497 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v
8::Value> jsValue, v8::Isolate* isolate) | 497 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v
8::Value> v8Value, v8::Isolate* isolate) |
498 { | 498 { |
499 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 499 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
500 } | 500 } |
501 | 501 |
502 TestTypedefs* V8TestTypedefs::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Ha
ndle<v8::Value> value) | 502 TestTypedefs* V8TestTypedefs::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Ha
ndle<v8::Value> value) |
503 { | 503 { |
504 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 504 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
505 } | 505 } |
506 | 506 |
507 v8::Handle<v8::Object> V8TestTypedefs::createWrapper(PassRefPtr<TestTypedefs> im
pl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 507 v8::Handle<v8::Object> V8TestTypedefs::createWrapper(PassRefPtr<TestTypedefs> im
pl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
508 { | 508 { |
509 ASSERT(impl); | 509 ASSERT(impl); |
(...skipping 19 matching lines...) Expand all Loading... |
529 fromInternalPointer(object)->deref(); | 529 fromInternalPointer(object)->deref(); |
530 } | 530 } |
531 | 531 |
532 template<> | 532 template<> |
533 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) |
534 { | 534 { |
535 return toV8(impl, creationContext, isolate); | 535 return toV8(impl, creationContext, isolate); |
536 } | 536 } |
537 | 537 |
538 } // namespace WebCore | 538 } // namespace WebCore |
OLD | NEW |