| Index: extensions/renderer/module_system.h
|
| diff --git a/extensions/renderer/module_system.h b/extensions/renderer/module_system.h
|
| index 4ce545860f067f4553d45bcfa61c191f4a6da1c4..1797f9ce0d028c4d5ad18efbbe515aa416a8a338 100644
|
| --- a/extensions/renderer/module_system.h
|
| +++ b/extensions/renderer/module_system.h
|
| @@ -91,8 +91,11 @@ class ModuleSystem : public ObjectBackedNativeHandler,
|
|
|
| // Calls the specified method exported by the specified module. This is
|
| // equivalent to calling require('module_name').method_name() from JS.
|
| - v8::Local<v8::Value> CallModuleMethod(const std::string& module_name,
|
| - const std::string& method_name);
|
| + // DEPRECATED: see crbug.com/629431
|
| + // TODO(devlin): Remove these.
|
| + v8::Local<v8::Value> CallModuleMethod(
|
| + const std::string& module_name,
|
| + const std::string& method_name);
|
| v8::Local<v8::Value> CallModuleMethod(
|
| const std::string& module_name,
|
| const std::string& method_name,
|
| @@ -102,6 +105,17 @@ class ModuleSystem : public ObjectBackedNativeHandler,
|
| int argc,
|
| v8::Local<v8::Value> argv[]);
|
|
|
| + // Same as the above, but allows for blocking execution.
|
| + void CallModuleMethodSafe(const std::string& module_name,
|
| + const std::string& method_name);
|
| + void CallModuleMethodSafe(const std::string& module_name,
|
| + const std::string& method_name,
|
| + std::vector<v8::Local<v8::Value>>* args);
|
| + void CallModuleMethodSafe(const std::string& module_name,
|
| + const std::string& method_name,
|
| + int argc,
|
| + v8::Local<v8::Value> argv[]);
|
| +
|
| // Register |native_handler| as a potential target for requireNative(), so
|
| // calls to requireNative(|name|) from JS will return a new object created by
|
| // |native_handler|.
|
| @@ -218,6 +232,10 @@ class ModuleSystem : public ObjectBackedNativeHandler,
|
| // See |clobbered_native_handlers_|.
|
| void ClobberExistingNativeHandler(const std::string& name);
|
|
|
| + // Returns the v8::Function associated with the given module and method name.
|
| + v8::Local<v8::Function> GetModuleFunction(const std::string& module_name,
|
| + const std::string& method_name);
|
| +
|
| ScriptContext* context_;
|
|
|
| // A map from module names to the JS source for that module. GetSource()
|
|
|