diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-02-26 19:29:45 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-26 13:29:45 -0500 |
commit | 5dfbbbb07a8f484dca27bbe0d7a3bafb0bdb91fd (patch) | |
tree | c4fc86d16e5747733e9d7a18652e791b9a255766 /libdeno/internal.h | |
parent | 8dee6ea454deb05e69bfaed39a230950c9100c37 (diff) |
Add import.meta.main (#1835)
Diffstat (limited to 'libdeno/internal.h')
-rw-r--r-- | libdeno/internal.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libdeno/internal.h b/libdeno/internal.h index a87ec0fdc..720966407 100644 --- a/libdeno/internal.h +++ b/libdeno/internal.h @@ -13,13 +13,14 @@ namespace deno { struct ModuleInfo { + bool main; std::string name; v8::Persistent<v8::Module> handle; std::vector<std::string> import_specifiers; - ModuleInfo(v8::Isolate* isolate, v8::Local<v8::Module> module, + ModuleInfo(v8::Isolate* isolate, v8::Local<v8::Module> module, bool main_, const char* name_, std::vector<std::string> import_specifiers_) - : name(name_), import_specifiers(import_specifiers_) { + : main(main_), name(name_), import_specifiers(import_specifiers_) { handle.Reset(isolate, module); } }; @@ -61,7 +62,7 @@ class DenoIsolate { void AddIsolate(v8::Isolate* isolate); - deno_mod RegisterModule(const char* name, const char* source); + deno_mod RegisterModule(bool main, const char* name, const char* source); v8::Local<v8::Object> GetBuiltinModules(); void ClearModules(); |