Added support for third-party logging facilities

This commit is contained in:
Pierre-Olivier Latour
2014-10-13 22:45:07 -07:00
parent 5070e4fc33
commit c45053bc11
15 changed files with 367 additions and 321 deletions
+7 -7
View File
@@ -107,7 +107,7 @@
} else {
encodedData = [[NSMutableData alloc] initWithLength:kGZipInitialBufferSize];
if (encodedData == nil) {
DNOT_REACHED();
GWS_DNOT_REACHED();
return nil;
}
NSUInteger length = 0;
@@ -136,7 +136,7 @@
}
encodedData.length = 2 * encodedData.length; // zlib has used all the output buffer so resize it and try again in case more data is available
}
DCHECK(_stream.avail_in == 0);
GWS_DCHECK(_stream.avail_in == 0);
} while (length == 0); // Make sure we don't return an empty NSData if not in finished state
encodedData.length = length;
}
@@ -234,10 +234,10 @@
}
- (BOOL)performOpen:(NSError**)error {
DCHECK(_type);
DCHECK(_reader);
GWS_DCHECK(_type);
GWS_DCHECK(_reader);
if (_opened) {
DNOT_REACHED();
GWS_DNOT_REACHED();
return NO;
}
_opened = YES;
@@ -245,12 +245,12 @@
}
- (NSData*)performReadData:(NSError**)error {
DCHECK(_opened);
GWS_DCHECK(_opened);
return [_reader readData:error];
}
- (void)performClose {
DCHECK(_opened);
GWS_DCHECK(_opened);
[_reader close];
}