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

Unified Diff: chrome/renderer/module_system.h

Issue 9812025: Implement lazy JS module initialisation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | chrome/renderer/module_system.cc » ('j') | chrome/renderer/module_system.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/module_system.h
diff --git a/chrome/renderer/module_system.h b/chrome/renderer/module_system.h
index 681a5320edae8d518387718cf2490094cb0deb5d..4a50938650894c068e835bf915288ef6c0127b15 100644
--- a/chrome/renderer/module_system.h
+++ b/chrome/renderer/module_system.h
@@ -65,11 +65,15 @@ class ModuleSystem : public NativeHandler {
natives_enabled_ = natives_enabled;
}
- // Create an object which delegates all property accesses to the object that
- // |source| evaluates to. The source is evaluated lazily on access to any of
- // the object's properties.
- static v8::Handle<v8::Object> CreateLazyObject(const std::string& source_name,
- v8::Handle<v8::String> source);
+ static v8::Handle<v8::Value> GetterRouter(v8::Local<v8::String> property,
not at google - send to devlin 2012/03/22 00:35:53 Documentation. Though does this need to be public
koz (OOO until 15th September) 2012/03/22 01:13:01 I've made it private, but it does need to be a mem
+ const v8::AccessorInfo& info);
+
+ // Make |object|.|field| lazily evaluate to the result of
+ // require(|module_name|)[|module_field|].
+ void SetLazyField(v8::Handle<v8::Object> object,
+ const std::string& field,
+ const std::string& module_name,
+ const std::string& module_field);
private:
typedef std::map<std::string, linked_ptr<NativeHandler> > NativeHandlerMap;
« no previous file with comments | « no previous file | chrome/renderer/module_system.cc » ('j') | chrome/renderer/module_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698