Skip to content

Commit

Permalink
Merge r220538 - Remove some unused lambda captures so that WebKit bui…
Browse files Browse the repository at this point in the history
…lds with -Wunused-lambda-capture

https://bugs.webkit.org/show_bug.cgi?id=175436
<rdar://problem/33667497>

Reviewed by Simon Fraser.

Source/JavaScriptCore:

* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):

Source/WebCore:

* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(PlatformMediaSessionManager::updateSessionState):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput):

Source/WebKit:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):

Tools:

* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
(TestWebKitAPI::TEST_F):
  • Loading branch information
hortont424 authored and carlosgcampos committed Aug 14, 2017
1 parent 0950655 commit dcd6161
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 11 deletions.
11 changes: 11 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
2017-08-10 Tim Horton <timothy_horton@apple.com>

Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
https://bugs.webkit.org/show_bug.cgi?id=175436
<rdar://problem/33667497>

Reviewed by Simon Fraser.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):

2017-08-09 Caio Lima <ticaiolima@gmail.com>

[JSC] Create JSSet constructor that accepts it's size as parameter
Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/interpreter/Interpreter.cpp
Expand Up @@ -322,7 +322,7 @@ Interpreter::Interpreter(VM& vm)
{
#if !ASSERT_DISABLED
static std::once_flag assertOnceKey;
std::call_once(assertOnceKey, [this] {
std::call_once(assertOnceKey, [] {
for (unsigned i = 0; i < NUMBER_OF_BYTECODE_IDS; ++i) {
OpcodeID opcodeID = static_cast<OpcodeID>(i);
RELEASE_ASSERT(getOpcodeID(getOpcode(opcodeID)) == opcodeID);
Expand Down
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2017-08-10 Tim Horton <timothy_horton@apple.com>

Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
https://bugs.webkit.org/show_bug.cgi?id=175436
<rdar://problem/33667497>

Reviewed by Simon Fraser.

* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(PlatformMediaSessionManager::updateSessionState):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput):

2017-08-10 Myles C. Maxfield <mmaxfield@apple.com>

Addressing post-review comments after r219173.
Expand Down
Expand Up @@ -62,7 +62,7 @@ void PlatformMediaSessionManager::updateSessionState()

bool hasWebAudioType = false;
bool hasAudibleAudioOrVideoMediaType = false;
bool hasAudioCapture = anyOfSessions([this, &hasWebAudioType, &hasAudibleAudioOrVideoMediaType] (PlatformMediaSession& session, size_t) mutable {
bool hasAudioCapture = anyOfSessions([&hasWebAudioType, &hasAudibleAudioOrVideoMediaType] (PlatformMediaSession& session, size_t) mutable {
auto type = session.mediaType();
if (type == PlatformMediaSession::WebAudio)
hasWebAudioType = true;
Expand Down
Expand Up @@ -224,6 +224,9 @@

void WebCoreDecompressionSession::handleDecompressionOutput(bool displaying, OSStatus status, VTDecodeInfoFlags infoFlags, CVImageBufferRef rawImageBuffer, CMTime presentationTimeStamp, CMTime presentationDuration)
{
UNUSED_PARAM(status);
UNUSED_PARAM(infoFlags);

CMVideoFormatDescriptionRef rawImageBufferDescription = nullptr;
if (noErr != CMVideoFormatDescriptionCreateForImageBuffer(kCFAllocatorDefault, rawImageBuffer, &rawImageBufferDescription))
return;
Expand All @@ -240,8 +243,7 @@
return;
RefPtr<WebCoreDecompressionSession> protectedThis { this };
RetainPtr<CMSampleBufferRef> imageSampleBuffer = adoptCF(rawImageSampleBuffer);
dispatch_async(m_enqueingQueue.get(), [protectedThis, status, imageSampleBuffer, infoFlags, displaying] {
UNUSED_PARAM(infoFlags);
dispatch_async(m_enqueingQueue.get(), [protectedThis, imageSampleBuffer, displaying] {
protectedThis->enqueueDecodedSample(imageSampleBuffer.get(), displaying);
});
}
Expand Down
13 changes: 13 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,16 @@
2017-08-10 Tim Horton <timothy_horton@apple.com>

Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
https://bugs.webkit.org/show_bug.cgi?id=175436
<rdar://problem/33667497>

Reviewed by Simon Fraser.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):

2017-08-10 Zan Dobersek <zdobersek@igalia.com>

[GTK] Don't use --whole-archive linking flags for the WebKit2 target libraries
Expand Down
Expand Up @@ -305,7 +305,7 @@ void UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame(
userMediaAccessWasDenied(userMediaID, UserMediaPermissionRequestProxy::UserMediaAccessDenialReason::UserMediaDisabled);
};

auto haveDeviceSaltHandler = [this, userMediaID, validHandler = WTFMove(validHandler), invalidHandler = WTFMove(invalidHandler), audioConstraints = WebCore::MediaConstraints(audioConstraints), videoConstraints = WebCore::MediaConstraints(videoConstraints)](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) mutable {
auto haveDeviceSaltHandler = [this, validHandler = WTFMove(validHandler), invalidHandler = WTFMove(invalidHandler), audioConstraints = WebCore::MediaConstraints(audioConstraints), videoConstraints = WebCore::MediaConstraints(videoConstraints)](uint64_t userMediaID, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess) mutable {

auto request = m_pendingDeviceRequests.take(userMediaID);
if (!request)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Expand Up @@ -538,7 +538,7 @@ void WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains(OptionSet<Websi

void WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData(OptionSet<WebsiteDataType> dataTypes, OptionSet<WebsiteDataFetchOption> fetchOptions, Function<void(HashSet<String>&&)>&& completionHandler)
{
fetchData(dataTypes, fetchOptions, [completionHandler = WTFMove(completionHandler), this, protectedThis = makeRef(*this)](auto&& existingDataRecords) {
fetchData(dataTypes, fetchOptions, [completionHandler = WTFMove(completionHandler), protectedThis = makeRef(*this)](auto&& existingDataRecords) {
HashSet<String> domainsWithDataRecords;
for (auto&& dataRecord : existingDataRecords) {
String domain = dataRecord.topPrivatelyControlledDomain();
Expand Down
11 changes: 11 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,14 @@
2017-08-10 Tim Horton <timothy_horton@apple.com>

Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
https://bugs.webkit.org/show_bug.cgi?id=175436
<rdar://problem/33667497>

Reviewed by Simon Fraser.

* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
(TestWebKitAPI::TEST_F):

2017-08-09 Don Olmstead <don.olmstead@sony.com>

[WTF] Move TextStream into WTF
Expand Down
10 changes: 5 additions & 5 deletions Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp
Expand Up @@ -149,7 +149,7 @@ TEST_F(FileMonitorTest, DetectChange)

auto testQueue = WorkQueue::create("Test Work Queue");

auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [this] (FileMonitor::FileChangeType type) {
auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [] (FileMonitor::FileChangeType type) {
ASSERT(!RunLoop::isMain());
switch (type) {
case FileMonitor::FileChangeType::Modification:
Expand Down Expand Up @@ -191,7 +191,7 @@ TEST_F(FileMonitorTest, DetectMultipleChanges)

auto testQueue = WorkQueue::create("Test Work Queue");

auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [this] (FileMonitor::FileChangeType type) {
auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [] (FileMonitor::FileChangeType type) {
ASSERT(!RunLoop::isMain());
switch (type) {
case FileMonitor::FileChangeType::Modification:
Expand Down Expand Up @@ -251,7 +251,7 @@ TEST_F(FileMonitorTest, DetectDeletion)

auto testQueue = WorkQueue::create("Test Work Queue");

auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [this] (FileMonitor::FileChangeType type) {
auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [] (FileMonitor::FileChangeType type) {
ASSERT(!RunLoop::isMain());
switch (type) {
case FileMonitor::FileChangeType::Modification:
Expand Down Expand Up @@ -290,7 +290,7 @@ TEST_F(FileMonitorTest, DetectChangeAndThenDelete)

auto testQueue = WorkQueue::create("Test Work Queue");

auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [this] (FileMonitor::FileChangeType type) {
auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [] (FileMonitor::FileChangeType type) {
ASSERT(!RunLoop::isMain());
switch (type) {
case FileMonitor::FileChangeType::Modification:
Expand Down Expand Up @@ -347,7 +347,7 @@ TEST_F(FileMonitorTest, DetectDeleteButNotSubsequentChange)

auto testQueue = WorkQueue::create("Test Work Queue");

auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [this] (FileMonitor::FileChangeType type) {
auto monitor = std::make_unique<FileMonitor>(tempFilePath(), testQueue.copyRef(), [] (FileMonitor::FileChangeType type) {
ASSERT(!RunLoop::isMain());
switch (type) {
case FileMonitor::FileChangeType::Modification:
Expand Down

0 comments on commit dcd6161

Please sign in to comment.