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

Unified Diff: src/bootstrapper.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/api.cc ('k') | src/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index f38472067d80730a5edff1c6f4fd92617ef04c99..800b5b4c642462e18d389238e6c1141b7f5c68f3 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2293,9 +2293,9 @@ bool Genesis::InstallExtension(Isolate* isolate,
current = current->next();
}
// Didn't find the extension; fail.
- if (current == NULL) {
- v8::Utils::ReportApiFailure(
- "v8::Context::New()", "Cannot find required extension");
+ if (!Utils::ApiCheck(current != NULL,
+ "v8::Context::New()",
+ "Cannot find required extension")) {
return false;
}
return InstallExtension(isolate, current, extension_states);
@@ -2310,9 +2310,9 @@ bool Genesis::InstallExtension(Isolate* isolate,
if (extension_states->get_state(current) == INSTALLED) return true;
// The current node has already been visited so there must be a
// cycle in the dependency graph; fail.
- if (extension_states->get_state(current) == VISITED) {
- v8::Utils::ReportApiFailure(
- "v8::Context::New()", "Circular extension dependency");
+ if (!Utils::ApiCheck(extension_states->get_state(current) != VISITED,
+ "v8::Context::New()",
+ "Circular extension dependency")) {
return false;
}
ASSERT(extension_states->get_state(current) == UNVISITED);
« no previous file with comments | « src/api.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698