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

Unified Diff: src/wasm/wasm-module.cc

Issue 2135973002: Adding V8_WARN_UNUSED_RESULT for specified TODOs (Closed) Base URL: git@github.com:danbev/v8.git@master
Patch Set: Using CHECK for Maybe<bool> results Created 3 years, 9 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/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index c592cdafcc2240a23555f2db891e8d37e8830ddc..acc751b2c02d38812a10d72fd5547bef18fffa62 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -2683,8 +2683,9 @@ void RejectPromise(Isolate* isolate, ErrorThrower* thrower,
v8::Local<v8::Promise::Resolver> resolver =
v8::Utils::PromiseToLocal(promise).As<v8::Promise::Resolver>();
Handle<Context> context(isolate->context(), isolate);
- resolver->Reject(v8::Utils::ToLocal(context),
+ auto maybe = resolver->Reject(v8::Utils::ToLocal(context),
v8::Utils::ToLocal(thrower->Reify()));
+ CHECK(!maybe.IsNothing());
}
void ResolvePromise(Isolate* isolate, Handle<JSPromise> promise,
@@ -2692,7 +2693,9 @@ void ResolvePromise(Isolate* isolate, Handle<JSPromise> promise,
v8::Local<v8::Promise::Resolver> resolver =
v8::Utils::PromiseToLocal(promise).As<v8::Promise::Resolver>();
Handle<Context> context(isolate->context(), isolate);
- resolver->Resolve(v8::Utils::ToLocal(context), v8::Utils::ToLocal(result));
+ auto maybe = resolver->Resolve(v8::Utils::ToLocal(context),
+ v8::Utils::ToLocal(result));
+ CHECK(!maybe.IsNothing());
}
} // namespace
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698