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

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed)

Created:
6 years, 7 months ago by sof
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, webcomponents-bugzilla_chromium.org, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 19

Patch Set 2 : Rebased + smaller tweaks #

Total comments: 3

Patch Set 3 : Weakly refer to Elements from CustomElementUpgradeCandidateMap #

Patch Set 4 : Use LinkedHashSet for ElementSet instead. #

Total comments: 23

Patch Set 5 : Fix non-Oilpan building #

Patch Set 6 : Round of improvements #

Total comments: 9

Patch Set 7 : Switch to only GarbageCollected for a pair of classes #

Patch Set 8 : Declare empty destructors per GC plugin requirements #

Patch Set 9 : Fix compilation issue pointed out by clang #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -122 lines) Patch
A LayoutTests/fast/dom/custom/element-upgrade-no-register-and-leak.html View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/custom/element-upgrade-no-register-and-leak-expected.txt View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/dom/DocumentInit.h View 4 chunks +6 lines, -4 lines 0 comments Download
M Source/core/dom/DocumentInit.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/dom/custom/CustomElementCallbackQueue.h View 3 chunks +7 lines, -4 lines 0 comments Download
M Source/core/dom/custom/CustomElementCallbackQueue.cpp View 2 chunks +8 lines, -3 lines 0 comments Download
M Source/core/dom/custom/CustomElementDescriptor.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskDispatcher.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -5 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -4 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskImportStep.h View 4 chunks +6 lines, -3 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp View 2 chunks +8 lines, -2 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskQueue.h View 2 chunks +10 lines, -5 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskQueue.cpp View 3 chunks +7 lines, -2 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskResolutionStep.h View 3 chunks +7 lines, -4 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskResolutionStep.cpp View 2 chunks +10 lines, -3 lines 0 comments Download
M Source/core/dom/custom/CustomElementMicrotaskStep.h View 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/dom/custom/CustomElementObserver.h View 2 chunks +6 lines, -8 lines 0 comments Download
M Source/core/dom/custom/CustomElementObserver.cpp View 1 2 3 4 5 6 1 chunk +9 lines, -3 lines 0 comments Download
M Source/core/dom/custom/CustomElementRegistrationContext.h View 1 3 chunks +9 lines, -4 lines 0 comments Download
M Source/core/dom/custom/CustomElementRegistrationContext.cpp View 1 2 3 4 4 chunks +17 lines, -8 lines 0 comments Download
M Source/core/dom/custom/CustomElementScheduler.h View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -7 lines 0 comments Download
M Source/core/dom/custom/CustomElementScheduler.cpp View 1 2 3 4 5 6 7 8 8 chunks +16 lines, -11 lines 0 comments Download
M Source/core/dom/custom/CustomElementUpgradeCandidateMap.h View 1 2 3 4 5 1 chunk +12 lines, -10 lines 0 comments Download
M Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp View 1 2 3 4 5 3 chunks +26 lines, -19 lines 0 comments Download
M Source/core/html/imports/HTMLImportLoader.h View 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/html/imports/HTMLImportLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
sof
Please take a look. Points of interest: - The mixed use of CustomElementObserver as a ...
6 years, 7 months ago (2014-05-22 07:49:14 UTC) #1
haraken
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/Document.cpp#newcode626 Source/core/dom/Document.cpp:626: m_registrationContext.clear(); Do we still need to clear m_registrationContext in ...
6 years, 7 months ago (2014-05-22 08:24:09 UTC) #2
Mads Ager (chromium)
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp File Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp#newcode46 Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp:46: // With Oilpan enabled, the observer table keeps a ...
6 years, 7 months ago (2014-05-22 08:33:27 UTC) #3
haraken
+dominicc
6 years, 7 months ago (2014-05-22 08:34:39 UTC) #4
wibling-chromium
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h File Source/core/dom/custom/CustomElementUpgradeCandidateMap.h (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementUpgradeCandidateMap.h#newcode73 Source/core/dom/custom/CustomElementUpgradeCandidateMap.h:73: typedef WillBeHeapHashMap<CustomElementDescriptor, ElementSet> UnresolvedDefinitionMap; On 2014/05/22 08:24:10, haraken wrote: ...
6 years, 7 months ago (2014-05-22 09:06:04 UTC) #5
sof
Sorry about the delay, got busy elsewhere. An interesting issue here wrt weak hash tables, ...
6 years, 7 months ago (2014-05-25 16:30:01 UTC) #6
haraken
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementDescriptor.h File Source/core/dom/custom/CustomElementDescriptor.h (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementDescriptor.h#newcode45 Source/core/dom/custom/CustomElementDescriptor.h:45: ALLOW_ONLY_INLINE_ALLOCATION(); On 2014/05/25 16:30:01, sof wrote: > On 2014/05/22 ...
6 years, 7 months ago (2014-05-26 01:21:39 UTC) #7
dominicc (has gone to gerrit)
I think I have template blindness... and one question inline. https://codereview.chromium.org/296703009/diff/20001/Source/core/dom/Document.h File Source/core/dom/Document.h (right): https://codereview.chromium.org/296703009/diff/20001/Source/core/dom/Document.h#newcode1371 ...
6 years, 7 months ago (2014-05-26 02:28:58 UTC) #8
Mads Ager (chromium)
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp File Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp#newcode46 Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp:46: // With Oilpan enabled, the observer table keeps a ...
6 years, 7 months ago (2014-05-26 10:08:25 UTC) #9
zerny-chromium
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementDescriptor.h File Source/core/dom/custom/CustomElementDescriptor.h (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/custom/CustomElementDescriptor.h#newcode45 Source/core/dom/custom/CustomElementDescriptor.h:45: ALLOW_ONLY_INLINE_ALLOCATION(); On 2014/05/26 01:21:40, haraken wrote: > On 2014/05/25 ...
6 years, 7 months ago (2014-05-26 11:01:00 UTC) #10
sof
Switching to a 'weaker' CustomElementUpgradeCandidateMap required changing the ElementSet representation to a (Heap)LinkedHashSet (of weak ...
6 years, 7 months ago (2014-05-26 14:21:24 UTC) #11
Mads Ager (chromium)
LGTM HeapLinkedHashSet and HeapListHashSet should perform equally well so this should be fine. HeapLinkedHashSet supports ...
6 years, 7 months ago (2014-05-26 14:30:38 UTC) #12
sof
On 2014/05/26 14:30:38, Mads Ager (chromium) wrote: > LGTM > > HeapLinkedHashSet and HeapListHashSet should ...
6 years, 7 months ago (2014-05-26 14:36:52 UTC) #13
haraken
https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp File Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp (right): https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp#newcode92 Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp:92: for (WillBeHeapVector<RawPtrWillBeMember<CustomElementCallbackQueue> >::iterator it = m_elements.begin();it != m_elements.end(); ++it) ...
6 years, 7 months ago (2014-05-26 15:40:23 UTC) #14
sof
https://codereview.chromium.org/296703009/diff/1/Source/core/dom/DocumentInit.h File Source/core/dom/DocumentInit.h (right): https://codereview.chromium.org/296703009/diff/1/Source/core/dom/DocumentInit.h#newcode84 Source/core/dom/DocumentInit.h:84: WeakPtr<Document> m_contextDocument; On 2014/05/22 08:24:10, haraken wrote: > > ...
6 years, 7 months ago (2014-05-26 15:46:17 UTC) #15
sof
https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp File Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp (right): https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp#newcode92 Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp:92: for (WillBeHeapVector<RawPtrWillBeMember<CustomElementCallbackQueue> >::iterator it = m_elements.begin();it != m_elements.end(); ++it) ...
6 years, 7 months ago (2014-05-26 16:41:07 UTC) #16
sof
https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementObserver.cpp File Source/core/dom/custom/CustomElementObserver.cpp (right): https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementObserver.cpp#newcode40 Source/core/dom/custom/CustomElementObserver.cpp:40: typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<Element>, RawPtrWillBeMember<CustomElementObserver> > ElementObserverMap; On 2014/05/26 16:41:08, sof ...
6 years, 7 months ago (2014-05-26 19:25:36 UTC) #17
haraken
Thanks for the update! Here is a final round of comments. https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp File Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp (right): ...
6 years, 7 months ago (2014-05-27 01:08:44 UTC) #18
sof
https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp File Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp (right): https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp#newcode50 Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp:50: unobserve(*it); On 2014/05/27 01:08:45, haraken wrote: > On 2014/05/26 ...
6 years, 7 months ago (2014-05-27 05:29:50 UTC) #19
haraken
LGTM https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp File Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp (right): https://codereview.chromium.org/296703009/diff/50001/Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp#newcode50 Source/core/dom/custom/CustomElementUpgradeCandidateMap.cpp:50: unobserve(*it); On 2014/05/27 05:29:51, sof wrote: > On ...
6 years, 7 months ago (2014-05-27 05:47:29 UTC) #20
sof
dominicc: some representation changes made in the end to CustomElementUpgradeCandidateMap (non Oilpan), are they acceptable? ...
6 years, 7 months ago (2014-05-27 11:59:13 UTC) #21
dominicc (has gone to gerrit)
Sure. I didn't follow all the twists and turns of why these are necessary but ...
6 years, 7 months ago (2014-05-28 07:57:44 UTC) #22
sof
On 2014/05/28 07:57:44, dominicc wrote: > Sure. I didn't follow all the twists and turns ...
6 years, 7 months ago (2014-05-28 08:09:31 UTC) #23
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 7 months ago (2014-05-28 08:09:59 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/296703009/140001
6 years, 7 months ago (2014-05-28 08:10:18 UTC) #25
dominicc (has gone to gerrit)
lgtm
6 years, 7 months ago (2014-05-28 08:11:43 UTC) #26
dominicc (has gone to gerrit)
lgtm
6 years, 7 months ago (2014-05-28 08:11:46 UTC) #27
commit-bot: I haz the power
6 years, 7 months ago (2014-05-28 09:03:53 UTC) #28
Message was sent while issue was closed.
Change committed as 174948

Powered by Google App Engine
This is Rietveld 408576698