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

Issue 1472823002: Couple V8AbstractEventListener's lifetime to the V8 listeners lifetime (Closed)

Created:
5 years, 1 month ago by jochen (gone - plz use gerrit)
Modified:
5 years ago
Reviewers:
haraken, sof
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Couple V8AbstractEventListener's lifetime to the V8 listeners lifetime That way, we don't have to mess with the hidden values in the dtor. BUG=558975 R=haraken@chromium.org,sigbjornf@opera.com Committed: https://crrev.com/b6edd389a3d322e70cb3cf7d0c176cec635e34b0 Cr-Commit-Position: refs/heads/master@{#361356}

Patch Set 1 #

Total comments: 8

Patch Set 2 : updates #

Patch Set 3 : oilpan #

Patch Set 4 : updates #

Patch Set 5 : updates #

Patch Set 6 : clean up workers #

Total comments: 1

Patch Set 7 : ignore self refs #

Total comments: 3

Patch Set 8 : manage listeners on workers via a list #

Patch Set 9 : updates #

Total comments: 7

Patch Set 10 : updates #

Total comments: 7

Patch Set 11 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -39 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +55 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.h View 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8EventListener.h View 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp View 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.h View 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 61 (4 generated)
jochen (gone - plz use gerrit)
5 years, 1 month ago (2015-11-23 13:24:09 UTC) #1
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode58 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:58: ASSERT(m_listener.isEmpty()); we never have to clearWrapper, as the wrapper ...
5 years, 1 month ago (2015-11-23 13:26:15 UTC) #2
haraken
Thanks for looking into the work-around! https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode103 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:103: // Balanced in ...
5 years, 1 month ago (2015-11-23 13:40:55 UTC) #3
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode103 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:103: // Balanced in secondWeakCallback xor clearListenerObject. On 2015/11/23 at ...
5 years, 1 month ago (2015-11-23 13:45:21 UTC) #4
sof
https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode104 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:104: ref(); On 2015/11/23 13:40:55, haraken wrote: > On 2015/11/23 ...
5 years, 1 month ago (2015-11-23 13:49:20 UTC) #5
jochen (gone - plz use gerrit)
ptal
5 years, 1 month ago (2015-11-23 14:04:00 UTC) #6
haraken
On 2015/11/23 14:04:00, jochen wrote: > ptal Seems like a bunch of tests are crashing ...
5 years, 1 month ago (2015-11-23 14:31:45 UTC) #7
sof
https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode104 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:104: ref(); On 2015/11/23 13:26:15, jochen wrote: > this won't ...
5 years, 1 month ago (2015-11-23 14:38:05 UTC) #8
sof
On 2015/11/23 14:31:45, haraken wrote: > On 2015/11/23 14:04:00, jochen wrote: > > ptal > ...
5 years, 1 month ago (2015-11-23 14:41:18 UTC) #9
sof
On 2015/11/23 14:41:18, sof wrote: > On 2015/11/23 14:31:45, haraken wrote: > > On 2015/11/23 ...
5 years, 1 month ago (2015-11-23 14:54:21 UTC) #10
jochen (gone - plz use gerrit)
On 2015/11/23 at 14:38:05, sigbjornf wrote: > https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp > File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): > > https://codereview.chromium.org/1472823002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode104 ...
5 years, 1 month ago (2015-11-23 15:04:09 UTC) #11
sof
On 2015/11/23 14:54:21, sof wrote: > On 2015/11/23 14:41:18, sof wrote: > > On 2015/11/23 ...
5 years, 1 month ago (2015-11-23 16:08:36 UTC) #12
jochen (gone - plz use gerrit)
On 2015/11/23 at 16:08:36, sigbjornf wrote: > On 2015/11/23 14:54:21, sof wrote: > > On ...
5 years, 1 month ago (2015-11-23 16:16:45 UTC) #13
sof
On 2015/11/23 15:04:09, jochen wrote: > On 2015/11/23 at 14:38:05, sigbjornf wrote: > > > ...
5 years, 1 month ago (2015-11-23 18:47:24 UTC) #14
jochen (gone - plz use gerrit)
i tried adding some clean-up code, but it still doesn't work :-/ should I try ...
5 years, 1 month ago (2015-11-23 20:15:15 UTC) #15
sof
https://codereview.chromium.org/1472823002/diff/100001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp File third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp (right): https://codereview.chromium.org/1472823002/diff/100001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp#newcode218 third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp:218: if (EventTargetData* eventTargetData = this->eventTargetData()) { The EventTargetData and ...
5 years, 1 month ago (2015-11-23 20:31:18 UTC) #16
jochen (gone - plz use gerrit)
On 2015/11/23 at 20:31:18, sigbjornf wrote: > https://codereview.chromium.org/1472823002/diff/100001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp > File third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp (right): > > https://codereview.chromium.org/1472823002/diff/100001/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp#newcode218 ...
5 years, 1 month ago (2015-11-23 20:52:05 UTC) #17
sof
On 2015/11/23 20:52:05, jochen wrote: > On 2015/11/23 at 20:31:18, sigbjornf wrote: > > > ...
5 years, 1 month ago (2015-11-23 21:41:23 UTC) #18
jochen (gone - plz use gerrit)
On 2015/11/23 at 21:41:23, sigbjornf wrote: > On 2015/11/23 20:52:05, jochen wrote: > > On ...
5 years, 1 month ago (2015-11-23 21:44:09 UTC) #19
jochen (gone - plz use gerrit)
latest patchset: ignore self refs for the assert()
5 years, 1 month ago (2015-11-23 22:50:21 UTC) #20
haraken
On 2015/11/23 21:44:09, jochen wrote: > On 2015/11/23 at 21:41:23, sigbjornf wrote: > > On ...
5 years, 1 month ago (2015-11-24 01:25:11 UTC) #21
sof
Could someone kick off (mac_blink_oilpan_{dbg,rel}) trybots? I've so far been unable to reproduce the failures ...
5 years, 1 month ago (2015-11-24 06:21:55 UTC) #22
haraken
On 2015/11/24 06:21:55, sof wrote: > Could someone kick off (mac_blink_oilpan_{dbg,rel}) trybots? I've so far ...
5 years, 1 month ago (2015-11-24 06:25:51 UTC) #23
jochen (gone - plz use gerrit)
On 2015/11/24 at 01:25:11, haraken wrote: > On 2015/11/23 21:44:09, jochen wrote: > > On ...
5 years, 1 month ago (2015-11-24 07:17:07 UTC) #24
jochen (gone - plz use gerrit)
On 2015/11/24 at 06:21:55, sigbjornf wrote: > Could someone kick off (mac_blink_oilpan_{dbg,rel}) trybots? I've so ...
5 years, 1 month ago (2015-11-24 07:17:37 UTC) #25
haraken
On 2015/11/24 07:17:07, jochen wrote: > On 2015/11/24 at 01:25:11, haraken wrote: > > On ...
5 years, 1 month ago (2015-11-24 07:28:36 UTC) #26
sof
On 2015/11/24 07:28:36, haraken wrote: > On 2015/11/24 07:17:07, jochen wrote: > > On 2015/11/24 ...
5 years, 1 month ago (2015-11-24 07:34:23 UTC) #27
haraken
On 2015/11/24 07:34:23, sof wrote: > On 2015/11/24 07:28:36, haraken wrote: > > On 2015/11/24 ...
5 years, 1 month ago (2015-11-24 07:36:39 UTC) #28
jochen (gone - plz use gerrit)
On 2015/11/24 at 07:28:36, haraken wrote: > On 2015/11/24 07:17:07, jochen wrote: > > On ...
5 years, 1 month ago (2015-11-24 07:38:16 UTC) #29
haraken
> > > > > > > I think the problem here is that if ...
5 years, 1 month ago (2015-11-24 07:45:47 UTC) #30
jochen (gone - plz use gerrit)
On 2015/11/24 at 07:45:47, haraken wrote: > > > > > > > > I ...
5 years, 1 month ago (2015-11-24 07:46:41 UTC) #31
haraken
On 2015/11/24 07:46:41, jochen wrote: > On 2015/11/24 at 07:45:47, haraken wrote: > > > ...
5 years, 1 month ago (2015-11-24 07:52:04 UTC) #32
sof
On 2015/11/24 07:17:37, jochen wrote: > On 2015/11/24 at 06:21:55, sigbjornf wrote: > > Could ...
5 years, 1 month ago (2015-11-24 07:58:13 UTC) #33
sof
On 2015/11/24 06:25:51, haraken wrote: > On 2015/11/24 06:21:55, sof wrote: > > Could someone ...
5 years, 1 month ago (2015-11-24 08:01:48 UTC) #34
sof
https://codereview.chromium.org/1472823002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (left): https://codereview.chromium.org/1472823002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#oldcode58 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:58: if (!m_listener.isEmpty()) { Zooming out here a bit.. simple ...
5 years, 1 month ago (2015-11-24 08:19:04 UTC) #35
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1472823002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (left): https://codereview.chromium.org/1472823002/diff/120001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#oldcode58 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:58: if (!m_listener.isEmpty()) { On 2015/11/24 at 08:19:04, sof wrote: ...
5 years, 1 month ago (2015-11-24 08:24:30 UTC) #36
sof
https://codereview.chromium.org/1472823002/diff/120001/third_party/WebKit/Source/platform/heap/ThreadState.cpp File third_party/WebKit/Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1472823002/diff/120001/third_party/WebKit/Source/platform/heap/ThreadState.cpp#newcode293 third_party/WebKit/Source/platform/heap/ThreadState.cpp:293: ASSERT(currentCount == m_numberOfSelfRefs); If this holds, tell the persistentRegion() ...
5 years, 1 month ago (2015-11-24 08:41:47 UTC) #37
jochen (gone - plz use gerrit)
next attempt: on the main thread, use self-refs. On worker threads, use a central per ...
5 years ago (2015-11-24 10:05:02 UTC) #38
jochen (gone - plz use gerrit)
On 2015/11/24 at 10:05:02, jochen wrote: > next attempt: > > on the main thread, ...
5 years ago (2015-11-24 11:27:54 UTC) #39
sof
just some "surface" issues, i think we should go with this approach. https://codereview.chromium.org/1472823002/diff/90010/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h ...
5 years ago (2015-11-24 12:10:24 UTC) #40
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1472823002/diff/90010/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp File third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp (right): https://codereview.chromium.org/1472823002/diff/90010/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp#newcode215 third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp:215: for (auto it = m_eventListeners.begin(); it != m_eventListeners.end(); ) ...
5 years ago (2015-11-24 12:14:13 UTC) #41
sof
On 2015/11/24 12:14:13, jochen wrote: > https://codereview.chromium.org/1472823002/diff/90010/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp > File third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp (right): > > https://codereview.chromium.org/1472823002/diff/90010/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp#newcode215 > ...
5 years ago (2015-11-24 12:18:27 UTC) #42
jochen (gone - plz use gerrit)
On 2015/11/24 at 12:18:27, sigbjornf wrote: > On 2015/11/24 12:14:13, jochen wrote: > > https://codereview.chromium.org/1472823002/diff/90010/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp ...
5 years ago (2015-11-24 12:21:04 UTC) #43
jochen (gone - plz use gerrit)
On 2015/11/24 at 12:21:04, jochen wrote: > On 2015/11/24 at 12:18:27, sigbjornf wrote: > > ...
5 years ago (2015-11-24 12:28:11 UTC) #44
jochen (gone - plz use gerrit)
addressed all remaining comments
5 years ago (2015-11-24 12:30:39 UTC) #45
sof
On 2015/11/24 12:28:11, jochen wrote: > On 2015/11/24 at 12:21:04, jochen wrote: > > On ...
5 years ago (2015-11-24 12:37:23 UTC) #46
sof
lgtm. haraken@: if we run into other instances of weak callbacks not being run upon ...
5 years ago (2015-11-24 12:45:19 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472823002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472823002/160001
5 years ago (2015-11-24 12:49:13 UTC) #49
haraken
LGTM with comments. https://codereview.chromium.org/1472823002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode107 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:107: if (m_workerGlobalScope) { I'd prefer using ...
5 years ago (2015-11-24 13:16:00 UTC) #50
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1472823002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp (right): https://codereview.chromium.org/1472823002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode201 third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp:201: m_workerGlobalScope->deregisterEventListener(this); On 2015/11/24 at 13:16:00, haraken wrote: > We ...
5 years ago (2015-11-24 13:21:03 UTC) #52
jochen (gone - plz use gerrit)
added the comment and moved the addition to the set outside of the release_assert
5 years ago (2015-11-24 13:25:04 UTC) #53
jochen (gone - plz use gerrit)
I tried isMainThread() but if we'd ever get in one of those places with m_workerGlobalScope ...
5 years ago (2015-11-24 13:27:04 UTC) #54
haraken
On 2015/11/24 13:21:03, jochen wrote: > https://codereview.chromium.org/1472823002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp > File third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp > (right): > > https://codereview.chromium.org/1472823002/diff/160001/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp#newcode201 ...
5 years ago (2015-11-24 13:32:42 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1472823002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1472823002/180001
5 years ago (2015-11-24 13:35:29 UTC) #58
commit-bot: I haz the power
Committed patchset #11 (id:180001)
5 years ago (2015-11-24 16:25:26 UTC) #59
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/b6edd389a3d322e70cb3cf7d0c176cec635e34b0 Cr-Commit-Position: refs/heads/master@{#361356}
5 years ago (2015-11-24 16:26:14 UTC) #60
sof
5 years ago (2015-11-24 20:21:37 UTC) #61
Message was sent while issue was closed.
The Oilpan leak and ASan bots are all green again with this one on board.

Powered by Google App Engine
This is Rietveld 408576698