Reviewers: Sven Panne,
Message:
Committed patchset #1 manually as r15112 (presubmit successful).
Description:
another attempt at fixing 15107
[email protected]
BUG=
Committed: https://code.google.com/p/v8/source/detail?r=15112
Please review this at https://codereview.chromium.org/16854009/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/api.h
M test/cctest/test-api.cc
Index: src/api.h
diff --git a/src/api.h b/src/api.h
index
e64e960ecff9e72db8d19118717e2cd6fbe98d01..3d1c69cb18662069fb385a2fdd7e02ba6fa26b7e
100644
--- a/src/api.h
+++ b/src/api.h
@@ -292,6 +292,11 @@ OPEN_HANDLE_LIST(DECLARE_OPEN_HANDLE)
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);
+ }
};
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
ca42909808bb0c5183c9fa4a47c24e5f8afc3f88..5d38c211884ccbf82f00d085835caa01dca3e156
100755
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5146,10 +5146,10 @@ Handle<v8::Array>
NonStrictArgsIndexedPropertyEnumerator(
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.