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