WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
140048
Clean up OwnPtr in WebCore/loader
https://bugs.webkit.org/show_bug.cgi?id=140048
Summary
Clean up OwnPtr in WebCore/loader
Gyuyoung Kim
Reported
2015-01-02 20:21:47 PST
SSIA
Attachments
WIP
(5.50 KB, patch)
2015-01-02 20:23 PST
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(7.10 KB, patch)
2015-01-04 00:24 PST
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(7.70 KB, patch)
2015-01-04 04:25 PST
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-mountainlion-wk2
(916.99 KB, application/zip)
2015-01-04 05:37 PST
,
Build Bot
no flags
Details
Patch
(9.13 KB, patch)
2015-01-05 19:53 PST
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(9.19 KB, patch)
2015-01-06 08:27 PST
,
Gyuyoung Kim
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-mountainlion
(897.91 KB, application/zip)
2015-01-06 09:33 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-mountainlion-wk2
(910.25 KB, application/zip)
2015-01-06 09:39 PST
,
Build Bot
no flags
Details
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2015-01-02 20:23:38 PST
Created
attachment 243913
[details]
WIP
Gyuyoung Kim
Comment 2
2015-01-04 00:24:48 PST
Created
attachment 243924
[details]
Patch
Gyuyoung Kim
Comment 3
2015-01-04 04:25:46 PST
Created
attachment 243927
[details]
Patch
Build Bot
Comment 4
2015-01-04 05:37:31 PST
Comment on
attachment 243927
[details]
Patch
Attachment 243927
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/6523443113623552
Number of test failures exceeded the failure limit.
Build Bot
Comment 5
2015-01-04 05:37:33 PST
Created
attachment 243928
[details]
Archive of layout-test-results from ews104 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Darin Adler
Comment 6
2015-01-04 13:57:49 PST
Comment on
attachment 243927
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=243927&action=review
> Source/WebCore/loader/cache/MemoryCache.cpp:119 > if (!originMap) { > - originMap = new CachedResourceItem; > - resources.set(resource->url(), adoptPtr(originMap)); > + resources.set(resource->url(), std::make_unique<CachedResourceItem>()); > + originMap = resources.get(resource->url()); > } > originMap->set(resource->cachePartition(), resource);
This does two extra hash table lookups the first time it populates the resources map for any given URL, bloating both code size and execution speed. The existing code was already doing one extra hash lookup, but this patch added yet another. The correct way to write this is: auto& originMap = resources.add(resource->url(), nullptr)->iterator.value; if (!originMap) originMap = std::make_unique<CachedResourceItem>(); originMap->set(resource->cachePartition(), resource);
> Source/WebCore/loader/cache/MemoryCache.cpp:154 > CachedResourceItem* originMap = resources.get(resource->url()); > if (!originMap) { > - originMap = new CachedResourceItem; > - resources.set(resource->url(), adoptPtr(originMap)); > + resources.set(resource->url(), std::make_unique<CachedResourceItem>()); > + originMap = resources.get(resource->url()); > } > originMap->set(resource->cachePartition(), resource);
Ditto.
Gyuyoung Kim
Comment 7
2015-01-05 19:53:29 PST
Created
attachment 244029
[details]
Patch
Gyuyoung Kim
Comment 8
2015-01-06 08:27:30 PST
Created
attachment 244063
[details]
Patch
Build Bot
Comment 9
2015-01-06 09:33:35 PST
Comment on
attachment 244063
[details]
Patch
Attachment 244063
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/6334210612658176
Number of test failures exceeded the failure limit.
Build Bot
Comment 10
2015-01-06 09:33:38 PST
Created
attachment 244067
[details]
Archive of layout-test-results from ews101 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 11
2015-01-06 09:39:37 PST
Comment on
attachment 244063
[details]
Patch
Attachment 244063
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/6682011561361408
Number of test failures exceeded the failure limit.
Build Bot
Comment 12
2015-01-06 09:39:40 PST
Created
attachment 244069
[details]
Archive of layout-test-results from ews104 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug