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

Issue 221673003: Defer iframe JavaScript URL evaluation (Closed)

Created:
6 years, 8 months ago by Hajime Morrita
Modified:
6 years, 8 months ago
CC:
blink-reviews, Nate Chapin, gavinp+loader_chromium.org, sof, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, rwlbuis, mkwst+watchlist_chromium.org, Inactive
Visibility:
Public.

Description

Make StyleElement robust against tree mutation It is possible that HTMLStyleElement::removedFrom() is called before HTMLStyleElement::didNotifySubtreeInsertionsToDocument(). BUG=356653 TEST=append-child-style-crash.html,javascript-url-style-crash.html R=esprehn@chromium.org, abath@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170702

Patch Set 1 #

Total comments: 2

Patch Set 2 : What Elliott said #

Total comments: 2

Patch Set 3 : Fixed typo #

Total comments: 1

Patch Set 4 : Removed redundant check #

Total comments: 3

Patch Set 5 : Landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -7 lines) Patch
A LayoutTests/fast/dom/HTMLScriptElement/append-child-style-crash.html View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLScriptElement/append-child-style-crash-expected.txt View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/fast/frames/javascript-url-style-crash.html View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
A + LayoutTests/fast/frames/javascript-url-style-crash-expected.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/StyleElement.cpp View 1 2 chunks +6 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Hajime Morrita
PTAL? I know this isn't ideal, but I have no better idea. This is severe ...
6 years, 8 months ago (2014-04-02 00:44:47 UTC) #1
abarth-chromium
https://codereview.chromium.org/221673003/diff/1/LayoutTests/fast/frames/adopt-from-created-document.html File LayoutTests/fast/frames/adopt-from-created-document.html (right): https://codereview.chromium.org/221673003/diff/1/LayoutTests/fast/frames/adopt-from-created-document.html#newcode17 LayoutTests/fast/frames/adopt-from-created-document.html:17: </script> I'm worried that we're going to break web ...
6 years, 8 months ago (2014-04-02 00:54:57 UTC) #2
esprehn
This doesn't seem right, why is a javascript url any different than an inline <script> ...
6 years, 8 months ago (2014-04-02 00:59:32 UTC) #3
abarth-chromium
https://codereview.chromium.org/221673003/diff/1/Source/core/html/HTMLFrameJavaScriptURLOpener.cpp File Source/core/html/HTMLFrameJavaScriptURLOpener.cpp (right): https://codereview.chromium.org/221673003/diff/1/Source/core/html/HTMLFrameJavaScriptURLOpener.cpp#newcode55 Source/core/html/HTMLFrameJavaScriptURLOpener.cpp:55: m_element->setNameAndOpenURL(); This function eventually calls isURLAllowed(), which does stack ...
6 years, 8 months ago (2014-04-02 01:02:17 UTC) #4
esprehn
not lgtm, anything you can do in appendChild(<iframe src=javascript:...>) you can also do in appendChild(<script>...</script>) ...
6 years, 8 months ago (2014-04-02 01:07:13 UTC) #5
Hajime Morrita
PTAL?
6 years, 8 months ago (2014-04-02 01:31:24 UTC) #6
abarth-chromium
https://codereview.chromium.org/221673003/diff/10001/LayoutTests/fast/frames/javascript-url-style-crash-expected.txt File LayoutTests/fast/frames/javascript-url-style-crash-expected.txt (right): https://codereview.chromium.org/221673003/diff/10001/LayoutTests/fast/frames/javascript-url-style-crash-expected.txt#newcode2 LayoutTests/fast/frames/javascript-url-style-crash-expected.txt:2: PASS unless carsh carsh -> crash https://codereview.chromium.org/221673003/diff/10001/Source/core/html/HTMLStyleElement.cpp File Source/core/html/HTMLStyleElement.cpp ...
6 years, 8 months ago (2014-04-02 05:46:05 UTC) #7
Hajime Morrita
On 2014/04/02 05:46:05, abarth wrote: > https://codereview.chromium.org/221673003/diff/10001/Source/core/html/HTMLStyleElement.cpp#newcode214 > Source/core/html/HTMLStyleElement.cpp:214: return; > Do other didNotifySubtreeInsertionsToDocument assume ...
6 years, 8 months ago (2014-04-02 17:01:37 UTC) #8
Hajime Morrita
Fixed typo.
6 years, 8 months ago (2014-04-02 17:19:32 UTC) #9
esprehn
https://codereview.chromium.org/221673003/diff/30001/Source/core/html/HTMLStyleElement.cpp File Source/core/html/HTMLStyleElement.cpp (right): https://codereview.chromium.org/221673003/diff/30001/Source/core/html/HTMLStyleElement.cpp#newcode214 Source/core/html/HTMLStyleElement.cpp:214: return; This is impossible, we only call this if ...
6 years, 8 months ago (2014-04-02 19:33:30 UTC) #10
eseidel
I looked at async loads last week and convinced myself that <iframe src="javascript..."> loaded async ...
6 years, 8 months ago (2014-04-02 19:36:51 UTC) #11
eseidel
javascript: urls are sync in Chrome, but async in FF: https://codereview.chromium.org/210253003/patch/1/10003
6 years, 8 months ago (2014-04-02 19:37:30 UTC) #12
Hajime Morrita
On 2014/04/02 19:36:51, eseidel wrote: > I looked at async loads last week and convinced ...
6 years, 8 months ago (2014-04-02 19:41:36 UTC) #13
Hajime Morrita
On 2014/04/02 19:33:30, esprehn wrote: > https://codereview.chromium.org/221673003/diff/30001/Source/core/html/HTMLStyleElement.cpp#newcode214 > Source/core/html/HTMLStyleElement.cpp:214: return; > This is impossible, we ...
6 years, 8 months ago (2014-04-02 19:42:30 UTC) #14
esprehn
lgtm, but I don't think you want setTimeout(0) https://codereview.chromium.org/221673003/diff/50001/LayoutTests/fast/dom/HTMLScriptElement/append-child-style-crash.html File LayoutTests/fast/dom/HTMLScriptElement/append-child-style-crash.html (right): https://codereview.chromium.org/221673003/diff/50001/LayoutTests/fast/dom/HTMLScriptElement/append-child-style-crash.html#newcode22 LayoutTests/fast/dom/HTMLScriptElement/append-child-style-crash.html:22: }, ...
6 years, 8 months ago (2014-04-02 19:45:10 UTC) #15
gmorrita
https://codereview.chromium.org/221673003/diff/50001/LayoutTests/fast/frames/javascript-url-style-crash.html File LayoutTests/fast/frames/javascript-url-style-crash.html (right): https://codereview.chromium.org/221673003/diff/50001/LayoutTests/fast/frames/javascript-url-style-crash.html#newcode22 LayoutTests/fast/frames/javascript-url-style-crash.html:22: }, 0); On 2014/04/02 19:45:10, esprehn wrote: > What ...
6 years, 8 months ago (2014-04-02 19:47:29 UTC) #16
Hajime Morrita
The CQ bit was checked by morrita@chromium.org
6 years, 8 months ago (2014-04-02 19:50:53 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/221673003/70001
6 years, 8 months ago (2014-04-02 19:50:54 UTC) #18
commit-bot: I haz the power
6 years, 8 months ago (2014-04-02 21:00:13 UTC) #19
Message was sent while issue was closed.
Change committed as 170702

Powered by Google App Engine
This is Rietveld 408576698