Reviewers: dcarney, Sven Panne,
Message:
dcarney@, ptal. I was under the impression that v8 is already
post-handlepocalyptic, but doesn't seem so. Maybe this was missed because
the
code is inside a template which was not instantiated by tests?
Description:
Fix ReturnValue::Set.
It was using Persistent::operator* which will be removed.
BUG=
Please review this at
https://codereview.chromium.org/15848010/
SVN Base:
https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M include/v8.h
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
5526705c84269523ab7eafd144ab26dd12aa594e..0c5e63e5691e828311e88cc37459aea16b3dad08
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5641,7 +5641,9 @@ void ReturnValue<T>::Set(const Persistent<S>& handle)
{
if (V8_UNLIKELY(handle.IsEmpty())) {
SetUndefined();
} else {
- *value_ = *reinterpret_cast<internal::Object**>(*handle);
+ const Handle<S>* handlePointer =
+ reinterpret_cast<const Handle<S>*>(&handle);
+ *value_ = *reinterpret_cast<internal::Object**>(**handlePointer);
}
}