Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: src/handles.cc

Issue 130933003: Various ApiCheck-related cleanups. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698