Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 2903773002: Revert of Remove EventSender from ImageLoader (Closed)

Created:
3 years, 7 months ago by yosin_UTC9
Modified:
3 years, 6 months ago
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Remove EventSender from ImageLoader (patchset #10 id:180001 of https://codereview.chromium.org/2863763003/ ) Reason for revert: This patch probably causes object leaks: See details in "webkit_tests" of https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/4925 Original issue's description: > Remove EventSender from ImageLoader > > Instead of using EventSender, this CL schedules ImageLoader's > load and error events using PostCancellableTask. > has_pending_load_event_ and has_pending_error_event_ booleans are > replaced with TaskHandle to the cancellable tasks and IsActive() calls. > > This CL removes the dependencies between Document's load event and > <img> load events via EventSender. > > This CL removes EventSender.h as ImageLoader was the last user of that. > > Test changes: > stop-loading.html: > testharness.js waits for the window load event before finishing. > Previously, we call window.stop() in <img> load event, but window > load event is fired, because the <img> load event is fired from > Document::ImplicitClose() via EventSender. At that time window.stop() > doesn't stop the window load event. > After this CL, <img> load event is fired separately from > Document::ImplicitClose(), and thus window.stop() stops the window > load event. > To work around this, this CL triggers window load event explicitly > just to signal testharness.js to finish. > > http/tests/loading/preload-image-sizes-2x.html and > http/tests/loading/preload-picture-sizes-2x.html: > The tests uses srcset-helper.js that reloads the page with empty > cache in the window load event. > Because this CL changes the timing of the window load event, this > causes some asynchronous tasks that cause new image loading to be > scheduled before window load event and executed after that, causing > some images left on the cache before reloading starts. > This CL works around the issue by waiting a little bit for those > tasks to be executed, and then clearing the cache and reloading the > page. > > BUG=624697, 720268 > > Review-Url: https://codereview.chromium.org/2863763003 > Cr-Commit-Position: refs/heads/master@{#474086} > Committed: https://chromium.googlesource.com/chromium/src/+/da70e32d811fffe4e15728ba858dbdfa3180ed59 TBR=japhet@chromium.org,yhirano@chromium.org,kinuko@chromium.org,kouhei@chromium.org,tzik@chromium.org,hiroshige@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=624697, 720268 Review-Url: https://codereview.chromium.org/2903773002 Cr-Commit-Position: refs/heads/master@{#474154} Committed: https://chromium.googlesource.com/chromium/src/+/8e7dc7edbcacdd495eb18ff33fe88d1fb89a15d5

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -77 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html View 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/resources/srcset-helper.js View 1 chunk +5 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/core/events/EventSender.h View 1 chunk +120 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/ImageLoader.h View 5 chunks +16 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/ImageLoader.cpp View 16 chunks +76 lines, -54 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
yosin_UTC9
Created Revert of Remove EventSender from ImageLoader
3 years, 7 months ago (2017-05-24 04:06:13 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2903773002/1
3 years, 7 months ago (2017-05-24 04:07:00 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/8e7dc7edbcacdd495eb18ff33fe88d1fb89a15d5
3 years, 7 months ago (2017-05-24 04:07:49 UTC) #6
hiroshige
lgtm
3 years, 6 months ago (2017-05-26 21:23:06 UTC) #7
hiroshige
3 years, 6 months ago (2017-05-26 21:24:27 UTC) #8
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/2906063003/ by hiroshige@chromium.org.

The reason for reverting is: Trying reland with fixes..

Powered by Google App Engine
This is Rietveld 408576698