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

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

Issue 10693071: Use VM type cast and save handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/intermediate_language.cc ('k') | runtime/vm/native_entry.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (message->IsOOB()) { 102 if (message->IsOOB()) {
103 // For now the only OOB messages are Mirrors messages. 103 // For now the only OOB messages are Mirrors messages.
104 HandleMirrorsMessage(isolate_, message->reply_port(), msg); 104 HandleMirrorsMessage(isolate_, message->reply_port(), msg);
105 delete message; 105 delete message;
106 } else { 106 } else {
107 const Object& result = Object::Handle( 107 const Object& result = Object::Handle(
108 DartLibraryCalls::HandleMessage( 108 DartLibraryCalls::HandleMessage(
109 message->dest_port(), message->reply_port(), msg)); 109 message->dest_port(), message->reply_port(), msg));
110 delete message; 110 delete message;
111 if (result.IsError()) { 111 if (result.IsError()) {
112 Error& error = Error::Handle(); 112 isolate_->object_store()->set_sticky_error(Error::Cast(result));
113 error ^= result.raw();
114 isolate_->object_store()->set_sticky_error(error);
115 return false; 113 return false;
116 } 114 }
117 ASSERT(result.IsNull()); 115 ASSERT(result.IsNull());
118 } 116 }
119 return true; 117 return true;
120 } 118 }
121 119
122 120
123 #if defined(DEBUG) 121 #if defined(DEBUG)
124 void IsolateMessageHandler::CheckAccess() { 122 void IsolateMessageHandler::CheckAccess() {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 444
447 445
448 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, 446 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor,
449 bool visit_prologue_weak_handles) { 447 bool visit_prologue_weak_handles) {
450 if (api_state() != NULL) { 448 if (api_state() != NULL) {
451 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); 449 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles);
452 } 450 }
453 } 451 }
454 452
455 } // namespace dart 453 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698