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

Unified Diff: src/isolate-inl.h

Issue 2378773013: [WASM] Implements catch for the wasm low level exception mechanism. (Closed)
Patch Set: updates effect dependencies. Created 4 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
Index: src/isolate-inl.h
diff --git a/src/isolate-inl.h b/src/isolate-inl.h
index ed246be75cd6cf54c3b86f0ded95b86cb73c48cf..34c98bba645a5a44253689b954abc9370b550209 100644
--- a/src/isolate-inl.h
+++ b/src/isolate-inl.h
@@ -76,6 +76,11 @@ bool Isolate::is_catchable_by_javascript(Object* exception) {
return exception != heap()->termination_exception();
}
+bool Isolate::is_catchable_by_wasm(Object* exception) {
+ return is_catchable_by_javascript(exception) &&
+ (exception->IsNumber() || exception->IsSmi());
+}
+
void Isolate::FireBeforeCallEnteredCallback() {
for (int i = 0; i < before_call_entered_callbacks_.length(); i++) {
before_call_entered_callbacks_.at(i)(reinterpret_cast<v8::Isolate*>(this));

Powered by Google App Engine
This is Rietveld 408576698