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

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

Issue 113513004: Handle vmservice messages while at breakpoint. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/include/dart_debugger_api.h ('k') | runtime/vm/debugger.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) 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 if (!isolate->message_handler()->HandleNextMessage()) { 1026 if (!isolate->message_handler()->HandleNextMessage()) {
1027 Dart_Handle error = Api::NewHandle(isolate, 1027 Dart_Handle error = Api::NewHandle(isolate,
1028 isolate->object_store()->sticky_error()); 1028 isolate->object_store()->sticky_error());
1029 isolate->object_store()->clear_sticky_error(); 1029 isolate->object_store()->clear_sticky_error();
1030 return error; 1030 return error;
1031 } 1031 }
1032 return Api::Success(); 1032 return Api::Success();
1033 } 1033 }
1034 1034
1035 1035
1036 DART_EXPORT bool Dart_HandleServiceMessages() {
1037 Isolate* isolate = Isolate::Current();
1038 CHECK_ISOLATE_SCOPE(isolate);
1039 CHECK_CALLBACK_STATE(isolate);
1040 isolate->message_handler()->HandleOOBMessages();
1041 // TODO(turnidge): The return value here should indicate whether an
1042 // OOB message should cause the program to resume. Implement.
1043 return false;
1044 }
1045
1046
1036 DART_EXPORT bool Dart_HasLivePorts() { 1047 DART_EXPORT bool Dart_HasLivePorts() {
1037 Isolate* isolate = Isolate::Current(); 1048 Isolate* isolate = Isolate::Current();
1038 ASSERT(isolate); 1049 ASSERT(isolate);
1039 return isolate->message_handler()->HasLivePorts(); 1050 return isolate->message_handler()->HasLivePorts();
1040 } 1051 }
1041 1052
1042 1053
1043 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) { 1054 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) {
1044 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size); 1055 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size);
1045 return reinterpret_cast<uint8_t*>(new_ptr); 1056 return reinterpret_cast<uint8_t*>(new_ptr);
(...skipping 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 } 4454 }
4444 { 4455 {
4445 NoGCScope no_gc; 4456 NoGCScope no_gc;
4446 RawObject* raw_obj = obj.raw(); 4457 RawObject* raw_obj = obj.raw();
4447 isolate->heap()->SetPeer(raw_obj, peer); 4458 isolate->heap()->SetPeer(raw_obj, peer);
4448 } 4459 }
4449 return Api::Success(); 4460 return Api::Success();
4450 } 4461 }
4451 4462
4452 } // namespace dart 4463 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698