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

Unified Diff: extensions/renderer/module_system.h

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
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/module_system.h
diff --git a/extensions/renderer/module_system.h b/extensions/renderer/module_system.h
index 895aa563248544765c92d7a1bebf4fa5d0ffc4c2..b8d4104eedae48f6617a795cc85b9cb6fa8d9565 100644
--- a/extensions/renderer/module_system.h
+++ b/extensions/renderer/module_system.h
@@ -80,7 +80,7 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// Require the specified module. This is the equivalent of calling
// require('module_name') from the loaded JS files.
- v8::Local<v8::Value> Require(const std::string& module_name);
+ v8::MaybeLocal<v8::Object> Require(const std::string& module_name);
void Require(const v8::FunctionCallbackInfo<v8::Value>& args);
// Run |code| in the current context with the name |name| used for stack
@@ -168,7 +168,7 @@ class ModuleSystem : public ObjectBackedNativeHandler,
void RequireForJs(const v8::FunctionCallbackInfo<v8::Value>& args);
v8::Local<v8::Value> RequireForJsInner(v8::Local<v8::String> module_name);
- typedef v8::Local<v8::Value>(ModuleSystem::*RequireFunction)(
+ typedef v8::MaybeLocal<v8::Object>(ModuleSystem::*RequireFunction)(
const std::string&);
// Base implementation of a LazyFieldGetter which uses |require_fn| to require
// modules.
@@ -184,7 +184,8 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// Return an object that contains the native methods defined by the named
// NativeHandler.
// |args[0]| - the name of a native handler object.
- v8::Local<v8::Value> RequireNativeFromString(const std::string& native_name);
+ v8::MaybeLocal<v8::Object> RequireNativeFromString(
+ const std::string& native_name);
void RequireNative(const v8::FunctionCallbackInfo<v8::Value>& args);
// Return a promise for a requested module.
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698