async-listener
Advanced tools
Comparing version 0.2.0 to 0.2.1
var wrap = require('shimmer').wrap; | ||
var listeners = []; | ||
// this only works because throwing is synchronous. It's not a good idea. | ||
var _curData; | ||
@@ -11,4 +13,4 @@ if (process._fatalException) { | ||
var callbacks = listeners[i].callbacks; | ||
// FIXME: find the actual domain element | ||
var domain = {}; | ||
if (_curData && _curData[i]) domain = _curData[i]; | ||
if (callbacks.error && callbacks.error(domain, er)) { | ||
@@ -29,4 +31,4 @@ process._needTickCallback(); | ||
var callbacks = listeners[i].callbacks; | ||
// FIXME: find the actual domain element | ||
var domain = {}; | ||
if (_curData && _curData[i]) domain = _curData[i]; | ||
if (callbacks.error && callbacks.error(domain, er)) { | ||
@@ -60,2 +62,3 @@ process._needTickCallback(); | ||
// save returned to pass to `after` | ||
_curData = data; | ||
returned = original.apply(this, arguments); | ||
@@ -62,0 +65,0 @@ return returned; |
{ | ||
"name": "async-listener", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Polyfill exporting trevnorris's 0.11+ asyncListener API.", | ||
@@ -5,0 +5,0 @@ "author": "Forrest L Norvell <ogd@aoaioxxysz.net>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32094
980