| 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..9f3d602600fba167384da20ccbf8a49e1a6e86d1 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::*RequireFunction)(
|
| 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);
|
| + RequireFunction require_function);
|
|
|
| // 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_;
|
|
|
|
|