Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test and fix AsyncWorker #30

Merged
merged 2 commits into from
May 4, 2017
Merged

Test and fix AsyncWorker #30

merged 2 commits into from
May 4, 2017

Commits on May 4, 2017

  1. Test and fix AsyncWorker

     - Remove MakeCallback overload that defaulted to undefined receiver,
       because node::MakeCallback requires an object.
     - Allow the AsyncWorker constructor to optionally specify a receiver
       object, that is persisted and used as of an async callback.
     - Persist async errors as strings, because an Error object cannot be
       created outside of a JS context.
     - Remove overridable AsyncWorker::WorkComplete() because it wasn't
       useful and caused confusion. OnOK() and/or OnError() should be
       (optionally) overridden instead.
     - Add tests to validate basic success and error scenarios for
       AsyncWorker.
     - Also add necessary cast to Object when calling Unwrap.
    jasongin committed May 4, 2017
    Configuration menu
    Copy the full SHA
    4236269 View commit details
    Browse the repository at this point in the history
  2. Rethrow async cb error as JS exception

    After nodejs/node#12838 is merged, the exception will be properly reported.
    jasongin committed May 4, 2017
    Configuration menu
    Copy the full SHA
    cb46bc5 View commit details
    Browse the repository at this point in the history