| 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 "V8TestInterfaceWillBeGarbageCollected.h" | 8 #include "V8TestInterfaceWillBeGarbageCollected.h" |
| 9 | 9 |
| 10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); | 50 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); |
| 51 } | 51 } |
| 52 | 52 |
| 53 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 53 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 54 { | 54 { |
| 55 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 55 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 56 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); | 56 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); |
| 57 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 57 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 static void attr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Propert
yCallbackInfo<void>& info) | 60 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) |
| 61 { | 61 { |
| 62 v8::Handle<v8::Object> holder = info.Holder(); | 62 v8::Handle<v8::Object> holder = info.Holder(); |
| 63 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(holder); | 63 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(holder); |
| 64 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf
aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), jsValue)); | 64 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf
aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); |
| 65 impl->setAttr1(WTF::getPtr(cppValue)); | 65 impl->setAttr1(WTF::getPtr(cppValue)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 69 { | 69 { |
| 70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 71 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(jsValue,
info); | 71 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
| 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 75 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 76 { | 76 { |
| 77 if (UNLIKELY(info.Length() < 1)) { | 77 if (UNLIKELY(info.Length() < 1)) { |
| 78 throwTypeError(ExceptionMessages::failedToExecute("func", "TestInterface
WillBeGarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())
), info.GetIsolate()); | 78 throwTypeError(ExceptionMessages::failedToExecute("func", "TestInterface
WillBeGarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())
), info.GetIsolate()); |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(info.Holder()); | 81 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toNative(info.Holder()); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 if (!result.IsEmpty()) | 157 if (!result.IsEmpty()) |
| 158 return result; | 158 return result; |
| 159 | 159 |
| 160 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 160 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 161 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 161 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
| 162 configureV8TestInterfaceWillBeGarbageCollectedTemplate(result, isolate); | 162 configureV8TestInterfaceWillBeGarbageCollectedTemplate(result, isolate); |
| 163 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 163 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
| 164 return result; | 164 return result; |
| 165 } | 165 } |
| 166 | 166 |
| 167 bool V8TestInterfaceWillBeGarbageCollected::hasInstance(v8::Handle<v8::Value> js
Value, v8::Isolate* isolate) | 167 bool V8TestInterfaceWillBeGarbageCollected::hasInstance(v8::Handle<v8::Value> v8
Value, v8::Isolate* isolate) |
| 168 { | 168 { |
| 169 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 169 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 170 } | 170 } |
| 171 | 171 |
| 172 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::findInstanceInProt
otypeChain(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) | 172 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::findInstanceInProt
otypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 173 { | 173 { |
| 174 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 174 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 175 } | 175 } |
| 176 | 176 |
| 177 TestInterfaceWillBeGarbageCollected* V8TestInterfaceWillBeGarbageCollected::toNa
tiveWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 177 TestInterfaceWillBeGarbageCollected* V8TestInterfaceWillBeGarbageCollected::toNa
tiveWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 178 { | 178 { |
| 179 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 179 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
| 180 } | 180 } |
| 181 | 181 |
| 182 EventTarget* V8TestInterfaceWillBeGarbageCollected::toEventTarget(v8::Handle<v8:
:Object> object) | 182 EventTarget* V8TestInterfaceWillBeGarbageCollected::toEventTarget(v8::Handle<v8:
:Object> object) |
| 183 { | 183 { |
| 184 return toNative(object); | 184 return toNative(object); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 211 #endif // !ENABLE(OILPAN) | 211 #endif // !ENABLE(OILPAN) |
| 212 } | 212 } |
| 213 | 213 |
| 214 template<> | 214 template<> |
| 215 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 215 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 216 { | 216 { |
| 217 return toV8(impl, creationContext, isolate); | 217 return toV8(impl, creationContext, isolate); |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace WebCore | 220 } // namespace WebCore |
| OLD | NEW |