| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 5498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5509 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5509 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 5510 { | 5510 { |
| 5511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5512 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticMet
hod); | 5512 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticMet
hod); |
| 5513 TestObjV8Internal::deprecatedStaticMethodMethod(info); | 5513 TestObjV8Internal::deprecatedStaticMethodMethod(info); |
| 5514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5515 } | 5515 } |
| 5516 | 5516 |
| 5517 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 5517 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 5518 { | 5518 { |
| 5519 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | |
| 5520 TestObj* collection = V8TestObject::toNative(info.Holder()); | 5519 TestObj* collection = V8TestObject::toNative(info.Holder()); |
| 5521 RefPtr<Node> element = collection->item(index); | 5520 RefPtr<Node> element = collection->item(index); |
| 5522 if (!element) | 5521 if (!element) |
| 5523 return; | 5522 return; |
| 5524 v8SetReturnValueFast(info, element.release(), collection); | 5523 v8SetReturnValueFast(info, element.release(), collection); |
| 5525 } | 5524 } |
| 5526 | 5525 |
| 5527 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 5526 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 5528 { | 5527 { |
| 5529 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 5528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 5530 TestObjV8Internal::indexedPropertyGetter(index, info); | 5529 TestObjV8Internal::indexedPropertyGetter(index, info); |
| 5531 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5532 } | 5531 } |
| 5533 | 5532 |
| 5534 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 5533 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 5535 { | 5534 { |
| 5536 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 5535 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 5537 return; | 5536 return; |
| 5538 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 5537 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 5539 return; | 5538 return; |
| 5540 if (info.Holder()->HasRealNamedProperty(name)) | 5539 if (info.Holder()->HasRealNamedProperty(name)) |
| 5541 return; | 5540 return; |
| 5542 | 5541 |
| 5543 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | |
| 5544 TestObj* collection = V8TestObject::toNative(info.Holder()); | 5542 TestObj* collection = V8TestObject::toNative(info.Holder()); |
| 5545 AtomicString propertyName = toCoreAtomicString(name); | 5543 AtomicString propertyName = toCoreAtomicString(name); |
| 5546 String element = collection->namedItem(propertyName); | 5544 String element = collection->namedItem(propertyName); |
| 5547 if (element.isNull()) | 5545 if (element.isNull()) |
| 5548 return; | 5546 return; |
| 5549 v8SetReturnValueString(info, element, info.GetIsolate()); | 5547 v8SetReturnValueString(info, element, info.GetIsolate()); |
| 5550 } | 5548 } |
| 5551 | 5549 |
| 5552 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 5550 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 5553 { | 5551 { |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5919 fromInternalPointer(object)->deref(); | 5917 fromInternalPointer(object)->deref(); |
| 5920 } | 5918 } |
| 5921 | 5919 |
| 5922 template<> | 5920 template<> |
| 5923 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 5921 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
| 5924 { | 5922 { |
| 5925 return toV8(impl, creationContext, isolate); | 5923 return toV8(impl, creationContext, isolate); |
| 5926 } | 5924 } |
| 5927 | 5925 |
| 5928 } // namespace WebCore | 5926 } // namespace WebCore |
| OLD | NEW |