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

Unified Diff: extensions/renderer/module_system.h

Issue 1167423002: Use V8 Maybe APIs in extensions/renderer (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/messaging_bindings.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 82474b6463c04a0d8874612f35ffeab3dfee2acb..7370f959ee481e9b9099e65561f2709bcd08094e 100644
--- a/extensions/renderer/module_system.h
+++ b/extensions/renderer/module_system.h
@@ -51,10 +51,12 @@ class ModuleSystem : public ObjectBackedNativeHandler,
class ExceptionHandler {
public:
+ ExceptionHandler(ScriptContext* context) : context_(context) {}
virtual ~ExceptionHandler() {}
virtual void HandleUncaughtException(const v8::TryCatch& try_catch) = 0;
protected:
+ ScriptContext* context_;
// Formats |try_catch| as a nice string.
std::string CreateExceptionString(const v8::TryCatch& try_catch);
};
@@ -126,7 +128,7 @@ class ModuleSystem : public ObjectBackedNativeHandler,
const std::string& field,
const std::string& module_name,
const std::string& module_field,
- v8::AccessorGetterCallback getter);
+ v8::AccessorNameGetterCallback getter);
// Make |object|.|field| lazily evaluate to the result of
// requireNative(|module_name|)[|module_field|].
@@ -150,12 +152,12 @@ class ModuleSystem : public ObjectBackedNativeHandler,
typedef std::map<std::string, linked_ptr<NativeHandler> > NativeHandlerMap;
// Retrieves the lazily defined field specified by |property|.
- static void LazyFieldGetter(v8::Local<v8::String> property,
+ static void LazyFieldGetter(v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info);
// Retrieves the lazily defined field specified by |property| on a native
// object.
static void NativeLazyFieldGetter(
- v8::Local<v8::String> property,
+ v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info);
// Called when an exception is thrown but not caught.
« no previous file with comments | « extensions/renderer/messaging_bindings.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698