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

Issue 2653923008: Reland of Split PendingScript into PendingScript and ClassicPendingScript (Closed)

Created:
3 years, 10 months ago by hiroshige
Modified:
3 years, 7 months ago
CC:
chromium-reviews, blink-reviews-html_chromium.org, sof, eae+blinkwatch, loading-reviews+parser_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, dominicc+watchlist_chromium.org, blink-reviews-bindings_chromium.org, blink-reviews, kinuko+watch, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of Split PendingScript into PendingScript and ClassicPendingScript This is preparation for introducing ModulePendingScript. This CL shouldn't change the behavior. This has been reverted due to crashing (Issue 711703) because ResourceOwner's prefinalizer is called before PendingScript's prefinalizer, causing CheckState() assertion failure. This reland fixes this issue by registering PendingScript::Dispose() also as the prefinalizer of ClassicPendingScript, which is called before ResourceOwner's prefinalizer. A unit test for the crash will be added by https://codereview.chromium.org/2828973002/. BUG=594639, 686281, 711703 Review-Url: https://codereview.chromium.org/2653923008 Cr-Original-Commit-Position: refs/heads/master@{#464494} Committed: https://chromium.googlesource.com/chromium/src/+/d512803299c01324b92ffd8c962da97e3bc8ccff Review-Url: https://codereview.chromium.org/2653923008 Cr-Commit-Position: refs/heads/master@{#466899} Committed: https://chromium.googlesource.com/chromium/src/+/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac

Patch Set 1 #

Patch Set 2 : Temp fix #

Patch Set 3 : Rebase. #

Patch Set 4 : Rebase, refine #

Patch Set 5 : Create blink::Script #

Patch Set 6 : Add Script.h #

Patch Set 7 : CSP #

Patch Set 8 : format #

Patch Set 9 : Create Classic/ModulePendingScript #

Patch Set 10 : Load failure OK #

Patch Set 11 : Rebase #

Patch Set 12 : Modify layout tests and fix some failures. #

Patch Set 13 : Refine/fix #

Patch Set 14 : setDefer() #

Patch Set 15 : temp #

Patch Set 16 : Rebase #

Patch Set 17 : Rebase #

Patch Set 18 : Rebase #

Patch Set 19 : Rebase #

Patch Set 20 : Split patches: this CL becomes PendingScript/ClassicPendingScript separation #

Patch Set 21 : Rebase #

Patch Set 22 : refine #

Patch Set 23 : Rebase #

Patch Set 24 : refine #

Patch Set 25 : refine #

Patch Set 26 : refine #

Patch Set 27 : Rebase #

Patch Set 28 : Fix file header #

Total comments: 1

Patch Set 29 : Introduce removeFromMemoryCache() #

Patch Set 30 : Add comment #

Patch Set 31 : Rebase #

Patch Set 32 : build-ok #

Patch Set 33 : restyle #

Patch Set 34 : Rebase #

Patch Set 35 : Rebase #

Patch Set 36 : refine #

Total comments: 4

Patch Set 37 : === Add class-level comments #

Patch Set 38 : Rebase #

Patch Set 39 : Rebase #

Patch Set 40 : Add unit tests #

Patch Set 41 : Crash fix by adding Dispose() as ClassicPendingScript prefinalizer #

Total comments: 2

Patch Set 42 : Comment update #

Patch Set 43 : Rebase #

Patch Set 44 : rebase fix #

Patch Set 45 : comment fix #

Patch Set 46 : temporary fix for crash #

Patch Set 47 : Rebase #

Patch Set 48 : Rebase #

Patch Set 49 : Comment update #

