| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index e99c6d9a98035d9b6abe7d26705c7ae1b02a280e..b7eb29489f845be536a9c4a7151b2e449a2fa046 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -2845,6 +2845,7 @@ class ReturnValue {
|
| // Fast JS primitive setters
|
| V8_INLINE(void SetNull());
|
| V8_INLINE(void SetUndefined());
|
| + V8_INLINE(void SetEmptyString());
|
| // Convenience getter for Isolate
|
| V8_INLINE(Isolate* GetIsolate());
|
|
|
| @@ -5730,6 +5731,12 @@ void ReturnValue<T>::SetUndefined() {
|
| }
|
|
|
| template<typename T>
|
| +void ReturnValue<T>::SetEmptyString() {
|
| + typedef internal::Internals I;
|
| + *value_ = *I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex);
|
| +}
|
| +
|
| +template<typename T>
|
| Isolate* ReturnValue<T>::GetIsolate() {
|
| // Isolate is always the pointer below the default value on the stack.
|
| return *reinterpret_cast<Isolate**>(&value_[-2]);
|
|
|