Anna Henningsen

Results 213 comments of Anna Henningsen

@XadillaX In order to merge this, I think we should: - Remove the C++-backed atob and btoa implementations - Remove their benchmarks - Undo the stylistic changes that are happening...

> The C++-backed implementations is just fasten the function to resolve: Then let’s remove the TODO comment, or edit it to make clear that there’s not actually anything *to do*...

Ok, so basically the problem here is that, because the main script inside a Worker is started from within a `.on('message')` event handler, it ends up in the `EventTarget` error...

ping @jasnell @benjamingr any further thoughts? I’d lean towards option 2, if nobody has a strong opinion.

Relevant bits of the stack trace: ``` #0 0x0000000000000000 in ?? () #1 0x0000000000538d09 in std::condition_variable::notify_all() () #2 0x000000000043e67b in icu_64::umtx_initImplPostInit (uio=...) at ../deps/icu-small/source/common/umutex.cpp:151 ``` It looks like `initCondition()` calls...

Machine code of the stdlib method in question: ```asm 0000000000538d00 : 538d00: 48 83 ec 08 sub $0x8,%rsp 538d04: e8 f7 72 ac ff callq 0 538d09: 85 c0 test...

Tiny repro: ```sh $ cat test.cpp #include int main () { std::condition_variable a; a.notify_all(); } $ g++ -g -pthread -static -Wall -o test test.cpp && ./test Segmentation fault (core dumped)...

@bgnx I think `--enable-static` just means that it (also?) builds a static library from Node.js for embedding, in addition to the binary, but I think I might be wrong.

I’ve labelled this `feature request` because, while this is currently expected behaviour, I can see that it makes sense to provide some/most/all Node.js features for multiple contexts in some way....