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

Issue 2893993002: Make ImageLoader have at most one pending error event on EventSender (Closed)

Created:
3 years, 7 months ago by hiroshige
Modified:
3 years, 7 months ago
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ImageLoader have at most one pending error event on EventSender Relanding the CHECK() that asserts ImageLoader::DispatchPendingErrorEvent() should always called when has_pending_error_event_ is true. Previously, we sometimes schedule multiple error events on EventSender: 1. DispatchErrorEvent() is called. 2. DispatchErrorEvent() is called. 3. DispatchPendingErrorEvent() is called (corresponding to Step 1) and actual processing is done. 4. DispatchPendingErrorEvent() is called (corresponding to Step 2) but ignored because has_pending_error_event_ is already false. This CL makes DispatchErrorEvent() cancel previous scheduled error events if any, ensures there can be at most scheduled error event on EventSender, and makes the assertion hold. The scenario above will be processed as follows, and thus this CL shouldn't change any observable behavior. 1. DispatchErrorEvent() is called. 2. DispatchErrorEvent() is called. The error event scheduled by Step 1 is cancelled. 3. DispatchPendingErrorEvent() is called (corresponding to Step 2) and actual processing is done. [1] https://codereview.chromium.org/2859383002/ [2] https://codereview.chromium.org/2884773002/ BUG=624697, 719759, 722500 Review-Url: https://codereview.chromium.org/2893993002 Cr-Commit-Position: refs/heads/master@{#473214} Committed: https://chromium.googlesource.com/chromium/src/+/84fb9e0a3e168b81e538a5ff8ce79e3690396a10

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -6 lines) Patch
A third_party/WebKit/LayoutTests/images/multiple-inflight-error-event-crash.html View 1 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/ImageLoader.cpp View 1 2 2 chunks +8 lines, -6 lines 0 comments Download

Messages

Total messages: 16 (12 generated)
hiroshige
PTAL. I think we can make this cleaner by refactoring DoUpdateFromElement(), but I expect it ...
3 years, 7 months ago (2017-05-18 19:31:27 UTC) #8
kouhei (in TOK)
lgtm
3 years, 7 months ago (2017-05-19 06:15:14 UTC) #11
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/2893993002/40001
3 years, 7 months ago (2017-05-19 16:47:22 UTC) #13
commit-bot: I haz the power
3 years, 7 months ago (2017-05-19 16:53:38 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/84fb9e0a3e168b81e538a5ff8ce7...

Powered by Google App Engine
This is Rietveld 408576698