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

Unified Diff: testing/iossim/iossim.mm

Issue 2240373002: [iossim] Work around pipe hang on some macs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/iossim/iossim.mm
diff --git a/testing/iossim/iossim.mm b/testing/iossim/iossim.mm
index f1f0ca86c6e345b59caad9aa46cbf4d9ef8ead24..c2b04127f728cbbf0eeb2e95e5db295b045a5286 100644
--- a/testing/iossim/iossim.mm
+++ b/testing/iossim/iossim.mm
@@ -89,6 +89,14 @@ void LogError(NSString* format, ...) {
[_task waitUntilExit];
}
+- (void)launch {
+ [_task launch];
+}
+
+- (void)waitUntilExit {
+ [_task waitUntilExit];
+}
+
@end
// Return array of available iOS runtime dictionaries. Unavailable (old Xcode
@@ -127,9 +135,11 @@ NSDictionary* GetSimulatorList() {
initWithArguments:@[ @"simctl", @"list", @"-j" ]] autorelease];
NSPipe* out = [NSPipe pipe];
[task setStandardOutput:out];
- [task run];
+ [task launch];
NSData* data = [[out fileHandleForReading] readDataToEndOfFile];
rohitrao (ping after 24h) 2016/08/13 00:59:05 Add a comment explaining why the code is ordered t
+ [task waitUntilExit];
+
NSError* error = nil;
return [NSJSONSerialization JSONObjectWithData:data
options:kNilOptions
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698