mirror of
https://github.com/radareorg/quickjs.git
synced 2026-11-07 17:46:40 -10:00
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
5 lines
132 B
JavaScript
5 lines
132 B
JavaScript
import { assert } from "./assert.js"
|
|
const ref = new WeakRef({})
|
|
const val = ref.deref() // should not throw
|
|
assert(val, undefined)
|