| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The original goal was to comply the Uninit warning, but this is now a
futile effort as Uninit is no longer planned to be the default in Nim.
Setting `res' to its type's default value is therefore just a waste of
cycles when it's already zero-initialized.
|
|
|
|
|
|
|
| |
The old API was needlessly complex and suggested that it could only be
used for DOMException (which is not the case).
(Also optimized out code lookup from the DOMException constructor.)
|
|
|
|
|
|
|
|
|
| |
This time, I've also ported over the consistency check to prevent some
ownership bugs.
Unfortunately, the check is very limited, and it is still possible to
double-free or leak JSValues. I think it would be possible to make
coverage 100%, but only with ARC...
|
| |
|
|
|
|
|
|
|
| |
It's simpler and more efficient to handle this in the DOM.
(The interface was also confusing/broken in that it only really accepted
one htmldda class.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, nim_finalize_for_js only called a finalizer if the opaque
Nim object already had a corresponding JSValue. This was probably an
oversight (at least I had no idea this worked this way), so now we
always call the finalizer.
The upshot is that this means that finalizers can now receive a nil
runtime in this case, so finalizers not prepared for this might break.
The solution is to either explicitly nil-check the runtime, or to ensure
that such objects always get converted to a JSValue first.
|
|
git-subtree-dir: lib/monoucha0
git-subtree-mainline: b56abad0883c0b4179f9c329a7169bb544fac4a5
git-subtree-split: 33efaee783c2adb20df019a8bc924411c4a97e7f
|