Bug 158285 - Get rid of StringCapture
Summary: Get rid of StringCapture
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-01 17:01 PDT by Brady Eidson
Modified: 2016-06-01 22:46 PDT (History)
1 user (show)

See Also:


Attachments
Patch (15.02 KB, patch)
2016-06-01 17:04 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (15.02 KB, patch)
2016-06-01 20:39 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (15.72 KB, patch)
2016-06-01 21:11 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (15.69 KB, patch)
2016-06-01 21:57 PDT, Brady Eidson
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-06-01 17:01:18 PDT
Get rid of StringCapture

With all of the C++14 lambda work lately, it's already almost gone.

We don't need it anymore.
Comment 1 Brady Eidson 2016-06-01 17:04:30 PDT
Created attachment 280280 [details]
Patch
Comment 2 Brady Eidson 2016-06-01 17:18:12 PDT
This may rely on https://bugs.webkit.org/show_bug.cgi?id=158277 landing first, which I had in my tree.

It will probably fail EWS, but feel free to review.
Comment 3 Brady Eidson 2016-06-01 19:04:18 PDT
Will resubmit for EWS once 158277 is resolved and landed.
Comment 4 Brady Eidson 2016-06-01 20:39:32 PDT
Created attachment 280303 [details]
Patch
Comment 5 Chris Dumez 2016-06-01 20:50:04 PDT
Does not build on GTK.
Comment 6 Brady Eidson 2016-06-01 21:11:45 PDT
Created attachment 280304 [details]
Patch
Comment 7 Brady Eidson 2016-06-01 21:12:39 PDT
(In reply to comment #5)
> Does not build on GTK.

Or anywhere.

Due to the wonders of git (and my inability to navigate its mysteries) I lost a line. *sigh*

New one churning through EWS...
Comment 8 Chris Dumez 2016-06-01 21:22:49 PDT
Comment on attachment 280304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280304&action=review

> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {

Hmm, this is a block, not a NoncopyableFunction. I don't understand how having a Ref<> in there works. I thought constructing a block from a lambda always copied the lambda.
Comment 9 Chris Dumez 2016-06-01 21:24:26 PDT
(In reply to comment #8)
> Comment on attachment 280304 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280304&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
> > +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> 
> Hmm, this is a block, not a NoncopyableFunction. I don't understand how
> having a Ref<> in there works. I thought constructing a block from a lambda
> always copied the lambda.

We'll see if the iOS EWS is happy with it.
Comment 10 Chris Dumez 2016-06-01 21:29:28 PDT
(In reply to comment #9)
> (In reply to comment #8)
> > Comment on attachment 280304 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=280304&action=review
> > 
> > > Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
> > > +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> > 
> > Hmm, this is a block, not a NoncopyableFunction. I don't understand how
> > having a Ref<> in there works. I thought constructing a block from a lambda
> > always copied the lambda.
> 
> We'll see if the iOS EWS is happy with it.

Ahah! I knew it was too good to be true:
/Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: error: call to implicitly-deleted copy constructor of 'const (lambda at /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47)'
    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:48: note: copy constructor of '' is implicitly deleted because field '' has a deleted copy constructor
    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
                                               ^
In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:35:
In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/html/TimeRanges.h:29:
In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/PlatformTimeRanges.h:31:
In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/PassRefPtr.h:25:
/Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
    Ref(const Ref& other) = delete;
    ^
/Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of lambda object due to conversion to block pointer here
    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
                                              ^
1 error generated.
Comment 11 Chris Dumez 2016-06-01 21:33:32 PDT
Comment on attachment 280304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280304&action=review

>>>> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
>>>> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>>> 
>>> Hmm, this is a block, not a NoncopyableFunction. I don't understand how having a Ref<> in there works. I thought constructing a block from a lambda always copied the lambda.
>> 
>> We'll see if the iOS EWS is happy with it.
> 
> Ahah! I knew it was too good to be true:
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: error: call to implicitly-deleted copy constructor of 'const (lambda at /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47)'
>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:48: note: copy constructor of '' is implicitly deleted because field '' has a deleted copy constructor
>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>                                                ^
> In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:35:
> In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/html/TimeRanges.h:29:
> In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/PlatformTimeRanges.h:31:
> In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/PassRefPtr.h:25:
> /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
>     Ref(const Ref& other) = delete;
>     ^
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of lambda object due to conversion to block pointer here
>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>                                               ^
> 1 error generated.

I am not 100% sure but would using callOnMainThread() be OK in this case?
Comment 12 Brady Eidson 2016-06-01 21:33:59 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > Comment on attachment 280304 [details]
> > > Patch
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=280304&action=review
> > > 
> > > > Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
> > > > +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> > > 
> > > Hmm, this is a block, not a NoncopyableFunction. I don't understand how
> > > having a Ref<> in there works. I thought constructing a block from a lambda
> > > always copied the lambda.
> > 
> > We'll see if the iOS EWS is happy with it.
> 
> Ahah! I knew it was too good to be true:
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/
> WebVideoFullscreenControllerAVKit.mm:437:47: error: call to
> implicitly-deleted copy constructor of 'const (lambda at
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/
> WebVideoFullscreenControllerAVKit.mm:437:47)'
>     dispatch_async(dispatch_get_main_queue(), [protectedThis =
> Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type,
> localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>                                              
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/
> WebVideoFullscreenControllerAVKit.mm:437:48: note: copy constructor of '' is
> implicitly deleted because field '' has a deleted copy constructor
>     dispatch_async(dispatch_get_main_queue(), [protectedThis =
> Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type,
> localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>                                                ^
> In file included from
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/
> WebVideoFullscreenControllerAVKit.mm:35:
> In file included from
> /Volumes/Data/EWS/WebKit/Source/WebCore/html/TimeRanges.h:29:
> In file included from
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/PlatformTimeRanges.
> h:31:
> In file included from
> /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/
> include/wtf/PassRefPtr.h:25:
> /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/
> include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
>     Ref(const Ref& other) = delete;
>     ^
> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/
> WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of
> lambda object due to conversion to block pointer here
>     dispatch_async(dispatch_get_main_queue(), [protectedThis =
> Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type,
> localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>                                               ^
> 1 error generated.

I *thought* I'd mangled the compiler guards locally to actually see it build on my Mac, but I guess I failed!

Will fix.
Comment 13 Chris Dumez 2016-06-01 21:35:59 PDT
Comment on attachment 280304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280304&action=review

>>>>>> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
>>>>>> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>>>>> 
>>>>> Hmm, this is a block, not a NoncopyableFunction. I don't understand how having a Ref<> in there works. I thought constructing a block from a lambda always copied the lambda.
>>>> 
>>>> We'll see if the iOS EWS is happy with it.
>>> 
>>> Ahah! I knew it was too good to be true:
>>> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: error: call to implicitly-deleted copy constructor of 'const (lambda at /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47)'
>>>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>>>                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:48: note: copy constructor of '' is implicitly deleted because field '' has a deleted copy constructor
>>>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>>>                                                ^
>>> In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:35:
>>> In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/html/TimeRanges.h:29:
>>> In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/PlatformTimeRanges.h:31:
>>> In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/PassRefPtr.h:25:
>>> /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
>>>     Ref(const Ref& other) = delete;
>>>     ^
>>> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of lambda object due to conversion to block pointer here
>>>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
>>>                                               ^
>>> 1 error generated.
>> 
>> I am not 100% sure but would using callOnMainThread() be OK in this case?
> 
> I *thought* I'd mangled the compiler guards locally to actually see it build on my Mac, but I guess I failed!
> 
> Will fix.

Otherwise, we can keep using the same API (which is safer) and allocated a NonCopyableFunction on the heap and capture that.
Comment 14 Brady Eidson 2016-06-01 21:36:39 PDT
(In reply to comment #11)
> Comment on attachment 280304 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=280304&action=review
> 
> >>>> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:434
> >>>> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> >>> 
> >>> Hmm, this is a block, not a NoncopyableFunction. I don't understand how having a Ref<> in there works. I thought constructing a block from a lambda always copied the lambda.
> >> 
> >> We'll see if the iOS EWS is happy with it.
> > 
> > Ahah! I knew it was too good to be true:
> > /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: error: call to implicitly-deleted copy constructor of 'const (lambda at /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47)'
> >     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> >                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:48: note: copy constructor of '' is implicitly deleted because field '' has a deleted copy constructor
> >     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> >                                                ^
> > In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:35:
> > In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/html/TimeRanges.h:29:
> > In file included from /Volumes/Data/EWS/WebKit/Source/WebCore/platform/graphics/PlatformTimeRanges.h:31:
> > In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/PassRefPtr.h:25:
> > /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
> >     Ref(const Ref& other) = delete;
> >     ^
> > /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of lambda object due to conversion to block pointer here
> >     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> >                                               ^
> > 1 error generated.
> 
> I am not 100% sure but would using callOnMainThread() be OK in this case?

Seeing as this is iOS and I'm trying to make this be a 100% mechanical task, I'm not willing to try that change.

I think we *really* need to sort out the whole RunLoop::main vs callOnMainThread issue. It would simply be better for the project if callOnMainThread could be ripped out and we only relied on RunLoop dispatch.
Comment 15 Brady Eidson 2016-06-01 21:53:05 PDT
(In reply to comment #13)
> >>> /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
> >>>     Ref(const Ref& other) = delete;
> >>>     ^
> >>> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of lambda object due to conversion to block pointer here
> >>>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> >>>                                               ^
> >>> 1 error generated.
> >> 
> >> I am not 100% sure but would using callOnMainThread() be OK in this case?
> > 
> > I *thought* I'd mangled the compiler guards locally to actually see it build on my Mac, but I guess I failed!
> > 
> > Will fix.
> 
> Otherwise, we can keep using the same API (which is safer) and allocated a
> NonCopyableFunction on the heap and capture that.

Yah... kinda ugly, but I'm doing that. Stay tuned.
Comment 16 Brady Eidson 2016-06-01 21:57:37 PDT
Created attachment 280305 [details]
Patch
Comment 17 Brady Eidson 2016-06-01 21:57:47 PDT
(In reply to comment #15)
> (In reply to comment #13)
> > >>> /Volumes/Data/EWS/WebKit/WebKitBuild/Release-iphonesimulator/usr/local/include/wtf/Ref.h:69:5: note: 'Ref' has been explicitly marked deleted here
> > >>>     Ref(const Ref& other) = delete;
> > >>>     ^
> > >>> /Volumes/Data/EWS/WebKit/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:437:47: note: implicit capture of lambda object due to conversion to block pointer here
> > >>>     dispatch_async(dispatch_get_main_queue(), [protectedThis = Ref<WebVideoFullscreenControllerContext>(*this), this, enabled, type, localizedDeviceName = localizedDeviceName.isolatedCopy()] {
> > >>>                                               ^
> > >>> 1 error generated.
> > >> 
> > >> I am not 100% sure but would using callOnMainThread() be OK in this case?
> > > 
> > > I *thought* I'd mangled the compiler guards locally to actually see it build on my Mac, but I guess I failed!
> > > 
> > > Will fix.
> > 
> > Otherwise, we can keep using the same API (which is safer) and allocated a
> > NonCopyableFunction on the heap and capture that.
> 
> Yah... kinda ugly, but I'm doing that. Stay tuned.

Actually, screw that.

callOnMainThread() should be fine.

From the Concurrency Programming guide (https://developer.apple.com/library/mac/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationQueues/OperationQueues.html#//apple_ref/doc/uid/TP40008091-CH102-SW2):

"The main dispatch queue is a globally available serial queue that executes tasks on the application’s main thread."
Comment 18 Chris Dumez 2016-06-01 22:12:54 PDT
Comment on attachment 280305 [details]
Patch

r=me as long as the bots are happy.
Comment 19 Brady Eidson 2016-06-01 22:43:38 PDT
Current test failures on EWS appear to be the typical media controls failures that have been plaguing us lately.

On retries they're clearing up.
Comment 20 Brady Eidson 2016-06-01 22:46:13 PDT
http://trac.webkit.org/changeset/201594