aboutsummaryrefslogtreecommitdiff
path: root/src/ltable.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ltable.js')
-rw-r--r--src/ltable.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ltable.js b/src/ltable.js
index b408cd1..df2d4f7 100644
--- a/src/ltable.js
+++ b/src/ltable.js
@@ -15,7 +15,9 @@ let lightuserdata_hashes = new WeakMap();
const get_lightuserdata_hash = function(v) {
let hash = lightuserdata_hashes.get(v);
if (!hash) {
- hash = Symbol("lightuserdata");
+ /* Hash should be something unique that is a valid WeakMap key
+ so that it ends up in dead_weak when removed from a table */
+ hash = {};
lightuserdata_hashes.set(v, hash);
}
return hash;