Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 4d99d151522b98b22d8d10fc2ec5e2f0b77e7798..ceb57c0abd3cafc1d228da2d8efbd72ee324d02f 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2458,6 +2458,9 @@ class ReturnValue { |
// Convenience getter for Isolate |
V8_INLINE Isolate* GetIsolate(); |
+ // Pointer setter: Uncompilable to prevent inadvertent misuse. |
+ void Set(void* whatever); |
+ |
private: |
template<class F> friend class ReturnValue; |
template<class F> friend class FunctionCallbackInfo; |
@@ -5981,6 +5984,12 @@ Isolate* ReturnValue<T>::GetIsolate() { |
} |
template<typename T> |
+void ReturnValue<T>::Set(void* whatever) { |
+ // Uncompilable to prevent inadvertent misuse. |
+ TYPE_CHECK(void*, Primitive); |
+} |
+ |
+template<typename T> |
internal::Object* ReturnValue<T>::GetDefaultValue() { |
// Default value is always the pointer below value_ on the stack. |
return value_[-1]; |