WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158222
Use more references in ResourceLoader related code
https://bugs.webkit.org/show_bug.cgi?id=158222
Summary
Use more references in ResourceLoader related code
youenn fablet
Reported
2016-05-31 01:18:15 PDT
We should use more references in ResourceLoader related code
Attachments
Patch
(46.73 KB, patch)
2016-05-31 01:27 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Fixing mac build
(46.89 KB, patch)
2016-05-31 01:45 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(50.42 KB, patch)
2016-05-31 02:50 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-yosemite
(645.21 KB, application/zip)
2016-05-31 03:24 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(267.74 KB, application/zip)
2016-05-31 03:26 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews124 for ios-simulator-wk2
(672.56 KB, application/zip)
2016-05-31 03:30 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews114 for mac-yosemite
(397.85 KB, application/zip)
2016-05-31 03:30 PDT
,
Build Bot
no flags
Details
Fixing counter issue
(49.46 KB, patch)
2016-05-31 05:39 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Fixing changelog
(49.42 KB, patch)
2016-05-31 05:41 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-yosemite
(918.35 KB, application/zip)
2016-05-31 06:19 PDT
,
Build Bot
no flags
Details
Fixing according comments
(49.53 KB, patch)
2016-06-01 02:10 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(51.62 KB, patch)
2016-06-02 00:42 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(51.62 KB, patch)
2016-06-02 01:13 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(11)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2016-05-31 01:27:20 PDT
Created
attachment 280124
[details]
Patch
youenn fablet
Comment 2
2016-05-31 01:45:59 PDT
Created
attachment 280126
[details]
Fixing mac build
youenn fablet
Comment 3
2016-05-31 02:50:50 PDT
Created
attachment 280130
[details]
Patch
Build Bot
Comment 4
2016-05-31 03:23:57 PDT
Comment on
attachment 280130
[details]
Patch
Attachment 280130
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1411707
Number of test failures exceeded the failure limit.
Build Bot
Comment 5
2016-05-31 03:24:00 PDT
Created
attachment 280131
[details]
Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 6
2016-05-31 03:26:21 PDT
Comment on
attachment 280130
[details]
Patch
Attachment 280130
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1411718
Number of test failures exceeded the failure limit.
Build Bot
Comment 7
2016-05-31 03:26:24 PDT
Created
attachment 280132
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 8
2016-05-31 03:29:58 PDT
Comment on
attachment 280130
[details]
Patch
Attachment 280130
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1411708
Number of test failures exceeded the failure limit.
Build Bot
Comment 9
2016-05-31 03:30:00 PDT
Created
attachment 280134
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Build Bot
Comment 10
2016-05-31 03:30:06 PDT
Comment on
attachment 280130
[details]
Patch
Attachment 280130
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1411710
Number of test failures exceeded the failure limit.
Build Bot
Comment 11
2016-05-31 03:30:08 PDT
Created
attachment 280135
[details]
Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
youenn fablet
Comment 12
2016-05-31 05:39:25 PDT
Created
attachment 280141
[details]
Fixing counter issue
youenn fablet
Comment 13
2016-05-31 05:41:01 PDT
Created
attachment 280142
[details]
Fixing changelog
Build Bot
Comment 14
2016-05-31 06:19:50 PDT
Comment on
attachment 280142
[details]
Fixing changelog
Attachment 280142
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1412330
Number of test failures exceeded the failure limit.
Build Bot
Comment 15
2016-05-31 06:19:53 PDT
Created
attachment 280143
[details]
Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
youenn fablet
Comment 16
2016-05-31 06:40:44 PDT
(In reply to
comment #15
)
> Created
attachment 280143
[details]
> Archive of layout-test-results from ews102 for mac-yosemite > > The attached test failures were seen while running run-webkit-tests on the > mac-ews. > Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Mac bot errors are due to issues with wpt server (see
bug 158137
) and are unrelated to this patch. DEBUG:web-platform-tests:Traceback (most recent call last): File "/Volumes/Data/EWS/WebKit/LayoutTests/imported/w3c/web-platform-tests/tools/wptserve/wptserve/handlers.py", line 133, in __call__ data = self.get_data(response, path, byte_ranges) File "/Volumes/Data/EWS/WebKit/LayoutTests/imported/w3c/web-platform-tests/tools/wptserve/wptserve/handlers.py", line 183, in get_data return open(path, 'rb') IOError: [Errno 24] Too many open files: '/Volumes/Data/EWS/WebKit/LayoutTests/imported/w3c/web-platform-tests/resources/testharness.js'
Darin Adler
Comment 17
2016-05-31 10:16:01 PDT
Comment on
attachment 280142
[details]
Fixing changelog View in context:
https://bugs.webkit.org/attachment.cgi?id=280142&action=review
> Source/WebCore/loader/cache/CachedResource.cpp:221 > if (cachedResourceLoader.frame()->page() && cachedResourceLoader.frame()->page()->inPageCache()) {
This code should use the new local variable, frame.
> Source/WebCore/loader/cache/CachedResourceLoader.cpp:1015 > +void CachedResourceLoader::incrementRequestCount(const CachedResource& res)
Should rename "res" to "resource" when touching this code.
youenn fablet
Comment 18
2016-06-01 02:10:56 PDT
Created
attachment 280225
[details]
Fixing according comments
youenn fablet
Comment 19
2016-06-01 02:13:44 PDT
Thanks for the review.
> > Source/WebCore/loader/cache/CachedResource.cpp:221 > > if (cachedResourceLoader.frame()->page() && cachedResourceLoader.frame()->page()->inPageCache()) { > > This code should use the new local variable, frame.
Done
> > Source/WebCore/loader/cache/CachedResourceLoader.cpp:1015 > > +void CachedResourceLoader::incrementRequestCount(const CachedResource& res) > > Should rename "res" to "resource" when touching this code.
Done
Alex Christensen
Comment 20
2016-06-01 09:56:02 PDT
Comment on
attachment 280225
[details]
Fixing according comments View in context:
https://bugs.webkit.org/attachment.cgi?id=280225&action=review
> Source/WebCore/css/CSSFontFaceSource.cpp:127 > - fontSelector.beginLoadingFontSoon(m_font.get()); > + fontSelector.beginLoadingFontSoon(*m_font);
I don't think m_font is guaranteed to not be null.
> Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp:298 > for (HashMap<unsigned long, RefPtr<WebResourceLoader>>::iterator i = m_webResourceLoaders.begin(); i != end; ++i)
This should be made into a c++11-style forloop.
youenn fablet
Comment 21
2016-06-01 11:09:21 PDT
(In reply to
comment #20
)
> Comment on
attachment 280225
[details]
> Fixing according comments > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=280225&action=review
> > > Source/WebCore/css/CSSFontFaceSource.cpp:127 > > - fontSelector.beginLoadingFontSoon(m_font.get()); > > + fontSelector.beginLoadingFontSoon(*m_font); > > I don't think m_font is guaranteed to not be null.
If m_font is null, status is set to Success and load() will not be called. But I agree it may be easy to break that assumption. I will add an ASSERT(m_font).
> > Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp:298 > > for (HashMap<unsigned long, RefPtr<WebResourceLoader>>::iterator i = m_webResourceLoaders.begin(); i != end; ++i) > > This should be made into a c++11-style forloop.
OK
Darin Adler
Comment 22
2016-06-01 23:12:04 PDT
Comment on
attachment 280225
[details]
Fixing according comments View in context:
https://bugs.webkit.org/attachment.cgi?id=280225&action=review
> Source/WebCore/loader/NetscapePlugInStreamLoader.cpp:60 > RefPtr<NetscapePlugInStreamLoader> loader(adoptRef(new NetscapePlugInStreamLoader(frame, client)));
Should use auto.
> Source/WebCore/loader/ResourceLoader.cpp:63 > + : m_frame(&frame)
m_frame should be a Ref instead a RefPtr, I think
> Source/WebCore/loader/ResourceLoader.cpp:68 > , m_identifier(0) > , m_reachedTerminalState(false) > , m_notifiedLoadComplete(false) > , m_cancellationStatus(NotCancelled)
Should initialize these scalars in the header instead of here. Same for m_resourceType and m_isQuickLookResource.
youenn fablet
Comment 23
2016-06-02 00:42:42 PDT
Created
attachment 280314
[details]
Patch for landing
WebKit Commit Bot
Comment 24
2016-06-02 01:08:05 PDT
Comment on
attachment 280314
[details]
Patch for landing Rejecting
attachment 280314
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: /EWS/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit2.build/Release/WebKit.build/Objects-normal/x86_64/WebPasteboardOverrides.o ** BUILD FAILED ** The following build commands failed: CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit2.build/Release/WebKit.build/Objects-normal/x86_64/WebLoaderStrategy.o WebProcess/Network/WebLoaderStrategy.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Full output:
http://webkit-queues.webkit.org/results/1421983
youenn fablet
Comment 25
2016-06-02 01:13:35 PDT
Created
attachment 280317
[details]
Patch for landing
WebKit Commit Bot
Comment 26
2016-06-02 01:43:55 PDT
Comment on
attachment 280317
[details]
Patch for landing Clearing flags on attachment: 280317 Committed
r201596
: <
http://trac.webkit.org/changeset/201596
>
WebKit Commit Bot
Comment 27
2016-06-02 01:44:01 PDT
All reviewed patches have been landed. Closing bug.
youenn fablet
Comment 28
2016-06-02 08:58:24 PDT
Thanks for both reviews. Except for m_frame which currently needs to be a RefPtr, I integrated all feedback.
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