|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by kouhei (in TOK) Modified:
3 years, 11 months ago CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionInline Document::allowExecutingScripts logic
This CL removes and inlines Document::allowExecutingScripts predicate
to ScriptLoader::prepareScript, where it was only called.
BUG=None
Review-Url: https://codereview.chromium.org/2640983005
Cr-Commit-Position: refs/heads/master@{#445023}
Committed: https://chromium.googlesource.com/chromium/src/+/6432181413b6162f3e78704987fe0f7c61e7c185
Patch Set 1 #Patch Set 2 : Streamer fix #
Total comments: 3
Patch Set 3 : yukishiino #
Total comments: 2
Messages
Total messages: 28 (16 generated)
The CQ bit was checked by kouhei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
kouhei@chromium.org changed reviewers: + haraken@chromium.org, yukishiino@chromium.org
kouhei@chromium.org changed reviewers: + hiroshige@chromium.org
LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by kouhei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM on my side, but I'd feel this is a bit out of my area. https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/ScriptLoader.cpp:252: LocalFrame* elementFrame = elementDocument.frame(); question: This was elementDocument.executingFrame() before this change. Is it okay to change to frame()?
https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/ScriptLoader.cpp:252: LocalFrame* elementFrame = elementDocument.frame(); On 2017/01/20 06:15:17, Yuki wrote: > question: This was elementDocument.executingFrame() before this change. Is it > okay to change to frame()? No? We still use contextFrame to chck which is executingFrame.
https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/ScriptLoader.cpp:252: LocalFrame* elementFrame = elementDocument.frame(); On 2017/01/20 06:19:03, kouhei wrote: > On 2017/01/20 06:15:17, Yuki wrote: > > question: This was elementDocument.executingFrame() before this change. Is it > > okay to change to frame()? > > No? We still use contextFrame to chck which is executingFrame. Oops, I was misreading. Let me revise my question. Q: We were checking if elementDocument.executingFrame() is nullptr or not (in Document::allowExecutingScripts) before this change. But now we don't. Is it okay? If it's okay, then could you declare |elementFrame| just before its use? We don't use |elementFrame| until line 308.
On 2017/01/20 06:24:36, Yuki wrote: > https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): > > https://codereview.chromium.org/2640983005/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/dom/ScriptLoader.cpp:252: LocalFrame* > elementFrame = elementDocument.frame(); > On 2017/01/20 06:19:03, kouhei wrote: > > On 2017/01/20 06:15:17, Yuki wrote: > > > question: This was elementDocument.executingFrame() before this change. Is > it > > > okay to change to frame()? > > > > No? We still use contextFrame to chck which is executingFrame. > > Oops, I was misreading. Let me revise my question. > > Q: We were checking if elementDocument.executingFrame() is nullptr or not (in > Document::allowExecutingScripts) before this change. But now we don't. Is it > okay? Ported this check. Will remove in a follow-up CL. > > If it's okay, then could you declare |elementFrame| just before its use? We > don't use |elementFrame| until line 308.
The CQ bit was checked by kouhei@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM. https://codereview.chromium.org/2640983005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2640983005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/ScriptLoader.cpp:313: if (elementFrame) { nit: I thought you can declare |elementFrame| here. if (LocalFrame* elementFrame = elementDocument.frame()) {
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2640983005/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2640983005/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/ScriptLoader.cpp:313: if (elementFrame) { On 2017/01/20 07:23:51, Yuki wrote: > nit: I thought you can declare |elementFrame| here. > if (LocalFrame* elementFrame = elementDocument.frame()) { Let me remove the elementFrame right away in the follow-up CL.
The CQ bit was checked by kouhei@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/2640983005/#ps40001 (title: "yukishiino")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484903346416680,
"parent_rev": "2d50a1b3b003d4a51a8f2ff4153d29a0273586eb", "commit_rev":
"6432181413b6162f3e78704987fe0f7c61e7c185"}
Message was sent while issue was closed.
Description was changed from ========== Inline Document::allowExecutingScripts logic This CL removes and inlines Document::allowExecutingScripts predicate to ScriptLoader::prepareScript, where it was only called. BUG=None ========== to ========== Inline Document::allowExecutingScripts logic This CL removes and inlines Document::allowExecutingScripts predicate to ScriptLoader::prepareScript, where it was only called. BUG=None Review-Url: https://codereview.chromium.org/2640983005 Cr-Commit-Position: refs/heads/master@{#445023} Committed: https://chromium.googlesource.com/chromium/src/+/6432181413b6162f3e78704987fe... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/6432181413b6162f3e78704987fe...
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2648753002/ by haraken@chromium.org. The reason for reverting is: This caused memory leaks in Linux Leak Detector: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty... . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
