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

Unified Diff: gin/test/file.cc

Issue 1152653004: Re-land: gin: Use V8 Maybe APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « gin/shell_runner.cc ('k') | gin/try_catch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/test/file.cc
diff --git a/gin/test/file.cc b/gin/test/file.cc
index adcb3413bb68b064b81231cf3427dd644bebc3b1..38efbb434f915381884fc9643e267598e44e0ff7 100644
--- a/gin/test/file.cc
+++ b/gin/test/file.cc
@@ -59,8 +59,10 @@ v8::Local<v8::Value> GetFilesInDirectory(gin::Arguments* args) {
names.push_back(name.BaseName().AsUTF8Unsafe());
}
- return gin::Converter<std::vector<std::string> >::ToV8(args->isolate(),
- names);
+ v8::Local<v8::Value> v8_names;
+ if (!TryConvertToV8(args->isolate(), names, &v8_names))
+ return v8::Null(args->isolate());
+ return v8_names;
}
gin::WrapperInfo g_wrapper_info = { gin::kEmbedderNativeGin };
« no previous file with comments | « gin/shell_runner.cc ('k') | gin/try_catch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698