Chromium Code Reviews| Index: runtime/lib/isolate.cc |
| =================================================================== |
| --- runtime/lib/isolate.cc (revision 1762) |
| +++ runtime/lib/isolate.cc (working copy) |
| @@ -87,7 +87,7 @@ |
| 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("_create")); |
| const int kNumArguments = 1; |
| const Array& kNoArgumentNames = Array::Handle(); |
| const Function& function = Function::Handle( |
| @@ -105,6 +105,8 @@ |
| UnhandledException& uhe = UnhandledException::Handle(); |
| uhe ^= result.raw(); |
| ProcessUnhandledException(uhe); |
| + } else { |
| + PortMap::SetLive(port_id); |
|
siva
2011/11/29 19:50:27
I think we should add a comment that a port once i
turnidge
2011/12/05 17:53:34
Added comment in port.h.
On 2011/11/29 19:50:27,
|
| } |
| return result.raw(); |
| } |
| @@ -112,7 +114,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 +278,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), |