diff options
author | Alex Kocharin <alex@kocharin.ru> | 2013-12-24 16:33:03 +0400 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-04-02 15:36:30 -0700 |
commit | 42a33c1bb869a8fd64525ae282a0ab1d859218a9 (patch) | |
tree | 5470deb03ac7294ab5fb899d3c9f69553293c9fb /lib/domain.js | |
parent | 006d42786e3123efb619210fb819b04f2b8b286f (diff) | |
download | android-node-v8-42a33c1bb869a8fd64525ae282a0ab1d859218a9.tar.gz android-node-v8-42a33c1bb869a8fd64525ae282a0ab1d859218a9.tar.bz2 android-node-v8-42a33c1bb869a8fd64525ae282a0ab1d859218a9.zip |
domain: don't crash on "throw null"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'lib/domain.js')
-rw-r--r-- | lib/domain.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/domain.js b/lib/domain.js index bbedcbafcf..f18cca6eba 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -85,8 +85,10 @@ Domain.prototype._errorHandler = function errorHandler(er) { if (this._disposed) return true; - er.domain = this; - er.domainThrown = true; + if (!util.isPrimitive(er)) { + er.domain = this; + er.domainThrown = true; + } // wrap this in a try/catch so we don't get infinite throwing try { // One of three things will happen here. |