Revision: 15112
Author: [email protected]
Date: Thu Jun 13 03:39:44 2013
Log: another attempt at fixing 15107
[email protected]
BUG=
Review URL: https://codereview.chromium.org/16854009
http://code.google.com/p/v8/source/detail?r=15112
Modified:
/branches/bleeding_edge/src/api.h
/branches/bleeding_edge/test/cctest/test-api.cc
=======================================
--- /branches/bleeding_edge/src/api.h Thu Jun 13 02:27:09 2013
+++ /branches/bleeding_edge/src/api.h Thu Jun 13 03:39:44 2013
@@ -292,6 +292,11 @@
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);
+ }
};
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Thu Jun 13 03:13:09 2013
+++ /branches/bleeding_edge/test/cctest/test-api.cc Thu Jun 13 03:39:44 2013
@@ -5146,10 +5146,10 @@
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);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.