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

Issue 181153003: Make Event RefCountedGarbageCollected and implement trace() methods to the Event hierarcy (Closed)

Created:
6 years, 10 months ago by haraken
Modified:
6 years, 9 months ago
CC:
blink-reviews, shans, eae+blinkwatch, fs, eric.carlson_apple.com, apavlov+blink_chromium.org, adamk+blink_chromium.org, aandrey+blink_chromium.org, dino_apple.com, rwlbuis, jsbell+serviceworker_chromium.org, Steve Block, ericu+idb_chromium.org, alancutter (OOO until 2018), mvanouwerkerk+watch_chromium.org, alecflett, dglazkov+blink, dstockwell, Timothy Loh, Rik, pdr., rune+blink, Eric Willigers, nessy, rjwright, philipj_slow, timvolodine, Raymond Toy, feature-media-reviews_chromium.org, tommyw+watchlist_chromium.org, krit, gyuyoung.kim_webkit.org, darktears, jsbell+idb_chromium.org, vcarbune.chromium, alecflett+watch_chromium.org, gasubic, Mike Lawther (Google), ed+blinkwatch_opera.com, f(malita), Inactive, cmumford, dgrogan, Stephen Chennney
Visibility:
Public.

Description

Make Event RefCountedGarbageCollected and implement trace() methods to the Event hierarcy - This CL makes Event RefCountedGarbageCollected. In a next CL, I'll change this to GarbageCollectedFinalized. - This CL just implements trace() methods and doesn't change any RefPtr<XXXEvent> to transition types. I'll do that in a next CL. - This CL changes Persistent handles in the Event hierarchy to Members. - The only raw pointer in the Event hierarchy is Event::m_currentTarget. This raw pointer is no problem because it's cleared after the Event is dispatched. BUG=340522 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167905

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -13 lines) Patch
M Source/core/css/CSSFontFaceLoadEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSFontFaceLoadEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/AutocompleteErrorEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/BeforeLoadEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/BeforeTextInsertedEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/BeforeTextInsertedEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/BeforeUnloadEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/BeforeUnloadEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/ClipboardEvent.h View 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/events/ClipboardEvent.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/events/CompositionEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/CompositionEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/CustomEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/CustomEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/ErrorEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/ErrorEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/Event.h View 2 chunks +3 lines, -1 line 1 comment Download
M Source/core/events/Event.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/events/FocusEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/FocusEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/GestureEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/GestureEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/HashChangeEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/KeyboardEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/KeyboardEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/MessageEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/MessageEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/MouseEvent.h View 2 chunks +5 lines, -1 line 0 comments Download
M Source/core/events/MouseEvent.cpp View 1 2 chunks +11 lines, -0 lines 0 comments Download
M Source/core/events/MouseRelatedEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/MouseRelatedEvent.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/MutationEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/MutationEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/OverflowEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/OverflowEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/PageTransitionEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/PageTransitionEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/PopStateEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/PopStateEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/ProgressEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/ProgressEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/ResourceProgressEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/ResourceProgressEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/SecurityPolicyViolationEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/TextEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/TextEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/TouchEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/TouchEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/TransitionEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/TransitionEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/UIEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/UIEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/WebKitAnimationEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/WebKitAnimationEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/WheelEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/WheelEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/MediaKeyEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/MediaKeyEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/canvas/WebGLContextEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/canvas/WebGLContextEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/track/TrackEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/track/TrackEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/speech/SpeechInputEvent.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/speech/SpeechInputEvent.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/storage/StorageEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/storage/StorageEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/svg/SVGZoomEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/svg/SVGZoomEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/xml/XMLHttpRequestProgressEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/device_orientation/DeviceMotionEvent.h View 1 chunk +6 lines, -5 lines 0 comments Download
M Source/modules/device_orientation/DeviceMotionEvent.cpp View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/modules/device_orientation/DeviceOrientationEvent.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/modules/device_orientation/DeviceOrientationEvent.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/modules/encryptedmedia/MediaKeyMessageEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/encryptedmedia/MediaKeyMessageEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/encryptedmedia/MediaKeyNeededEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/encryptedmedia/MediaKeyNeededEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/indexeddb/IDBVersionChangeEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/indexeddb/IDBVersionChangeEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/mediastream/MediaStreamEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/mediastream/MediaStreamEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/mediastream/MediaStreamTrackEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/mediastream/MediaStreamTrackEvent.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M Source/modules/mediastream/RTCDTMFToneChangeEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/mediastream/RTCDTMFToneChangeEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/mediastream/RTCDataChannelEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/mediastream/RTCDataChannelEvent.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M Source/modules/mediastream/RTCIceCandidateEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/mediastream/RTCIceCandidateEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/InstallEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/InstallEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/InstallPhaseEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/InstallPhaseEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/speech/SpeechRecognitionEvent.h View 1 chunk +3 lines, -1 line 0 comments Download
M Source/modules/speech/SpeechRecognitionEvent.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/modules/speech/SpeechSynthesisEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/speech/SpeechSynthesisEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/webaudio/AudioProcessingEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/webaudio/AudioProcessingEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/webaudio/OfflineAudioCompletionEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/webaudio/OfflineAudioCompletionEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/webmidi/MIDIConnectionEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/webmidi/MIDIMessageEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/websockets/CloseEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
haraken
PTAL I implemented the trace methods carefully, but I'd be happy if reviewers double-check that ...
6 years, 10 months ago (2014-02-26 08:05:33 UTC) #1
tkent
https://codereview.chromium.org/181153003/diff/1/Source/modules/device_orientation/DeviceMotionEvent.h File Source/modules/device_orientation/DeviceMotionEvent.h (right): https://codereview.chromium.org/181153003/diff/1/Source/modules/device_orientation/DeviceMotionEvent.h#newcode67 Source/modules/device_orientation/DeviceMotionEvent.h:67: RefPtrWillBeMember<DeviceMotionData> m_deviceMotionData; I have a concern about changes like ...
6 years, 10 months ago (2014-02-26 08:14:02 UTC) #2
haraken
https://codereview.chromium.org/181153003/diff/1/Source/modules/device_orientation/DeviceMotionEvent.h File Source/modules/device_orientation/DeviceMotionEvent.h (right): https://codereview.chromium.org/181153003/diff/1/Source/modules/device_orientation/DeviceMotionEvent.h#newcode67 Source/modules/device_orientation/DeviceMotionEvent.h:67: RefPtrWillBeMember<DeviceMotionData> m_deviceMotionData; On 2014/02/26 08:14:03, tkent wrote: > I ...
6 years, 10 months ago (2014-02-26 08:18:29 UTC) #3
haraken
I'm afraid that we've already replaced a bunch of RefPtrWillBePersistent<>s with RefPtrWillBeMember<>s, so we've already ...
6 years, 10 months ago (2014-02-26 08:21:09 UTC) #4
Mads Ager (chromium)
On 2014/02/26 08:18:29, haraken wrote: > https://codereview.chromium.org/181153003/diff/1/Source/modules/device_orientation/DeviceMotionEvent.h > File Source/modules/device_orientation/DeviceMotionEvent.h (right): > > https://codereview.chromium.org/181153003/diff/1/Source/modules/device_orientation/DeviceMotionEvent.h#newcode67 > ...
6 years, 10 months ago (2014-02-26 08:42:31 UTC) #5
haraken
> I don't think PersistentWillBeMember will be a problem. We can do that since it ...
6 years, 10 months ago (2014-02-26 08:47:36 UTC) #6
Mads Ager (chromium)
LGTM with two missing trace calls fixed. https://codereview.chromium.org/181153003/diff/1/Source/core/events/MouseEvent.cpp File Source/core/events/MouseEvent.cpp (right): https://codereview.chromium.org/181153003/diff/1/Source/core/events/MouseEvent.cpp#newcode193 Source/core/events/MouseEvent.cpp:193: void MouseEvent::trace(Visitor* ...
6 years, 10 months ago (2014-02-26 09:03:51 UTC) #7
tkent
> > I don't think we can address it. Going forward we will have to ...
6 years, 10 months ago (2014-02-26 09:09:27 UTC) #8
haraken
> LGTM with two missing trace calls fixed. Thanks for reading! I'm thinking about how ...
6 years, 10 months ago (2014-02-26 09:12:12 UTC) #9
Mads Ager (chromium)
On 2014/02/26 09:09:27, tkent wrote: > > > I don't think we can address it. ...
6 years, 10 months ago (2014-02-26 09:17:36 UTC) #10
Mads Ager (chromium)
On 2014/02/26 09:17:36, Mads Ager (chromium) wrote: > On 2014/02/26 09:09:27, tkent wrote: > > ...
6 years, 10 months ago (2014-02-26 09:19:29 UTC) #11
haraken
> Yeah, PersistentWillBeMember should work. I'm afraid we'll waste our time to > change types ...
6 years, 10 months ago (2014-02-26 09:21:53 UTC) #12
Mads Ager (chromium)
On 2014/02/26 09:12:12, haraken wrote: > > LGTM with two missing trace calls fixed. > ...
6 years, 10 months ago (2014-02-26 09:23:31 UTC) #13
haraken
On 2014/02/26 09:23:31, Mads Ager (chromium) wrote: > On 2014/02/26 09:12:12, haraken wrote: > > ...
6 years, 10 months ago (2014-02-26 10:36:03 UTC) #14
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 10 months ago (2014-02-26 11:16:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/181153003/20001
6 years, 10 months ago (2014-02-26 11:17:03 UTC) #16
commit-bot: I haz the power
Change committed as 167905
6 years, 10 months ago (2014-02-26 12:40:34 UTC) #17
Erik Corry
https://codereview.chromium.org/181153003/diff/20001/Source/core/events/Event.h File Source/core/events/Event.h (right): https://codereview.chromium.org/181153003/diff/20001/Source/core/events/Event.h#newcode207 Source/core/events/Event.h:207: RefPtr<Event> m_underlyingEvent; I wonder why this was not a ...
6 years, 9 months ago (2014-02-28 14:08:51 UTC) #18
Erik Corry
6 years, 9 months ago (2014-02-28 14:08:55 UTC) #19
haraken
6 years, 9 months ago (2014-02-28 14:12:40 UTC) #20
Message was sent while issue was closed.
On 2014/02/28 14:08:51, Erik Corry wrote:
>
https://codereview.chromium.org/181153003/diff/20001/Source/core/events/Event.h
> File Source/core/events/Event.h (right):
> 
>
https://codereview.chromium.org/181153003/diff/20001/Source/core/events/Event...
> Source/core/events/Event.h:207: RefPtr<Event> m_underlyingEvent;
> I wonder why this was not a traced Member?

It's just because I wanted to do that in a next CL. There are a ton of
RefPtr<Event>s, so I need to do that incrementally.

It looks like Event changes caused several crashes. So I'll investigate them
before committing more things to Events.

Powered by Google App Engine
This is Rietveld 408576698