Index: src/handles.cc |
diff --git a/src/handles.cc b/src/handles.cc |
index bc8d2d759d4a8b15ae8c76b0c27dc127b875ae04..b3282faffecbe3da69eff779c0f45b6b6e112ab6 100644 |
--- a/src/handles.cc |
+++ b/src/handles.cc |
@@ -63,9 +63,9 @@ Object** HandleScope::Extend(Isolate* isolate) { |
ASSERT(result == current->limit); |
// Make sure there's at least one scope on the stack and that the |
// top of the scope stack isn't a barrier. |
- if (current->level == 0) { |
- Utils::ReportApiFailure("v8::HandleScope::CreateHandle()", |
- "Cannot create a handle without a HandleScope"); |
+ if (!Utils::ApiCheck(current->level != 0, |
+ "v8::HandleScope::CreateHandle()", |
+ "Cannot create a handle without a HandleScope")) { |
return NULL; |
} |
HandleScopeImplementer* impl = isolate->handle_scope_implementer(); |