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

Unified Diff: chrome/renderer/module_system.h

Issue 10208001: Make functions being routed by NativeHandlers throw an exception if there is no ModuleSystem in the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments Created 8 years, 8 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') | no next file with comments »
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 1dc6065a9b472a107edaf021a3a4ba295bdd486d..c68137a073cfffb93b23a4445602f345e5ac1d6c 100644
--- a/chrome/renderer/module_system.h
+++ b/chrome/renderer/module_system.h
@@ -54,6 +54,9 @@ class ModuleSystem : public NativeHandler {
explicit 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();
+
// Require the specified module. This is the equivalent of calling
// require('module_name') from the loaded JS files.
void Require(const std::string& module_name);
« no previous file with comments | « no previous file | chrome/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698