Skip to content

Commit

Permalink
deps: backport f782159 from v8's upstream
Browse files Browse the repository at this point in the history
Backport f78215962bf5de9d47c022e7baa3952d0bf6d17f from V8's upstream
to speed up promise introspection.

Original commit message:

  Remove obsolete try/catch from ObjectIsPromise().

  Review URL: https://codereview.chromium.org/1367123003

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

PR-URL: #3130
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
bnoordhuis authored and rvagg committed Oct 2, 2015
1 parent d8ab4e1 commit 925b29f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions deps/v8/src/mirror-debugger.js
Expand Up @@ -19,16 +19,9 @@ function ToggleMirrorCache(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, builtins.$promiseStatus));
} catch (e) {
return false;
}
return IS_SPEC_OBJECT(value) &&
!IS_UNDEFINED(%DebugGetProperty(value, builtins.$promiseStatus));
}


Expand Down

0 comments on commit 925b29f

Please sign in to comment.