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

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

Issue 16378004: Revert change 23636 as it is causing issues on dartium. Will resubmit after investigating the darti… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/code_observers.cc ('k') | runtime/vm/dart_api_message.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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 1035
1036 1036
1037 DART_EXPORT bool Dart_HasLivePorts() { 1037 DART_EXPORT bool Dart_HasLivePorts() {
1038 Isolate* isolate = Isolate::Current(); 1038 Isolate* isolate = Isolate::Current();
1039 ASSERT(isolate); 1039 ASSERT(isolate);
1040 return isolate->message_handler()->HasLivePorts(); 1040 return isolate->message_handler()->HasLivePorts();
1041 } 1041 }
1042 1042
1043 1043
1044 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) { 1044 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) {
1045 return Utils::Realloc(ptr, old_size, new_size); 1045 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size);
1046 return reinterpret_cast<uint8_t*>(new_ptr);
1046 } 1047 }
1047 1048
1048 1049
1049 DART_EXPORT bool Dart_PostIntArray(Dart_Port port_id, 1050 DART_EXPORT bool Dart_PostIntArray(Dart_Port port_id,
1050 intptr_t len, 1051 intptr_t len,
1051 intptr_t* data) { 1052 intptr_t* data) {
1052 uint8_t* buffer = NULL; 1053 uint8_t* buffer = NULL;
1053 ApiMessageWriter writer(&buffer, &allocator); 1054 ApiMessageWriter writer(&buffer, &allocator);
1054 writer.WriteMessage(len, data); 1055 writer.WriteMessage(len, data);
1055 1056
(...skipping 3780 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 } 4837 }
4837 { 4838 {
4838 NoGCScope no_gc; 4839 NoGCScope no_gc;
4839 RawObject* raw_obj = obj.raw(); 4840 RawObject* raw_obj = obj.raw();
4840 isolate->heap()->SetPeer(raw_obj, peer); 4841 isolate->heap()->SetPeer(raw_obj, peer);
4841 } 4842 }
4842 return Api::Success(); 4843 return Api::Success();
4843 } 4844 }
4844 4845
4845 } // namespace dart 4846 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_observers.cc ('k') | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698