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

Unified Diff: src/objects-inl.h

Issue 2090333002: Use instance type in Object::IsErrorObject(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@RefactorToString
Patch Set: Refactor IsErrorObject() Created 4 years, 6 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index fdd83e75da830603e45a358f6e51f15782d1d049..dc84ea5f7aeea081b35ddb78b1dd57582908c357 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -680,6 +680,10 @@ bool HeapObject::IsJSObject() const {
bool HeapObject::IsJSProxy() const { return map()->IsJSProxyMap(); }
+bool HeapObject::IsJSError() const {
+ return map()->instance_type() == JS_ERROR_TYPE;
+}
+
TYPE_CHECKER(JSSet, JS_SET_TYPE)
TYPE_CHECKER(JSMap, JS_MAP_TYPE)
TYPE_CHECKER(JSSetIterator, JS_SET_ITERATOR_TYPE)
« src/objects.cc ('K') | « src/objects.cc ('k') | test/cctest/wasm/test-wasm-stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698