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

Unified Diff: extensions/renderer/utils_native_handler.cc

Issue 1192763002: extensions: Use V8 Maybe APIs in NativeHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: extensions/renderer/utils_native_handler.cc
diff --git a/extensions/renderer/utils_native_handler.cc b/extensions/renderer/utils_native_handler.cc
index 209069cb942d3fd74b96a63c0351b3835d5087d7..42a525b1a91a4541e0e5f5bd139028e724500a2b 100644
--- a/extensions/renderer/utils_native_handler.cc
+++ b/extensions/renderer/utils_native_handler.cc
@@ -60,8 +60,9 @@ void UtilsNativeHandler::CreateClassWrapper(
}
// TODO(fsamuel): Move privates from ModuleSystem to a shared location.
- v8::Local<v8::Object> natives(context()->module_system()->NewInstance());
- CHECK(!natives.IsEmpty()); // this can happen if v8 has issues
+ v8::Local<v8::Object> natives;
+ if (!context()->module_system()->NewInstance().ToLocal(&natives))
+ NOTREACHED(); // this can happen if v8 has issues
v8::Local<v8::Function> func = func_as_value.As<v8::Function>();
v8::Local<v8::Value> func_args[] = {
context()->safe_builtins()->GetObjekt(),

Powered by Google App Engine
This is Rietveld 408576698