Index: Source/bindings/tests/results/V8TestObject.cpp |
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp |
index 604ac1076004b94dd463a262023cd03223fd5fd6..e299e6040e0eacc184f97ea465d68a40885605b5 100644 |
--- a/Source/bindings/tests/results/V8TestObject.cpp |
+++ b/Source/bindings/tests/results/V8TestObject.cpp |
@@ -28,6 +28,7 @@ |
#include "V8Document.h" |
#include "V8Float32Array.h" |
#include "V8Node.h" |
+#include "V8NodeList.h" |
#include "V8SVGDocument.h" |
#include "V8SVGPoint.h" |
#include "V8ScriptProfile.h" |
@@ -2553,7 +2554,7 @@ static v8::Handle<v8::Value> namedItemMethod(const v8::Arguments& args) |
return throwNotEnoughArgumentsError(args.GetIsolate()); |
TestObj* imp = V8TestObject::toNative(args.Holder()); |
V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, args[0]); |
- return v8String(imp->namedItem(name), args.GetIsolate(), ReturnUnsafeHandle); |
+ return toV8(imp->namedItem(name), args.Holder(), args.GetIsolate()); |
} |
static v8::Handle<v8::Value> namedItemMethodCallback(const v8::Arguments& args) |
@@ -4301,10 +4302,17 @@ v8::Handle<v8::Value> V8TestObject::indexedPropertyGetter(uint32_t index, const |
{ |
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
TestObj* collection = toNative(info.Holder()); |
- RefPtr<Node> element = collection->item(index); |
- if (!element) |
+ WTF::UnionType2<NodeList, Node> element = collection->item(index); |
+ if (element.isNull()) |
return v8Undefined(); |
- return toV8Fast(element.release(), info, collection); |
+ |
+ v8::Handle<v8::Value> jsValue; |
+ if (element.isValue0Enabled()) |
+ jsValue = toV8Fast(element.getValue0(), info, collection); |
+ if (element.isValue1Enabled()) |
+ jsValue = toV8Fast(element.getValue1(), info, collection); |
+ |
+ return jsValue; |
} |
v8::Handle<v8::Value> V8TestObject::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) |
@@ -4317,10 +4325,13 @@ v8::Handle<v8::Value> V8TestObject::namedPropertyGetter(v8::Local<v8::String> na |
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
TestObj* collection = toNative(info.Holder()); |
AtomicString propertyName = toWebCoreAtomicString(name); |
- String element = collection->namedItem(propertyName); |
- if (element.isNull()) |
+ RefPtr<Node> element = collection->namedItem(propertyName); |
+ if (!element) |
return v8Undefined(); |
- return v8String(element, info.GetIsolate()); |
+ |
+ v8::Handle<v8::Value> jsValue; |
+ jsValue = toV8Fast(element.release(), info, collection); |
+ return jsValue; |
} |
static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType) |