Chromium Code Reviews| Index: chrome/renderer/extensions/module_system.h |
| diff --git a/chrome/renderer/extensions/module_system.h b/chrome/renderer/extensions/module_system.h |
| index 2521d678b13579c81d591711ac2211c75cb9e89c..df9de108ffdc02640e641f7a45590c0490cf6fb7 100644 |
| --- a/chrome/renderer/extensions/module_system.h |
| +++ b/chrome/renderer/extensions/module_system.h |
| @@ -64,9 +64,6 @@ class ModuleSystem : public ObjectBackedNativeHandler { |
| ModuleSystem(v8::Handle<v8::Context> context, SourceMap* source_map); |
| virtual ~ModuleSystem(); |
| - // Returns true if the current context has a ModuleSystem installed in it. |
| - static bool IsPresentInCurrentContext(); |
| - |
| // Dumps the debug info from |try_catch| to LOG(ERROR). |
| static void DumpException(const v8::TryCatch& try_catch); |
| @@ -130,7 +127,9 @@ class ModuleSystem : public ObjectBackedNativeHandler { |
| exception_handler_ = handler.Pass(); |
| } |
| - virtual bool Invalidate() OVERRIDE; |
| + protected: |
| + friend class ChromeV8Context; |
| + virtual void Invalidate() OVERRIDE; |
| private: |
| typedef std::map<std::string, linked_ptr<NativeHandler> > NativeHandlerMap; |
| @@ -158,14 +157,14 @@ class ModuleSystem : public ObjectBackedNativeHandler { |
| const std::string& module_field, |
| v8::AccessorGetter getter); |
| - typedef v8::Handle<v8::Value> (ModuleSystem::*GetModuleFunc)( |
| + typedef v8::Handle<v8::Value> (ModuleSystem::*RequireFn)( |
|
Matt Perry
2013/03/05 21:51:38
don't abbrev. RequireFunction
not at google - send to devlin
2013/03/05 22:05:38
Done.
|
| const std::string&); |
| - // Base implementation of a LazyFieldGetter that can be customized by passing |
| - // in a |get_module| function. |
| + // Base implementation of a LazyFieldGetter which uses |require_fn| to require |
| + // modules. |
| static v8::Handle<v8::Value> LazyFieldGetterInner( |
| v8::Local<v8::String> property, |
| const v8::AccessorInfo& info, |
| - GetModuleFunc get_module); |
| + RequireFn require_fn); |
| // Return the named source file stored in the source map. |
| // |args[0]| - the name of a source file in source_map_. |
| @@ -194,9 +193,6 @@ class ModuleSystem : public ObjectBackedNativeHandler { |
| // pinned natives as enabled. |
| int natives_enabled_; |
| - // Set to false if |context_| has been deleted and this should not be used. |
| - bool is_valid_; |
| - |
| // Called when an exception is thrown but not caught in JS. |
| scoped_ptr<ExceptionHandler> exception_handler_; |