Bug 133374

Summary: Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, japhet
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Zan Dobersek 2014-05-29 03:55:01 PDT
Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
Comment 1 Zan Dobersek 2014-05-29 04:03:25 PDT
Created attachment 232240 [details]
Patch
Comment 2 Darin Adler 2014-05-31 15:31:17 PDT
Comment on attachment 232240 [details]
Patch

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

> Source/WebCore/loader/icon/IconDatabase.cpp:2160
> +    ImportedIconURLForPageURLWorkItem* itemPtr = new ImportedIconURLForPageURLWorkItem(m_client, pageURL);

Does this allocation need to be done in the icon sync thread? Can it be done on the main thread instead?

> Source/WebCore/loader/icon/IconDatabase.cpp:2171
> +    ImportedIconDataForPageURLWorkItem* itemPtr = new ImportedIconDataForPageURLWorkItem(m_client, pageURL);

Does this allocation need to be done in the icon sync thread? Can it be done on the main thread instead?

> Source/WebCore/loader/icon/IconDatabase.cpp:2182
> +    RemovedAllIconsWorkItem* itemPtr = new RemovedAllIconsWorkItem(m_client);

Does this allocation need to be done in the icon sync thread? Can it be done on the main thread instead?

> Source/WebCore/loader/icon/IconDatabase.cpp:2193
> +    FinishedURLImport* itemPtr = new FinishedURLImport(m_client);

Does this allocation need to be done in the icon sync thread? Can it be done on the main thread instead?
Comment 3 Zan Dobersek 2014-06-05 01:39:47 PDT
Created attachment 232530 [details]
Patch
Comment 4 Zan Dobersek 2014-06-05 01:48:48 PDT
(In reply to comment #2)
> (From update of attachment 232240 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232240&action=review
> 
> > Source/WebCore/loader/icon/IconDatabase.cpp:2160
> > +    ImportedIconURLForPageURLWorkItem* itemPtr = new ImportedIconURLForPageURLWorkItem(m_client, pageURL);
> 
> Does this allocation need to be done in the icon sync thread? Can it be done on the main thread instead?

I went on and removed all of these classes as they were just calling a specific method on the IconDatabaseClient in their performWork() override. Requesting a re-review because of that.
Comment 5 Zan Dobersek 2014-06-07 06:10:55 PDT
Comment on attachment 232530 [details]
Patch

Clearing flags on attachment: 232530

Committed r169674: <http://trac.webkit.org/changeset/169674>
Comment 6 Zan Dobersek 2014-06-07 06:11:02 PDT
All reviewed patches have been landed.  Closing bug.