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

Issue 22909013: Notification should not leak document. (Closed)

Created:
7 years, 4 months ago by kouhei (in TOK)
Modified:
7 years, 4 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, eae+blinkwatch, abarth-chromium
Visibility:
Public.

Description

Notification should not leak document. The notification object was leaking the source document. The notification are setPendingActivity() when show()-ed, but the code path to the finalize() method, which calls unsetPendingActivity() internally, is corrupted. The dispatch*Event() functions was skipped from WebNotification* impl, it called dispatchEvent directly. This patch changes WebNotification to not call dispatchEvent() directly, but use dispatch{Click,Close,Error,Show}Event() methods. This avoids code duplication. BUG=270000 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156610

Patch Set 1 #

Patch Set 2 : add test expectation #

Total comments: 4

Patch Set 3 : ActiveDOMObject / leak fix only #

Patch Set 4 : update testexp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -26 lines) Patch
A + LayoutTests/fast/notifications/notifications-leak-document.html View 1 2 1 chunk +3 lines, -6 lines 0 comments Download
A + LayoutTests/fast/notifications/notifications-leak-document-expected.txt View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/notifications/resources/notification-show.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/notifications/Notification.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/notifications/Notification.cpp View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M Source/web/WebNotification.cpp View 1 chunk +4 lines, -19 lines 0 comments Download
M public/web/WebNotification.h View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
kouhei (in TOK)
abarth, haraken: PTAL
7 years, 4 months ago (2013-08-16 08:45:08 UTC) #1
haraken
I'd like to delegate the review to Notification experts. > a) Notification is made a ...
7 years, 4 months ago (2013-08-16 14:58:03 UTC) #2
kouhei (in TOK)
Thanks for your comments. > I don't fully understand this part. The reason we're using ...
7 years, 4 months ago (2013-08-20 00:58:56 UTC) #3
haraken
johnnyg, atwilson: Would you mind taking a look at this change? We're not sure if ...
7 years, 4 months ago (2013-08-20 02:50:21 UTC) #4
Andrew T Wilson (Slow)
On 2013/08/20 02:50:21, haraken wrote: > johnnyg, atwilson: Would you mind taking a look at ...
7 years, 4 months ago (2013-08-20 08:50:10 UTC) #5
johnnyg
I'm not a great candidate either; it's been several years since I was active in ...
7 years, 4 months ago (2013-08-20 09:21:06 UTC) #6
haraken
johnnyg, atwilson: Thanks! dimich: Would you mind taking a look?
7 years, 4 months ago (2013-08-20 09:24:39 UTC) #7
abarth-chromium
The Notification object needs to be an ActiveDOMObject. The reason is that we need to ...
7 years, 4 months ago (2013-08-20 19:24:09 UTC) #8
kouhei (in TOK)
Thanks for your comments. I updated the CL with just the leak fix, keeping Notification ...
7 years, 4 months ago (2013-08-22 03:18:47 UTC) #9
haraken
This CL looks safer. LGTM.
7 years, 4 months ago (2013-08-22 03:30:44 UTC) #10
kouhei (in TOK)
Thanks for the review!
7 years, 4 months ago (2013-08-22 03:41:12 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/22909013/15001
7 years, 4 months ago (2013-08-22 03:41:13 UTC) #12
kouhei (in TOK)
abarth: Would you take a look? I updated the patch so it is kept as ...
7 years, 4 months ago (2013-08-22 03:48:23 UTC) #13
abarth-chromium
lgtm
7 years, 4 months ago (2013-08-22 18:46:06 UTC) #14
kouhei (in TOK)
Thanks for the review!
7 years, 4 months ago (2013-08-22 23:37:01 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/22909013/15001
7 years, 4 months ago (2013-08-22 23:37:17 UTC) #16
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=2935
7 years, 4 months ago (2013-08-23 01:28:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/22909013/36001
7 years, 4 months ago (2013-08-23 01:28:53 UTC) #18
commit-bot: I haz the power
7 years, 4 months ago (2013-08-23 03:23:37 UTC) #19
Message was sent while issue was closed.
Change committed as 156610

Powered by Google App Engine
This is Rietveld 408576698