| 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 "V8TestSpecialOperationsInt.h" | 8 #include "V8TestSpecialOperationsInt.h" |
| 9 | 9 |
| 10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 v8SetReturnValueInt(info, result); | 51 v8SetReturnValueInt(info, result); |
| 52 } | 52 } |
| 53 | 53 |
| 54 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 54 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 55 { | 55 { |
| 56 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 56 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 57 TestSpecialOperationsIntV8Internal::indexedPropertyGetter(index, info); | 57 TestSpecialOperationsIntV8Internal::indexedPropertyGetter(index, info); |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 59 } | 59 } |
| 60 | 60 |
| 61 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) | 61 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 62 { | 62 { |
| 63 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); | 63 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); |
| 64 V8TRYCATCH_EXCEPTION_VOID(unsigned, propertyValue, toUInt32(jsValue, excepti
onState), exceptionState); | 64 V8TRYCATCH_EXCEPTION_VOID(unsigned, propertyValue, toUInt32(v8Value, excepti
onState), exceptionState); |
| 65 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "TestSpe
cialOperationsInt", info.Holder(), info.GetIsolate()); | 65 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "TestSpe
cialOperationsInt", info.Holder(), info.GetIsolate()); |
| 66 bool result = impl->anonymousIndexedSetter(index, propertyValue); | 66 bool result = impl->anonymousIndexedSetter(index, propertyValue); |
| 67 if (!result) | 67 if (!result) |
| 68 return; | 68 return; |
| 69 v8SetReturnValue(info, jsValue); | 69 v8SetReturnValue(info, v8Value); |
| 70 } | 70 } |
| 71 | 71 |
| 72 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 72 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 73 { | 73 { |
| 74 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 74 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 75 TestSpecialOperationsIntV8Internal::indexedPropertySetter(index, jsValue, in
fo); | 75 TestSpecialOperationsIntV8Internal::indexedPropertySetter(index, v8Value, in
fo); |
| 76 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 77 } | 77 } |
| 78 | 78 |
| 79 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 79 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 80 { | 80 { |
| 81 if (info.Holder()->HasRealNamedProperty(name)) | 81 if (info.Holder()->HasRealNamedProperty(name)) |
| 82 return; | 82 return; |
| 83 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 83 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); | 86 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); |
| 87 AtomicString propertyName = toCoreAtomicString(name); | 87 AtomicString propertyName = toCoreAtomicString(name); |
| 88 int result = impl->anonymousNamedGetter(propertyName); | 88 int result = impl->anonymousNamedGetter(propertyName); |
| 89 if () | 89 if () |
| 90 return; | 90 return; |
| 91 v8SetReturnValueInt(info, result); | 91 v8SetReturnValueInt(info, result); |
| 92 } | 92 } |
| 93 | 93 |
| 94 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 94 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 95 { | 95 { |
| 96 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 97 TestSpecialOperationsIntV8Internal::namedPropertyGetter(name, info); | 97 TestSpecialOperationsIntV8Internal::namedPropertyGetter(name, info); |
| 98 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 98 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 99 } | 99 } |
| 100 | 100 |
| 101 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 101 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 102 { | 102 { |
| 103 if (info.Holder()->HasRealNamedProperty(name)) | 103 if (info.Holder()->HasRealNamedProperty(name)) |
| 104 return; | 104 return; |
| 105 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 105 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 106 return; | 106 return; |
| 107 | 107 |
| 108 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); | 108 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); |
| 109 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; | 109 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; |
| 110 V8TRYCATCH_EXCEPTION_VOID(unsigned, propertyValue, toUInt32(jsValue, excepti
onState), exceptionState); | 110 V8TRYCATCH_EXCEPTION_VOID(unsigned, propertyValue, toUInt32(v8Value, excepti
onState), exceptionState); |
| 111 v8::String::Utf8Value namedProperty(name); | 111 v8::String::Utf8Value namedProperty(name); |
| 112 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty,
"TestSpecialOperationsInt", info.Holder(), info.GetIsolate()); | 112 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty,
"TestSpecialOperationsInt", info.Holder(), info.GetIsolate()); |
| 113 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 113 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
| 114 if (!result) | 114 if (!result) |
| 115 return; | 115 return; |
| 116 v8SetReturnValue(info, jsValue); | 116 v8SetReturnValue(info, v8Value); |
| 117 } | 117 } |
| 118 | 118 |
| 119 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 119 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 120 { | 120 { |
| 121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 122 TestSpecialOperationsIntV8Internal::namedPropertySetter(name, jsValue, info)
; | 122 TestSpecialOperationsIntV8Internal::namedPropertySetter(name, v8Value, info)
; |
| 123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) | 126 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) |
| 127 { | 127 { |
| 128 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); | 128 TestSpecialOperationsInt* impl = V8TestSpecialOperationsInt::toNative(info.H
older()); |
| 129 AtomicString propertyName = toCoreAtomicString(name); | 129 AtomicString propertyName = toCoreAtomicString(name); |
| 130 v8::String::Utf8Value namedProperty(name); | 130 v8::String::Utf8Value namedProperty(name); |
| 131 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestSpecialOperationsInt", info.Holder(), info.GetIsolate()); | 131 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestSpecialOperationsInt", info.Holder(), info.GetIsolate()); |
| 132 bool result = impl->namedPropertyQuery(propertyName, exceptionState); | 132 bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 if (!result.IsEmpty()) | 194 if (!result.IsEmpty()) |
| 195 return result; | 195 return result; |
| 196 | 196 |
| 197 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 197 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 198 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 198 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
| 199 configureV8TestSpecialOperationsIntTemplate(result, isolate); | 199 configureV8TestSpecialOperationsIntTemplate(result, isolate); |
| 200 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 200 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
| 201 return result; | 201 return result; |
| 202 } | 202 } |
| 203 | 203 |
| 204 bool V8TestSpecialOperationsInt::hasInstance(v8::Handle<v8::Value> jsValue, v8::
Isolate* isolate) | 204 bool V8TestSpecialOperationsInt::hasInstance(v8::Handle<v8::Value> v8Value, v8::
Isolate* isolate) |
| 205 { | 205 { |
| 206 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 206 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 207 } | 207 } |
| 208 | 208 |
| 209 v8::Handle<v8::Object> V8TestSpecialOperationsInt::findInstanceInPrototypeChain(
v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) | 209 v8::Handle<v8::Object> V8TestSpecialOperationsInt::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 210 { | 210 { |
| 211 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 211 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 212 } | 212 } |
| 213 | 213 |
| 214 TestSpecialOperationsInt* V8TestSpecialOperationsInt::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) | 214 TestSpecialOperationsInt* V8TestSpecialOperationsInt::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) |
| 215 { | 215 { |
| 216 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 216 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
| 217 } | 217 } |
| 218 | 218 |
| 219 v8::Handle<v8::Object> V8TestSpecialOperationsInt::createWrapper(PassRefPtr<Test
SpecialOperationsInt> impl, v8::Handle<v8::Object> creationContext, v8::Isolate*
isolate) | 219 v8::Handle<v8::Object> V8TestSpecialOperationsInt::createWrapper(PassRefPtr<Test
SpecialOperationsInt> impl, v8::Handle<v8::Object> creationContext, v8::Isolate*
isolate) |
| 220 { | 220 { |
| 221 ASSERT(impl); | 221 ASSERT(impl); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 241 fromInternalPointer(object)->deref(); | 241 fromInternalPointer(object)->deref(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 template<> | 244 template<> |
| 245 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsInt* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 245 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsInt* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
| 246 { | 246 { |
| 247 return toV8(impl, creationContext, isolate); | 247 return toV8(impl, creationContext, isolate); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace WebCore | 250 } // namespace WebCore |
| OLD | NEW |