Bug 136962 - [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
Summary: [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when us...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Pratik Solanki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-09-19 14:54 PDT by Pratik Solanki
Modified: 2014-09-22 17:47 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.96 KB, patch)
2014-09-19 15:04 PDT, Pratik Solanki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2014-09-19 14:54:01 PDT
Loading Safari causes the above assertion to trigger. This is because the disk image caching callback is happening on the main (UI) thread instead of the web thread when using WebKit1.
Comment 1 Pratik Solanki 2014-09-19 14:54:16 PDT
<rdar://problem/18342344>
Comment 2 Pratik Solanki 2014-09-19 15:04:50 PDT
Created attachment 238390 [details]
Patch
Comment 3 Geoffrey Garen 2014-09-19 16:30:56 PDT
Comment on attachment 238390 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2014-09-19 17:05:20 PDT
Comment on attachment 238390 [details]
Patch

Clearing flags on attachment: 238390

Committed r173782: <http://trac.webkit.org/changeset/173782>
Comment 5 WebKit Commit Bot 2014-09-19 17:05:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Adler 2014-09-21 11:05:30 PDT
Comment on attachment 238390 [details]
Patch

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

> Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm:111
> +    CFCachedURLResponseCallBackBlock blockToRun = ^ (const CFCachedURLResponseRef response)

This const is incorrect and unneeded. Also would be nice to have consistent syntax with the definition of "block" above.
Comment 7 Pratik Solanki 2014-09-22 15:14:06 PDT
Comment on attachment 238390 [details]
Patch

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

>> Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm:111
>> +    CFCachedURLResponseCallBackBlock blockToRun = ^ (const CFCachedURLResponseRef response)
> 
> This const is incorrect and unneeded. Also would be nice to have consistent syntax with the definition of "block" above.

You're right. I am not sure how I ended up with a const there. Will fix.
Comment 8 Pratik Solanki 2014-09-22 17:47:56 PDT
(In reply to comment #7)
> (From update of attachment 238390 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=238390&action=review
> 
> >> Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm:111
> >> +    CFCachedURLResponseCallBackBlock blockToRun = ^ (const CFCachedURLResponseRef response)
> > 
> > This const is incorrect and unneeded. Also would be nice to have consistent syntax with the definition of "block" above.
> 
> You're right. I am not sure how I ended up with a const there. Will fix.

Fixed in r173858 - <http://trac.webkit.org/changeset/173858>.