Bug 133374 - Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
Summary: Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-29 03:55 PDT by Zan Dobersek
Modified: 2014-06-07 06:11 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.29 KB, patch)
2014-05-29 04:03 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (9.13 KB, patch)
2014-06-05 01:39 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.