Remove obsolete try/catch from ObjectIsPromise().
authorben <ben@strongloop.com>
Mon, 28 Sep 2015 08:44:31 +0000 (01:44 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 28 Sep 2015 08:44:46 +0000 (08:44 +0000)
Review URL: https://codereview.chromium.org/1367123003

Cr-Commit-Position: refs/heads/master@{#30966}

src/debug/mirrors.js

index e77f7a0..11f9e48 100644 (file)
@@ -107,16 +107,9 @@ function ClearMirrorCache(value) {
 }
 
 
-// Wrapper to check whether an object is a Promise.  The call may not work
-// if promises are not enabled.
-// TODO(yangguo): remove try-catch once promises are enabled by default.
 function ObjectIsPromise(value) {
-  try {
-    return IS_SPEC_OBJECT(value) &&
-           !IS_UNDEFINED(%DebugGetProperty(value, promiseStatusSymbol));
-  } catch (e) {
-    return false;
-  }
+  return IS_SPEC_OBJECT(value) &&
+         !IS_UNDEFINED(%DebugGetProperty(value, promiseStatusSymbol));
 }