bloomberg / blpapi-node

Bloomberg Open API module for node.js
http://www.bloomberglabs.com/api/about/
Other
246 stars 50 forks source link

call emit with this bind to the session object itself #51

Closed ericlu88 closed 9 years ago

ericlu88 commented 9 years ago

This PR changes this to bind to session object when we call emit from C++ to JS land.

As part of the re-factoring JS code we found that the emit function was called in JS land with this bind to the global context. This does not work well with node EventEmitter implementation unless you bind this back to the session object explicitly(use .bind() or closure).

ericvw commented 9 years ago

lgtm. @apaprocki for final approval.