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

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

Issue 8501034: Deal with unhandled exceptions the same way in all Dart api functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 8
9 #include "vm/assert.h" 9 #include "vm/assert.h"
10 #include "vm/bigint_store.h" 10 #include "vm/bigint_store.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 ASSERT(long_jump_base() != NULL); 236 ASSERT(long_jump_base() != NULL);
237 ASSERT(post_message_callback() == &StandardPostMessageCallback); 237 ASSERT(post_message_callback() == &StandardPostMessageCallback);
238 ASSERT(close_port_callback() == &StandardClosePortCallback); 238 ASSERT(close_port_callback() == &StandardClosePortCallback);
239 239
240 while (active_ports() > 0) { 240 while (active_ports() > 0) {
241 Zone zone; 241 Zone zone;
242 HandleScope handle_scope; 242 HandleScope handle_scope;
243 243
244 PortMessage* message = message_queue()->Dequeue(0); 244 PortMessage* message = message_queue()->Dequeue(0);
245 if (message != NULL) { 245 if (message != NULL) {
246 Dart_HandleMessage( 246 Dart_Handle result = Dart_HandleMessage(
247 message->dest_port(), message->reply_port(), message->data()); 247 message->dest_port(), message->reply_port(), message->data());
248 if (Dart_IsError(result)) {
249 fprintf(stderr, "%s\n", Dart_GetError(result));
250 exit(255);
251 }
248 delete message; 252 delete message;
249 } 253 }
250 } 254 }
251 } 255 }
252 256
253 257
254 void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor, 258 void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor,
255 bool validate_frames) { 259 bool validate_frames) {
256 ASSERT(visitor != NULL); 260 ASSERT(visitor != NULL);
257 261
(...skipping 22 matching lines...) Expand all
280 // Visit all objects in the code index table. 284 // Visit all objects in the code index table.
281 if (code_index_table() != NULL) { 285 if (code_index_table() != NULL) {
282 code_index_table()->VisitObjectPointers(visitor); 286 code_index_table()->VisitObjectPointers(visitor);
283 } 287 }
284 288
285 // Visit the top context which is stored in the isolate. 289 // Visit the top context which is stored in the isolate.
286 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); 290 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_));
287 } 291 }
288 292
289 } // namespace dart 293 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698