Bug 300728
| Summary: | Wrong console message's repeat count is updated when messages are mixed from page and Web Workers. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <basuke> |
| Component: | New Bugs | Assignee: | Basuke Suzuki <basuke> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=302749 | ||
| Bug Depends on: | |||
| Bug Blocks: | 301339 | ||
Basuke Suzuki
Console messages are compared in each target in Web Content process. If the message is same with previous message, it sends `messageRepeatCountUpdated` message to the frontend. In frontend, it updates simply previously displayed messageView's repeat count.
If a Worker sends a message, the things get messy. Because comparison happens in each target, they don't know each other. Only checks if the message is same with the one from the target. But that message can be not the one in the frontend.
1. main frame send a message A.
2. Worker send a message B.
3. Now console UI have line A and B.
4. In main frame, send identical message A.
5. Before sending the message, ConsoleAgent compares the one with previously sent message at step 1.
6. Because they are identical, it send `messageRepeatCountUpdated` with count 2.
7. Frontend get `messageRepeatCountUpdated` and it tries to update previous message view, but that is view for B.
8. B has updated with [2] count label.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
rdar://162612099
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/52406
EWS
Committed 301917@main (1a9813d49b1b): <https://commits.webkit.org/301917@main>
Reviewed commits have been landed. Closing PR #52406 and removing active labels.