[Pkg-javascript-commits] [node-leveldown] 62/492: Node 0.9 copy() bug, needs further investigation

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit a34fb35416c077abaa9ef2ffd8dd5d7869ca3ae2
Author: Rod Vagg <rod at vagg.org>
Date:   Thu Nov 8 15:53:48 2012 +1100

    Node 0.9 copy() bug, needs further investigation
---
 lib/levelup.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/levelup.js b/lib/levelup.js
index 2630333..9a1a934 100644
--- a/lib/levelup.js
+++ b/lib/levelup.js
@@ -125,7 +125,8 @@ LevelUP.prototype = {
             this.emit('error', err)
           } else {
             this.emit('put', key, value)
-            callback && callback(null, key, value)
+            // Node 0.9 bug, do this in current tick and a copy() operation will core dump
+            callback && process.nextTick(callback.bind(null, null, key, value))
           }
         }.bind(this))
       } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list