Skip to content

Instantly share code, notes, and snippets.

@spollack
Last active December 25, 2015 00:39
Show Gist options
  • Save spollack/6889181 to your computer and use it in GitHub Desktop.
Save spollack/6889181 to your computer and use it in GitHub Desktop.
example that demonstrates how streamline 0.8.1 in fibers mode is not preserving line numbers when invoking non-streamline functions, if the call spans multiple lines
/*** Generated by streamline 0.8.1 (fibers) - DO NOT EDIT ***/var fstreamline__ = require("streamline/lib/fibers/runtime"); (fstreamline__.create(function(_) {var test_ = fstreamline__.create(test, 0), foo_ = fstreamline__.create(foo, 0); function test(_) {
foo(_);
fstreamline__.invoke(null, bar, [_], 0);
};
function foo(_) {
// set a breakpoint on the next line
console.log('should not print before breakpoint hit');
console.log('should print after breakpoint hit');
}
var wrap = function(fn) { return fn; };
var bar = wrap(fstreamline__.create(function(_) {}, 0));
test(_);
}, 0).call(this, function(err) {
if (err) throw err;
}));
require('streamline').register({
fibers: true,
cache: true,
verbose: true
});
require('./streamline_line_nums_test._js');
function test(_) {
foo(_);
bar(
_);
};
function foo(_) {
// set a breakpoint on the next line
console.log('should not print before breakpoint hit');
console.log('should print after breakpoint hit');
}
var wrap = function(fn) { return fn; }
var bar = wrap(function(_) {});
test(_);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment