OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "lib/mirrors.h" | 9 #include "lib/mirrors.h" |
10 #include "vm/code_observers.h" | 10 #include "vm/code_observers.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 ASSERT(exception.IsInstance()); | 184 ASSERT(exception.IsInstance()); |
185 | 185 |
186 // Invoke script's callback function. | 186 // Invoke script's callback function. |
187 Object& function = Object::Handle(isolate_, ResolveCallbackFunction()); | 187 Object& function = Object::Handle(isolate_, ResolveCallbackFunction()); |
188 if (function.IsNull() || function.IsError()) { | 188 if (function.IsNull() || function.IsError()) { |
189 return false; | 189 return false; |
190 } | 190 } |
191 const Array& callback_args = Array::Handle(Array::New(1)); | 191 const Array& callback_args = Array::Handle(Array::New(1)); |
192 callback_args.SetAt(0, exception); | 192 callback_args.SetAt(0, exception); |
193 const Object& result = | 193 const Object& result = |
194 Object::Handle(DartEntry::InvokeStatic(Function::Cast(function), | 194 Object::Handle(DartEntry::InvokeFunction(Function::Cast(function), |
195 callback_args)); | 195 callback_args)); |
196 if (result.IsError()) { | 196 if (result.IsError()) { |
197 const Error& err = Error::Cast(result); | 197 const Error& err = Error::Cast(result); |
198 OS::PrintErr("failed calling unhandled exception callback: %s\n", | 198 OS::PrintErr("failed calling unhandled exception callback: %s\n", |
199 err.ToErrorCString()); | 199 err.ToErrorCString()); |
200 return false; | 200 return false; |
201 } | 201 } |
202 | 202 |
203 ASSERT(result.IsBool()); | 203 ASSERT(result.IsBool()); |
204 bool continue_from_exception = Bool::Cast(result).value(); | 204 bool continue_from_exception = Bool::Cast(result).value(); |
205 if (continue_from_exception) { | 205 if (continue_from_exception) { |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 | 621 |
622 | 622 |
623 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, | 623 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, |
624 bool visit_prologue_weak_handles) { | 624 bool visit_prologue_weak_handles) { |
625 if (api_state() != NULL) { | 625 if (api_state() != NULL) { |
626 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); | 626 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); |
627 } | 627 } |
628 } | 628 } |
629 | 629 |
630 } // namespace dart | 630 } // namespace dart |
OLD | NEW |