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

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

Issue 834233003: Fix for issue 21398 (only send "literal like" objects across isolates spawned using spawnURI (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/benchmark_test.cc ('k') | runtime/vm/dart_api_impl_test.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 #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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size); 1569 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size);
1570 return reinterpret_cast<uint8_t*>(new_ptr); 1570 return reinterpret_cast<uint8_t*>(new_ptr);
1571 } 1571 }
1572 1572
1573 1573
1574 DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle handle) { 1574 DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle handle) {
1575 Isolate* isolate = Isolate::Current(); 1575 Isolate* isolate = Isolate::Current();
1576 DARTSCOPE(isolate); 1576 DARTSCOPE(isolate);
1577 const Object& object = Object::Handle(isolate, Api::UnwrapHandle(handle)); 1577 const Object& object = Object::Handle(isolate, Api::UnwrapHandle(handle));
1578 uint8_t* data = NULL; 1578 uint8_t* data = NULL;
1579 MessageWriter writer(&data, &allocator); 1579 MessageWriter writer(&data, &allocator, false);
1580 writer.WriteMessage(object); 1580 writer.WriteMessage(object);
1581 intptr_t len = writer.BytesWritten(); 1581 intptr_t len = writer.BytesWritten();
1582 return PortMap::PostMessage(new Message( 1582 return PortMap::PostMessage(new Message(
1583 port_id, data, len, Message::kNormalPriority)); 1583 port_id, data, len, Message::kNormalPriority));
1584 } 1584 }
1585 1585
1586 1586
1587 DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id) { 1587 DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id) {
1588 Isolate* isolate = Isolate::Current(); 1588 Isolate* isolate = Isolate::Current();
1589 DARTSCOPE(isolate); 1589 DARTSCOPE(isolate);
(...skipping 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after
5424 5424
5425 5425
5426 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5426 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5427 const char* name, 5427 const char* name,
5428 Dart_ServiceRequestCallback callback, 5428 Dart_ServiceRequestCallback callback,
5429 void* user_data) { 5429 void* user_data) {
5430 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5430 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5431 } 5431 }
5432 5432
5433 } // namespace dart 5433 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698