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

Unified Diff: gin/arguments.h

Issue 1106393002: gin: Use V8 Maybe APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maybe-gin-converter
Patch Set: Created 5 years, 7 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 | « no previous file | gin/converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/arguments.h
diff --git a/gin/arguments.h b/gin/arguments.h
index 4ac38a7ef8f95fab785a2b80d62cde5210bfc21a..1affa2c8acb1251a67f013f8f503679472b0fa22 100644
--- a/gin/arguments.h
+++ b/gin/arguments.h
@@ -69,7 +69,10 @@ class GIN_EXPORT Arguments {
template<typename T>
void Return(T val) {
- info_->GetReturnValue().Set(ConvertToV8(isolate_, val));
+ v8::Local<v8::Value> v8_value;
+ if (!TryConvertToV8(isolate_, val, &v8_value))
+ return;
+ info_->GetReturnValue().Set(v8_value);
}
v8::Local<v8::Value> PeekNext() const;
« no previous file with comments | « no previous file | gin/converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698