TBR=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/
16854009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15112
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
v8::Persistent<T>* persistent) {
return OpenPersistent(*persistent);
}
+
+ template <class From, class To>
+ static inline v8::internal::Handle<To> OpenHandle(v8::Local<From> handle) {
+ return OpenHandle(*handle);
+ }
};
Local<Object> result =
Local<Object>::Cast(indexed_property_names_script->Run());
// Have to populate the handle manually, as it's not Cast-able.
- Local<v8::Array> array_result;
- Object** ptr = reinterpret_cast<Object**>(&array_result);
- *ptr = *reinterpret_cast<Object**>(&result);
- return array_result;
+ i::Handle<i::JSObject> o =
+ v8::Utils::OpenHandle<Object, i::JSObject>(result);
+ i::Handle<i::JSArray> array(reinterpret_cast<i::JSArray*>(*o));
+ return v8::Utils::ToLocal(array);
}