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

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

Issue 629533002: Fix deadlock that can occur while handling service messages at a breakpoint. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/message.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/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 Isolate* isolate = Isolate::Current(); 1540 Isolate* isolate = Isolate::Current();
1541 CHECK_ISOLATE_SCOPE(isolate); 1541 CHECK_ISOLATE_SCOPE(isolate);
1542 CHECK_CALLBACK_STATE(isolate); 1542 CHECK_CALLBACK_STATE(isolate);
1543 1543
1544 ASSERT(isolate->GetAndClearResumeRequest() == false); 1544 ASSERT(isolate->GetAndClearResumeRequest() == false);
1545 isolate->message_handler()->HandleOOBMessages(); 1545 isolate->message_handler()->HandleOOBMessages();
1546 return isolate->GetAndClearResumeRequest(); 1546 return isolate->GetAndClearResumeRequest();
1547 } 1547 }
1548 1548
1549 1549
1550 DART_EXPORT bool Dart_HasServiceMessages() {
1551 Isolate* isolate = Isolate::Current();
1552 ASSERT(isolate);
1553 return isolate->message_handler()->HasOOBMessages();
1554 }
1555
1556
1550 DART_EXPORT bool Dart_HasLivePorts() { 1557 DART_EXPORT bool Dart_HasLivePorts() {
1551 Isolate* isolate = Isolate::Current(); 1558 Isolate* isolate = Isolate::Current();
1552 ASSERT(isolate); 1559 ASSERT(isolate);
1553 return isolate->message_handler()->HasLivePorts(); 1560 return isolate->message_handler()->HasLivePorts();
1554 } 1561 }
1555 1562
1556 1563
1557 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) { 1564 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) {
1558 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size); 1565 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size);
1559 return reinterpret_cast<uint8_t*>(new_ptr); 1566 return reinterpret_cast<uint8_t*>(new_ptr);
(...skipping 3846 matching lines...) Expand 10 before | Expand all | Expand 10 after
5406 5413
5407 5414
5408 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5415 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5409 const char* name, 5416 const char* name,
5410 Dart_ServiceRequestCallback callback, 5417 Dart_ServiceRequestCallback callback,
5411 void* user_data) { 5418 void* user_data) {
5412 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5419 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5413 } 5420 }
5414 5421
5415 } // namespace dart 5422 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698