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

Unified Diff: runtime/lib/isolate.cc

Issue 8588040: Add a mid-sized integration test for the Dart Embedding Api which (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/lib/isolate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.cc
===================================================================
--- runtime/lib/isolate.cc (revision 1904)
+++ runtime/lib/isolate.cc (working copy)
@@ -87,7 +87,8 @@
RawInstance* ReceivePortCreate(intptr_t port_id) {
const String& class_name =
String::Handle(String::NewSymbol("ReceivePortImpl"));
- const String& function_name = String::Handle(String::NewSymbol("create_"));
+ const String& function_name =
+ String::Handle(String::NewSymbol("_get_or_create"));
const int kNumArguments = 1;
const Array& kNoArgumentNames = Array::Handle();
const Function& function = Function::Handle(
@@ -105,6 +106,8 @@
UnhandledException& uhe = UnhandledException::Handle();
uhe ^= result.raw();
ProcessUnhandledException(uhe);
+ } else {
+ PortMap::SetLive(port_id);
}
return result.raw();
}
@@ -112,7 +115,7 @@
static RawInstance* SendPortCreate(intptr_t port_id) {
const String& class_name = String::Handle(String::NewSymbol("SendPortImpl"));
- const String& function_name = String::Handle(String::NewSymbol("create_"));
+ const String& function_name = String::Handle(String::NewSymbol("_create"));
const int kNumArguments = 1;
const Array& kNoArgumentNames = Array::Handle();
const Function& function = Function::Handle(
@@ -276,7 +279,7 @@
// Check arguments to see if the specified library and classes are
// loaded, this check will throw an exception if they are not loaded.
if (init_successful && CheckArguments(library_url, class_name)) {
- port_id = PortMap::CreatePort();
+ port_id = spawned_isolate->main_port();
uword data = reinterpret_cast<uword>(
new IsolateStartData(spawned_isolate,
strdup(library_url),
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/lib/isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698