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

Issue 304003002: Don't mutate the DOM from inside an Element's constructor (Closed)

Created:
6 years, 6 months ago by esprehn
Modified:
6 years, 6 months ago
Reviewers:
Hajime Morrita, ojan
CC:
blink-reviews, philipj_slow, feature-media-reviews_chromium.org, gasubic, sof, eae+blinkwatch, fs, eric.carlson_apple.com, vcarbune.chromium, blink-reviews-dom_chromium.org, dglazkov+blink, nessy, blink-reviews-html_chromium.org, rwlbuis
Visibility:
Public.

Description

Don't mutate the DOM from inside an Element's constructor We shouldn't call ensureUserAgentShadowRoot() from inside an element's constructor since not all constructors in the inheritance chain may have run, and also since it means going into DOM methods that may want to ref |this| before it's ever been adopted. This patch fixes this and also fixes the RefPtr protects inside notifyNodeInserted. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175077

Patch Set 1 #

Patch Set 2 : Fix includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -16 lines) Patch
M Source/core/dom/ContainerNode.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLAudioElement.cpp View 1 2 chunks +6 lines, -3 lines 0 comments Download
M Source/core/html/HTMLKeygenElement.h View 1 chunk +1 line, -4 lines 0 comments Download
M Source/core/html/HTMLKeygenElement.cpp View 1 chunk +7 lines, -1 line 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/html/HTMLVideoElement.cpp View 1 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
esprehn
6 years, 6 months ago (2014-05-29 01:12:17 UTC) #1
Hajime Morrita
On 2014/05/29 01:12:17, esprehn wrote: lgtm.
6 years, 6 months ago (2014-05-29 01:42:32 UTC) #2
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 6 months ago (2014-05-29 01:42:36 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/304003002/1
6 years, 6 months ago (2014-05-29 01:43:02 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_compile_dbg on tryserver.blink ...
6 years, 6 months ago (2014-05-29 03:35:52 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-29 04:17:35 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/13436)
6 years, 6 months ago (2014-05-29 04:17:36 UTC) #7
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 6 months ago (2014-05-29 05:51:12 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/304003002/1
6 years, 6 months ago (2014-05-29 05:51:38 UTC) #9
esprehn
The CQ bit was unchecked by esprehn@chromium.org
6 years, 6 months ago (2014-05-29 07:05:26 UTC) #10
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 6 months ago (2014-05-29 07:10:53 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/304003002/20001
6 years, 6 months ago (2014-05-29 07:11:38 UTC) #12
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 00:30:53 UTC) #13
Message was sent while issue was closed.
Change committed as 175077

Powered by Google App Engine
This is Rietveld 408576698