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

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

Issue 9570051: Revert my last change. Odd test failures that I will investigate tomorrow. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/native_message_handler.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/message.h" 6 #include "vm/message.h"
7 #include "vm/os.h" 7 #include "vm/os.h"
8 #include "vm/port.h" 8 #include "vm/port.h"
9 #include "vm/unit_test.h" 9 #include "vm/unit_test.h"
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 149
150 intptr_t GetIntData(uint8_t* data) { 150 intptr_t GetIntData(uint8_t* data) {
151 return *reinterpret_cast<intptr_t*>(data); 151 return *reinterpret_cast<intptr_t*>(data);
152 } 152 }
153 153
154 154
155 static Message* NextMessage() { 155 static Message* NextMessage() {
156 Isolate* isolate = Isolate::Current(); 156 Isolate* isolate = Isolate::Current();
157 Message* result = isolate->message_handler()->Dequeue(0); 157 Message* result = isolate->message_handler()->queue()->Dequeue(0);
158 return result; 158 return result;
159 } 159 }
160 160
161 161
162 void ThreadedPort_start(uword parameter) { 162 void ThreadedPort_start(uword parameter) {
163 // TODO(turnidge): We only use the isolate to get access to its 163 // TODO(turnidge): We only use the isolate to get access to its
164 // message handler. I should rewrite this test to use a 164 // message handler. I should rewrite this test to use a
165 // TestMessageHandler instead. 165 // TestMessageHandler instead.
166 Isolate* isolate = Dart::CreateIsolate(NULL); 166 Isolate* isolate = Dart::CreateIsolate(NULL);
167 167
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Give the spawned thread enough time to properly exit. 223 // Give the spawned thread enough time to properly exit.
224 Monitor* waiter = new Monitor(); 224 Monitor* waiter = new Monitor();
225 { 225 {
226 MonitorLocker ml(waiter); 226 MonitorLocker ml(waiter);
227 ml.Wait(20); 227 ml.Wait(20);
228 } 228 }
229 delete waiter; 229 delete waiter;
230 } 230 }
231 231
232 } // namespace dart 232 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/native_message_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698