Zoltan Herczeg

Results 201 comments of Zoltan Herczeg

I would like to know a bit more about "diagnose memory-usage problems" first.

My biggest worry is the gc part, a lot of unused arguments are added to functions, and these are not guarded conditionally. Basically we want to add extra functionality to...

I wouldn't trust the compiler too much. Just recently it turned out that: ``` while (a) { switch (b) { case X: goto exit case Y; do_something; case Z; do_something;...

From technical perspective, I would probably introduce a `struct` which contains the members required for the traverse, allocate on the stack locally when the api function is called, and add...

25% slowdown is pretty much. Could you share your code?

> From technical perspective, I would probably introduce a struct which contains the members required for the traverse, allocate on the stack locally when the api function is called, and...

There are many ways to pass any value to ES world. You can use it for any value, not just promises. Some examples: - Return the value from an external...

Don't forget JerryScript is not thread safe, so accessing the API from multiple threads at the same time will likely lead to crash. Your workflow should look like this: -...

Your approach is correct. The crash might be caused by reference counting (e.g. not calling `jerry_acquire_value` in your `get_promise` external function). The `jerry_resolve_or_reject_promise` rarely throws an error, so the value...

yes, `return jerry_acquire_value(test_promise)`returns with another reference to the promise. There might be other errors in the code though.