| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index 72737aab37e2cc2fb8a8e8aca5d2730b1f06bdb8..b3dff3fee107a6e3992e925b488d8ba760723e50 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -2750,6 +2750,8 @@ class V8EXPORT ReturnValue {
|
| V8_INLINE(void SetNull(Isolate* isolate));
|
| V8_INLINE(void SetUndefined(Isolate* isolate));
|
| private:
|
| + V8_INLINE(void SetTrue(Isolate* isolate));
|
| + V8_INLINE(void SetFalse(Isolate* isolate));
|
| internal::Object** value_;
|
| };
|
|
|
| @@ -5680,9 +5682,23 @@ void ReturnValue<T>::Set(Isolate* isolate, uint32_t i) {
|
|
|
| template<typename T>
|
| void ReturnValue<T>::Set(Isolate* isolate, bool value) {
|
| + if (value) {
|
| + SetTrue(isolate);
|
| + } else {
|
| + SetFalse(isolate);
|
| + }
|
| +}
|
| +
|
| +template<typename T>
|
| +void ReturnValue<T>::SetTrue(Isolate* isolate) {
|
| + typedef internal::Internals I;
|
| + *value_ = *I::GetRoot(isolate, I::kTrueValueRootIndex);
|
| +}
|
| +
|
| +template<typename T>
|
| +void ReturnValue<T>::SetFalse(Isolate* isolate) {
|
| typedef internal::Internals I;
|
| - *value_ = *I::GetRoot(
|
| - isolate, value ? I::kTrueValueRootIndex : I::kFalseValueRootIndex);
|
| + *value_ = *I::GetRoot(isolate, I::kFalseValueRootIndex);
|
| }
|
|
|
| template<typename T>
|
|
|