summaryrefslogtreecommitdiff
path: root/libdeno/internal.h
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2019-01-07 18:18:32 -0800
committerRyan Dahl <ry@tinyclouds.org>2019-01-07 21:18:32 -0500
commit2558d6e184b92a2e8c642b60f5c2e4511d92b08b (patch)
tree02174b50980cd39b8ada8d45983447ae2fbaa0e5 /libdeno/internal.h
parent404e6f86345216c9205cabb88b19eaca762095e0 (diff)
Use multimap with Persistent module handle to avoid IdentityHash collision (#1466)
Diffstat (limited to 'libdeno/internal.h')
-rw-r--r--libdeno/internal.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdeno/internal.h b/libdeno/internal.h
index 454b3e2e4..ee783d998 100644
--- a/libdeno/internal.h
+++ b/libdeno/internal.h
@@ -58,8 +58,9 @@ class DenoIsolate {
int32_t next_req_id_;
void* user_data_;
- // identity hash -> filename
- std::map<int, std::string> module_filename_map_;
+ // identity hash -> filename, module (avoid hash collision)
+ std::multimap<int, std::pair<std::string, v8::Persistent<v8::Module>>>
+ module_info_map_;
// filename -> Module
std::map<std::string, v8::Persistent<v8::Module>> module_map_;
// Set by deno_resolve_ok