Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: src/debug/mirrors.js

Issue 1367123003: Remove obsolete try/catch from ObjectIsPromise(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/mirrors.js
diff --git a/src/debug/mirrors.js b/src/debug/mirrors.js
index e77f7a0f2ba7053944c7a13649ee41ac4bdf8c27..11f9e485c13be252986a228826de69c9ea83bf5c 100644
--- a/src/debug/mirrors.js
+++ b/src/debug/mirrors.js
@@ -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));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698