Patch Set 50 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -525 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 8 chunks +21 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 6 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 4 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +2 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/core/dom/ClassicPendingScript.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 2 chunks +48 lines, -96 lines 0 comments Download
A + third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 8 chunks +62 lines, -115 lines 1 comment Download
M third_party/WebKit/Source/core/dom/PendingScript.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 4 chunks +33 lines, -52 lines 0 comments Download
M third_party/WebKit/Source/core/dom/PendingScript.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 3 chunks +9 lines, -210 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 6 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 9 chunks +13 lines, -11 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 154 (122 generated)
hiroshige
PTAL; Speculatively starting the code review, while some DCHECK()s are still commented out (and should ...
3 years, 8 months ago (2017-04-05 23:13:54 UTC) #41
hiroshige
3 years, 8 months ago (2017-04-06 19:11:50 UTC) #47
hiroshige
Removed commented-out code by introducing PendingScript::removeFromMemoryCache(). https://codereview.chromium.org/2653923008/diff/540001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2653923008/diff/540001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode716 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:716: // DCHECK_EQ(pendingScript->resource(), m_resource); ...
3 years, 8 months ago (2017-04-07 22:40:41 UTC) #51
kouhei (in TOK)
lgtm
3 years, 8 months ago (2017-04-13 00:28:26 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2653923008/700001
3 years, 8 months ago (2017-04-13 00:29:39 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/409884)
3 years, 8 months ago (2017-04-13 00:45:17 UTC) #69
haraken
owner LGTM https://codereview.chromium.org/2653923008/diff/700001/third_party/WebKit/Source/core/dom/ClassicPendingScript.h File third_party/WebKit/Source/core/dom/ClassicPendingScript.h (right): https://codereview.chromium.org/2653923008/diff/700001/third_party/WebKit/Source/core/dom/ClassicPendingScript.h#newcode24 third_party/WebKit/Source/core/dom/ClassicPendingScript.h:24: class CORE_EXPORT ClassicPendingScript final Add a class-level ...
3 years, 8 months ago (2017-04-13 01:03:58 UTC) #71
hiroshige
https://codereview.chromium.org/2653923008/diff/700001/third_party/WebKit/Source/core/dom/ClassicPendingScript.h File third_party/WebKit/Source/core/dom/ClassicPendingScript.h (right): https://codereview.chromium.org/2653923008/diff/700001/third_party/WebKit/Source/core/dom/ClassicPendingScript.h#newcode24 third_party/WebKit/Source/core/dom/ClassicPendingScript.h:24: class CORE_EXPORT ClassicPendingScript final On 2017/04/13 01:03:58, haraken wrote: ...
3 years, 8 months ago (2017-04-13 17:08:31 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2653923008/720001
3 years, 8 months ago (2017-04-13 17:09:29 UTC) #76
commit-bot: I haz the power
Committed patchset #37 (id:720001) as https://chromium.googlesource.com/chromium/src/+/d512803299c01324b92ffd8c962da97e3bc8ccff
3 years, 8 months ago (2017-04-13 19:15:57 UTC) #79
hiroshige
A revert of this CL (patchset #37 id:720001) has been created in https://codereview.chromium.org/2820753002/ by hiroshige@chromium.org. ...
3 years, 8 months ago (2017-04-14 18:28:19 UTC) #80
hiroshige
PTAL again. The original CL has been reverted due to a prefinalizer-related crashing issue (Issue ...
3 years, 8 months ago (2017-04-19 01:01:40 UTC) #96
kouhei (in TOK)
lgtm
3 years, 8 months ago (2017-04-19 01:20:42 UTC) #99
hiroshige
On 2017/04/19 01:20:42, kouhei wrote: > lgtm Splitted the unit test into https://codereview.chromium.org/2828973002/ and reverted ...
3 years, 8 months ago (2017-04-19 23:52:08 UTC) #108
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2653923008/880001
3 years, 8 months ago (2017-04-20 09:41:24 UTC) #113
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2653923008/880001
3 years, 8 months ago (2017-04-20 09:45:03 UTC) #117
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/409543)
3 years, 8 months ago (2017-04-20 15:07:49 UTC) #119
hiroshige
Hmm, still failing on windows bots. 1. PendingScript::Dispose() disposes the PendingScript, including its subclass part ...
3 years, 8 months ago (2017-04-20 15:54:35 UTC) #120
kouhei (in TOK)
> Hmm, still failing on windows bots. > > 1. PendingScript::Dispose() disposes the PendingScript, including ...
3 years, 8 months ago (2017-04-24 09:50:29 UTC) #131
haraken
On 2017/04/24 09:50:29, kouhei wrote: > > Hmm, still failing on windows bots. > > ...
3 years, 8 months ago (2017-04-24 09:57:38 UTC) #132
hiroshige
On 2017/04/24 09:57:38, haraken wrote: > On 2017/04/24 09:50:29, kouhei wrote: > > > Hmm, ...
3 years, 8 months ago (2017-04-24 23:01:28 UTC) #133
kouhei (in TOK)
On 2017/04/24 23:01:28, hiroshige wrote: > On 2017/04/24 09:57:38, haraken wrote: > > On 2017/04/24 ...
3 years, 8 months ago (2017-04-25 00:16:28 UTC) #134
hiroshige
On 2017/04/25 00:16:28, kouhei wrote: > On 2017/04/24 23:01:28, hiroshige wrote: > > On 2017/04/24 ...
3 years, 8 months ago (2017-04-25 00:32:46 UTC) #137
hiroshige
On 2017/04/25 00:16:28, kouhei wrote: > On 2017/04/24 23:01:28, hiroshige wrote: > > On 2017/04/24 ...
3 years, 8 months ago (2017-04-25 00:32:54 UTC) #138
kouhei (in TOK)
lgtm
3 years, 8 months ago (2017-04-25 01:53:34 UTC) #141
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2653923008/980001
3 years, 8 months ago (2017-04-25 06:25:10 UTC) #146
commit-bot: I haz the power
Committed patchset #50 (id:980001) as https://chromium.googlesource.com/chromium/src/+/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac
3 years, 8 months ago (2017-04-25 06:29:56 UTC) #149
haraken
https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp File third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp (right): https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp#newcode61 third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp:61: void ClassicPendingScript::DisposeInternal() { Why can't you call DisposeInternal() before ...
3 years, 7 months ago (2017-04-25 17:19:51 UTC) #150
haraken
On 2017/04/25 17:19:51, haraken wrote: > https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp > File third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp (right): > > https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp#newcode61 > ...
3 years, 7 months ago (2017-04-25 17:20:37 UTC) #151
hiroshige
On 2017/04/25 17:20:37, haraken wrote: > On 2017/04/25 17:19:51, haraken wrote: > > > https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp ...
3 years, 7 months ago (2017-04-25 22:46:30 UTC) #152
hiroshige
On 2017/04/25 22:46:30, hiroshige wrote: > On 2017/04/25 17:20:37, haraken wrote: > > On 2017/04/25 ...
3 years, 7 months ago (2017-04-26 00:38:26 UTC) #153
hiroshige
3 years, 7 months ago (2017-04-26 16:17:40 UTC) #154
Message was sent while issue was closed.
On 2017/04/26 00:38:26, hiroshige wrote:
> On 2017/04/25 22:46:30, hiroshige wrote:
> > On 2017/04/25 17:20:37, haraken wrote:
> > > On 2017/04/25 17:19:51, haraken wrote:
> > > >
> > >
> >
>
https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Sou...
> > > > File third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
(right):
> > > > 
> > > >
> > >
> >
>
https://codereview.chromium.org/2653923008/diff/980001/third_party/WebKit/Sou...
> > > > third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp:61: void
> > > > ClassicPendingScript::DisposeInternal() {
> > > > 
> > > > Why can't you call DisposeInternal() before
> ClassicPendingScript::Dispose()
> > > > calls PendingScript::Dispose()?
> > > > 
> > > > I'm concerned that this CL is introducing a pretty complicated
> pre-finalizer
> > > > chain. You're doing something like:
> > > > 
> > > > 1) Call ClassisPendingScript's Dispose()
> > > > 2) Call PendingScript's Dispose()
> > > > 3) Let PendingScript's Dispose() call ClassisPendingScript's
> > DisposeInternal()
> > > > 
> > > > In the first place, I'm concerned that the resource hierarchy is doing a
> lot
> > > of
> > > > complex work in the pre-finalizer. The pre-finalizer is designed to do a
> > > couple
> > > > of only simple things (e.g., clearing raw pointer). For example, it will
> > cause
> > > a
> > > > use-after-free bug if the pre-finalizer adds a new reference to an
already
> > > dead
> > > > object (because the marking phase has already completed). Are you pretty
> > sure
> > > > that the Resource's pre-finalizer is not doing such a thing?
> > > > 
> > > > I'd strongly recommend you refactor the Resource's hierarchy so that it
> > > doesn't
> > > > heavily rely on the pre-finalizers.
> > > 
> > > Due to the excessive complexity of the pre-finalizers, I'd say not LGTM.
> > 
> > I'll address the issue and start codereview for fixing this shortly
> > (crbug.com/715309).
> 
> Created CLs (crbug.com/715309) that address haraken's not-l-g-t-m:
> https://codereview.chromium.org/2837363003/
> https://codereview.chromium.org/2839033002/
> https://codereview.chromium.org/2844583002/

The follow-up fixes have been landed.

Powered by Google App Engine
This is Rietveld 408576698