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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 { | 698 { |
699 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 699 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
700 return; | 700 return; |
701 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 701 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
702 return; | 702 return; |
703 if (info.Holder()->HasRealNamedProperty(name)) | 703 if (info.Holder()->HasRealNamedProperty(name)) |
704 return; | 704 return; |
705 | 705 |
706 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 706 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
707 TestInterface* collection = V8TestInterface::toNative(info.Holder()); | 707 TestInterface* collection = V8TestInterface::toNative(info.Holder()); |
708 AtomicString propertyName = toWebCoreAtomicString(name); | 708 AtomicString propertyName = toCoreAtomicString(name); |
709 bool element0Enabled = false; | 709 bool element0Enabled = false; |
710 RefPtr<Node> element0; | 710 RefPtr<Node> element0; |
711 bool element1Enabled = false; | 711 bool element1Enabled = false; |
712 RefPtr<NodeList> element1; | 712 RefPtr<NodeList> element1; |
713 collection->getItem(propertyName, element0Enabled, element0, element1Enabled
, element1); | 713 collection->getItem(propertyName, element0Enabled, element0, element1Enabled
, element1); |
714 if (element0Enabled) { | 714 if (element0Enabled) { |
715 v8SetReturnValueFast(info, element0.release(), collection); | 715 v8SetReturnValueFast(info, element0.release(), collection); |
716 return; | 716 return; |
717 } | 717 } |
718 | 718 |
(...skipping 29 matching lines...) Expand all Loading... |
748 return; | 748 return; |
749 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); | 749 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); |
750 for (size_t i = 0; i < names.size(); ++i) | 750 for (size_t i = 0; i < names.size(); ++i) |
751 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); | 751 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); |
752 v8SetReturnValue(info, v8names); | 752 v8SetReturnValue(info, v8names); |
753 } | 753 } |
754 | 754 |
755 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) | 755 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) |
756 { | 756 { |
757 TestInterface* collection = V8TestInterface::toNative(info.Holder()); | 757 TestInterface* collection = V8TestInterface::toNative(info.Holder()); |
758 AtomicString propertyName = toWebCoreAtomicString(name); | 758 AtomicString propertyName = toCoreAtomicString(name); |
759 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 759 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
760 bool result = collection->namedPropertyQuery(propertyName, exceptionState); | 760 bool result = collection->namedPropertyQuery(propertyName, exceptionState); |
761 if (exceptionState.throwIfNeeded()) | 761 if (exceptionState.throwIfNeeded()) |
762 return; | 762 return; |
763 if (!result) | 763 if (!result) |
764 return; | 764 return; |
765 v8SetReturnValueInt(info, v8::None); | 765 v8SetReturnValueInt(info, v8::None); |
766 } | 766 } |
767 | 767 |
768 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 768 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 } | 980 } |
981 | 981 |
982 template<> | 982 template<> |
983 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 983 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
984 { | 984 { |
985 return toV8(impl, creationContext, isolate); | 985 return toV8(impl, creationContext, isolate); |
986 } | 986 } |
987 | 987 |
988 } // namespace WebCore | 988 } // namespace WebCore |
989 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 989 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
OLD | NEW |