| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index d8e85b9acd17daa822510870ddb8a9e7bdd298b4..2100480e85864356f1f6c04cfaee13736eede544 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -537,10 +537,17 @@ i::Object** v8::HandleScope::RawClose(i::Object** value) {
|
| LOG_API("CloseHandleScope");
|
|
|
| // Read the result before popping the handle block.
|
| - i::Object* result = *value;
|
| + i::Object* result = NULL;
|
| + if (value != NULL) {
|
| + result = *value;
|
| + }
|
| is_closed_ = true;
|
| i::HandleScope::Leave(&previous_);
|
|
|
| + if (value == NULL) {
|
| + return NULL;
|
| + }
|
| +
|
| // Allocate a new handle on the previous handle block.
|
| i::Handle<i::Object> handle(result);
|
| return handle.location();
|
|
|