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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ISOLATE_INL_H_ 5 #ifndef V8_ISOLATE_INL_H_
6 #define V8_ISOLATE_INL_H_ 6 #define V8_ISOLATE_INL_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void Isolate::clear_scheduled_exception() { 69 void Isolate::clear_scheduled_exception() {
70 DCHECK(!thread_local_top_.scheduled_exception_->IsException(this)); 70 DCHECK(!thread_local_top_.scheduled_exception_->IsException(this));
71 thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); 71 thread_local_top_.scheduled_exception_ = heap_.the_hole_value();
72 } 72 }
73 73
74 74
75 bool Isolate::is_catchable_by_javascript(Object* exception) { 75 bool Isolate::is_catchable_by_javascript(Object* exception) {
76 return exception != heap()->termination_exception(); 76 return exception != heap()->termination_exception();
77 } 77 }
78 78
79 bool Isolate::is_catchable_by_wasm(Object* exception) {
80 return is_catchable_by_javascript(exception) &&
81 (exception->IsNumber() || exception->IsSmi());
82 }
83
79 void Isolate::FireBeforeCallEnteredCallback() { 84 void Isolate::FireBeforeCallEnteredCallback() {
80 for (int i = 0; i < before_call_entered_callbacks_.length(); i++) { 85 for (int i = 0; i < before_call_entered_callbacks_.length(); i++) {
81 before_call_entered_callbacks_.at(i)(reinterpret_cast<v8::Isolate*>(this)); 86 before_call_entered_callbacks_.at(i)(reinterpret_cast<v8::Isolate*>(this));
82 } 87 }
83 } 88 }
84 89
85 Handle<JSGlobalObject> Isolate::global_object() { 90 Handle<JSGlobalObject> Isolate::global_object() {
86 return handle(context()->global_object(), this); 91 return handle(context()->global_object(), this);
87 } 92 }
88 93
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 140
136 bool Isolate::IsStringLengthOverflowIntact() { 141 bool Isolate::IsStringLengthOverflowIntact() {
137 PropertyCell* has_instance_cell = heap()->string_length_protector(); 142 PropertyCell* has_instance_cell = heap()->string_length_protector();
138 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid); 143 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid);
139 } 144 }
140 145
141 } // namespace internal 146 } // namespace internal
142 } // namespace v8 147 } // namespace v8
143 148
144 #endif // V8_ISOLATE_INL_H_ 149 #endif // V8_ISOLATE_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698