| 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 "V8TestSpecialOperationsAnonymous.h" | 8 #include "V8TestSpecialOperationsAnonymous.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 v8SetReturnValueString(info, result, info.GetIsolate()); | 51 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 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 TestSpecialOperationsAnonymousV8Internal::indexedPropertyGetter(index, info)
; | 57 TestSpecialOperationsAnonymousV8Internal::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 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); | 63 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); |
| 64 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, jsVa
lue); | 64 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, v8Va
lue); |
| 65 bool result = impl->anonymousIndexedSetter(index, propertyValue); | 65 bool result = impl->anonymousIndexedSetter(index, propertyValue); |
| 66 if (!result) | 66 if (!result) |
| 67 return; | 67 return; |
| 68 v8SetReturnValue(info, jsValue); | 68 v8SetReturnValue(info, v8Value); |
| 69 } | 69 } |
| 70 | 70 |
| 71 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 71 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 72 { | 72 { |
| 73 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 74 TestSpecialOperationsAnonymousV8Internal::indexedPropertySetter(index, jsVal
ue, info); | 74 TestSpecialOperationsAnonymousV8Internal::indexedPropertySetter(index, v8Val
ue, info); |
| 75 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 76 } | 76 } |
| 77 | 77 |
| 78 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Boolean>& info) | 78 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Boolean>& info) |
| 79 { | 79 { |
| 80 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); | 80 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); |
| 81 DeleteResult result = impl->anonymousIndexedDeleter(index); | 81 DeleteResult result = impl->anonymousIndexedDeleter(index); |
| 82 if (result != DeleteUnknownProperty) | 82 if (result != DeleteUnknownProperty) |
| 83 return v8SetReturnValueBool(info, result == DeleteSuccess); | 83 return v8SetReturnValueBool(info, result == DeleteSuccess); |
| 84 } | 84 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 105 v8SetReturnValueString(info, result, info.GetIsolate()); | 105 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 106 } | 106 } |
| 107 | 107 |
| 108 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 108 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 109 { | 109 { |
| 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 111 TestSpecialOperationsAnonymousV8Internal::namedPropertyGetter(name, info); | 111 TestSpecialOperationsAnonymousV8Internal::namedPropertyGetter(name, info); |
| 112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 113 } | 113 } |
| 114 | 114 |
| 115 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 115 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 116 { | 116 { |
| 117 if (info.Holder()->HasRealNamedProperty(name)) | 117 if (info.Holder()->HasRealNamedProperty(name)) |
| 118 return; | 118 return; |
| 119 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 119 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 120 return; | 120 return; |
| 121 | 121 |
| 122 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); | 122 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); |
| 123 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; | 123 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; |
| 124 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, jsVa
lue); | 124 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, v8Va
lue); |
| 125 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 125 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
| 126 if (!result) | 126 if (!result) |
| 127 return; | 127 return; |
| 128 v8SetReturnValue(info, jsValue); | 128 v8SetReturnValue(info, v8Value); |
| 129 } | 129 } |
| 130 | 130 |
| 131 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 131 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 132 { | 132 { |
| 133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 134 TestSpecialOperationsAnonymousV8Internal::namedPropertySetter(name, jsValue,
info); | 134 TestSpecialOperationsAnonymousV8Internal::namedPropertySetter(name, v8Value,
info); |
| 135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 136 } | 136 } |
| 137 | 137 |
| 138 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) | 138 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) |
| 139 { | 139 { |
| 140 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); | 140 TestSpecialOperationsAnonymous* impl = V8TestSpecialOperationsAnonymous::toN
ative(info.Holder()); |
| 141 AtomicString propertyName = toCoreAtomicString(name); | 141 AtomicString propertyName = toCoreAtomicString(name); |
| 142 v8::String::Utf8Value namedProperty(name); | 142 v8::String::Utf8Value namedProperty(name); |
| 143 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestSpecialOperationsAnonymous", info.Holder(), info.GetIsolate()); | 143 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestSpecialOperationsAnonymous", info.Holder(), info.GetIsolate()); |
| 144 bool result = impl->namedPropertyQuery(propertyName, exceptionState); | 144 bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 if (!result.IsEmpty()) | 222 if (!result.IsEmpty()) |
| 223 return result; | 223 return result; |
| 224 | 224 |
| 225 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 225 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 226 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 226 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
| 227 configureV8TestSpecialOperationsAnonymousTemplate(result, isolate); | 227 configureV8TestSpecialOperationsAnonymousTemplate(result, isolate); |
| 228 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 228 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
| 229 return result; | 229 return result; |
| 230 } | 230 } |
| 231 | 231 |
| 232 bool V8TestSpecialOperationsAnonymous::hasInstance(v8::Handle<v8::Value> jsValue
, v8::Isolate* isolate) | 232 bool V8TestSpecialOperationsAnonymous::hasInstance(v8::Handle<v8::Value> v8Value
, v8::Isolate* isolate) |
| 233 { | 233 { |
| 234 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 234 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 235 } | 235 } |
| 236 | 236 |
| 237 v8::Handle<v8::Object> V8TestSpecialOperationsAnonymous::findInstanceInPrototype
Chain(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) | 237 v8::Handle<v8::Object> V8TestSpecialOperationsAnonymous::findInstanceInPrototype
Chain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 238 { | 238 { |
| 239 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 239 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 240 } | 240 } |
| 241 | 241 |
| 242 TestSpecialOperationsAnonymous* V8TestSpecialOperationsAnonymous::toNativeWithTy
peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 242 TestSpecialOperationsAnonymous* V8TestSpecialOperationsAnonymous::toNativeWithTy
peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 243 { | 243 { |
| 244 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 244 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
| 245 } | 245 } |
| 246 | 246 |
| 247 v8::Handle<v8::Object> V8TestSpecialOperationsAnonymous::createWrapper(PassRefPt
r<TestSpecialOperationsAnonymous> impl, v8::Handle<v8::Object> creationContext,
v8::Isolate* isolate) | 247 v8::Handle<v8::Object> V8TestSpecialOperationsAnonymous::createWrapper(PassRefPt
r<TestSpecialOperationsAnonymous> impl, v8::Handle<v8::Object> creationContext,
v8::Isolate* isolate) |
| 248 { | 248 { |
| 249 ASSERT(impl); | 249 ASSERT(impl); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 269 fromInternalPointer(object)->deref(); | 269 fromInternalPointer(object)->deref(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 template<> | 272 template<> |
| 273 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsAnonymous* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) | 273 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsAnonymous* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) |
| 274 { | 274 { |
| 275 return toV8(impl, creationContext, isolate); | 275 return toV8(impl, creationContext, isolate); |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace WebCore | 278 } // namespace WebCore |
| OLD | NEW |