Skip to content

Commit

Permalink
Reland of move some warning suppressions from SocketRocket. (patchset #2
Browse files Browse the repository at this point in the history
 id:60001 of https://codereview.webrtc.org/2718703002/ )

Reason for revert:
AppRTCMobile has been fixed.

Original issue's description:
> Revert of move some warning suppressions from SocketRocket. (patchset #2 id:70001 of https://codereview.webrtc.org/2718653002/ )
>
> Reason for revert:
> Breaks AppRTCMobile in release configuration
>
> Original issue's description:
> > Reland of move some warning suppressions from SocketRocket. (patchset #1 id:1 of https://codereview.webrtc.org/2714123002/ )
> >
> > Reason for revert:
> > Buildbot issues have been fixed.
> >
> > Original issue's description:
> > > Revert of Remove some warning suppressions from SocketRocket. (patchset #1 id:1 of https://codereview.webrtc.org/2704383004/ )
> > >
> > > Reason for revert:
> > > Breaks buildbot
> > >
> > > Original issue's description:
> > > > Remove some warning suppressions from SocketRocket.
> > > >
> > > > These warnings started appearing on a clang update. This CL patches the
> > > > vendored library and removes the supression. We assert on the return as
> > > > we're not equipped to deal with failures there anyway.
> > > >
> > > > BUG=webrtc:6396
> > > > NOTRY=true
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2704383004
> > > > Cr-Commit-Position: refs/heads/master@{#16820}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/49990e88fb523901b28d10f2026602cb86528b0d
> > >
> > > [email protected],[email protected]
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:6396
> > >
> > > Review-Url: https://codereview.webrtc.org/2714123002
> > > Cr-Commit-Position: refs/heads/master@{#16822}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/e47de1a69c2f574d71728b16825f8cdbf7407481
> >
> > [email protected],[email protected]
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:6396
> >
> > Review-Url: https://codereview.webrtc.org/2718653002
> > Cr-Commit-Position: refs/heads/master@{#16823}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/00df91ce50c71b7895ec24246c71c08568236967
>
> [email protected],[email protected]
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6396
>
> Review-Url: https://codereview.webrtc.org/2718703002
> Cr-Commit-Position: refs/heads/master@{#16829}
> Committed: https://chromium.googlesource.com/external/webrtc/+/0b34577625ef63d0dea9c72ac9972d111b359ff7

[email protected],[email protected]
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6396

Review-Url: https://codereview.webrtc.org/2715943003
Cr-Commit-Position: refs/heads/master@{#16830}
  • Loading branch information
kthelgason authored and Commit bot committed Feb 24, 2017
1 parent 0b34577 commit 343b710
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions webrtc/examples/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
cflags_objc = [
# Enabled for cflags_objc in build/config/compiler/BUILD.gn.
"-Wno-objc-missing-property-synthesis",

# Hide the warning for SecRandomCopyBytes(), until we update to upstream.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
"-Wno-unused-result",
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ - (void)didConnect
CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Host"), (__bridge CFStringRef)(_url.port ? [NSString stringWithFormat:@"%@:%@", _url.host, _url.port] : _url.host));

NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16];
SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
BOOL success = SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
assert(success);

if ([keyBytes respondsToSelector:@selector(base64EncodedStringWithOptions:)]) {
_secKey = [keyBytes base64EncodedStringWithOptions:0];
Expand All @@ -528,7 +529,7 @@ - (void)didConnect
[_urlRequest.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
CFHTTPMessageSetHeaderFieldValue(request, (__bridge CFStringRef)key, (__bridge CFStringRef)obj);
}];

NSData *message = CFBridgingRelease(CFHTTPMessageCopySerializedMessage(request));

CFRelease(request);
Expand Down Expand Up @@ -1361,7 +1362,8 @@ - (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data;
}
} else {
uint8_t *mask_key = frame_buffer + frame_buffer_size;
SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
BOOL success = SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
assert(success);
frame_buffer_size += sizeof(uint32_t);

// TODO: could probably optimize this with SIMD
Expand Down

0 comments on commit 343b710

Please sign in to comment.