summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/module_system.h
diff options
context:
space:
mode:
authortfarina <tfarina@chromium.org>2015-04-29 10:03:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 17:04:18 +0000
commitf85316f2347d04f10ecc1bb8114aec6a9cd5c87a (patch)
treeacfb466ba16e2bd06acc2e08c49f7ab9368e1348 /extensions/renderer/module_system.h
parenta5bea75424e5db11fbcdb2a99b2ccd6d4868cf65 (diff)
downloadchromium_src-f85316f2347d04f10ecc1bb8114aec6a9cd5c87a.zip
chromium_src-f85316f2347d04f10ecc1bb8114aec6a9cd5c87a.tar.gz
chromium_src-f85316f2347d04f10ecc1bb8114aec6a9cd5c87a.tar.bz2
extensions/renderer: Use v8::Local instead of v8::Handle.
Turns out, Handle is just an alias for Local: https://chromium.googlesource.com/v8/v8.git/+/master/include/v8.h#334 BUG=424445 R=scheib@chromium.org Review URL: https://codereview.chromium.org/1115563002 Cr-Commit-Position: refs/heads/master@{#327515}
Diffstat (limited to 'extensions/renderer/module_system.h')
-rw-r--r--extensions/renderer/module_system.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/extensions/renderer/module_system.h b/extensions/renderer/module_system.h
index ad89524..82474b6 100644
--- a/extensions/renderer/module_system.h
+++ b/extensions/renderer/module_system.h
@@ -44,8 +44,8 @@ class ModuleSystem : public ObjectBackedNativeHandler,
class SourceMap {
public:
virtual ~SourceMap() {}
- virtual v8::Handle<v8::Value> GetSource(v8::Isolate* isolate,
- const std::string& name) = 0;
+ virtual v8::Local<v8::Value> GetSource(v8::Isolate* isolate,
+ const std::string& name) = 0;
virtual bool Contains(const std::string& name) = 0;
};
@@ -76,13 +76,13 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// Require the specified module. This is the equivalent of calling
// require('module_name') from the loaded JS files.
- v8::Handle<v8::Value> Require(const std::string& module_name);
+ v8::Local<v8::Value> 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
// traces.
- v8::Handle<v8::Value> RunString(v8::Handle<v8::String> code,
- v8::Handle<v8::String> name);
+ v8::Local<v8::Value> RunString(v8::Local<v8::String> code,
+ v8::Local<v8::String> name);
// Calls the specified method exported by the specified module. This is
// equivalent to calling require('module_name').method_name() from JS.
@@ -91,11 +91,11 @@ class ModuleSystem : public ObjectBackedNativeHandler,
v8::Local<v8::Value> CallModuleMethod(
const std::string& module_name,
const std::string& method_name,
- std::vector<v8::Handle<v8::Value> >* args);
+ std::vector<v8::Local<v8::Value>>* args);
v8::Local<v8::Value> CallModuleMethod(const std::string& module_name,
const std::string& method_name,
int argc,
- v8::Handle<v8::Value> argv[]);
+ 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
@@ -117,12 +117,12 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// TODO(kalman): All targets for this method are ObjectBackedNativeHandlers,
// move this logic into those classes (in fact, the chrome
// object is the only client, only that needs to implement it).
- void SetLazyField(v8::Handle<v8::Object> object,
+ void SetLazyField(v8::Local<v8::Object> object,
const std::string& field,
const std::string& module_name,
const std::string& module_field);
- void SetLazyField(v8::Handle<v8::Object> object,
+ void SetLazyField(v8::Local<v8::Object> object,
const std::string& field,
const std::string& module_name,
const std::string& module_field,
@@ -131,7 +131,7 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// Make |object|.|field| lazily evaluate to the result of
// requireNative(|module_name|)[|module_field|].
// TODO(kalman): Same as above.
- void SetNativeLazyField(v8::Handle<v8::Object> object,
+ void SetNativeLazyField(v8::Local<v8::Object> object,
const std::string& field,
const std::string& module_name,
const std::string& module_field);
@@ -162,9 +162,9 @@ class ModuleSystem : public ObjectBackedNativeHandler,
void HandleException(const v8::TryCatch& try_catch);
void RequireForJs(const v8::FunctionCallbackInfo<v8::Value>& args);
- v8::Local<v8::Value> RequireForJsInner(v8::Handle<v8::String> module_name);
+ v8::Local<v8::Value> RequireForJsInner(v8::Local<v8::String> module_name);
- typedef v8::Handle<v8::Value>(ModuleSystem::*RequireFunction)(
+ typedef v8::Local<v8::Value>(ModuleSystem::*RequireFunction)(
const std::string&);
// Base implementation of a LazyFieldGetter which uses |require_fn| to require
// modules.
@@ -175,12 +175,12 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// Return the named source file stored in the source map.
// |args[0]| - the name of a source file in source_map_.
- v8::Handle<v8::Value> GetSource(const std::string& module_name);
+ v8::Local<v8::Value> GetSource(const std::string& module_name);
// Return an object that contains the native methods defined by the named
// NativeHandler.
// |args[0]| - the name of a native handler object.
- v8::Handle<v8::Value> RequireNativeFromString(const std::string& native_name);
+ v8::Local<v8::Value> RequireNativeFromString(const std::string& native_name);
void RequireNative(const v8::FunctionCallbackInfo<v8::Value>& args);
// Return a promise for a requested module.
@@ -188,18 +188,18 @@ class ModuleSystem : public ObjectBackedNativeHandler,
void RequireAsync(const v8::FunctionCallbackInfo<v8::Value>& args);
// Wraps |source| in a (function(define, require, requireNative, ...) {...}).
- v8::Handle<v8::String> WrapSource(v8::Handle<v8::String> source);
+ v8::Local<v8::String> WrapSource(v8::Local<v8::String> source);
// NativeHandler implementation which returns the private area of an Object.
void Private(const v8::FunctionCallbackInfo<v8::Value>& args);
// Loads and runs a Javascript module.
- v8::Handle<v8::Value> LoadModule(const std::string& module_name);
+ v8::Local<v8::Value> LoadModule(const std::string& module_name);
// Invoked when a module is loaded in response to a requireAsync call.
// Resolves |resolver| with |value|.
void OnModuleLoaded(scoped_ptr<v8::Global<v8::Promise::Resolver>> resolver,
- v8::Handle<v8::Value> value);
+ v8::Local<v8::Value> value);
// gin::ModuleRegistryObserver overrides.
void OnDidAddPendingModule(