mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
83fe8f1166
Set the object's opaque to a sentinel value instead of NULL, to stop JS_GetOpaque2 from raising an "illegal class" exception. Fixes: https://github.com/quickjs-ng/quickjs/issues/651
4 lines
132 B
JavaScript
4 lines
132 B
JavaScript
import { assert } from "./assert.js"
|
|
const ref = new WeakRef({})
|
|
const val = ref.deref() // should not throw
|
|
assert(val, undefined)
|