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

Side by Side Diff: runtime/vm/isolate.cc

Issue 12315087: Hook up simulator (if needed) when calling Dart code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698