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

Issue 1133713008: [WIP] Migrate hasPendingActivity from ActiveDOMObject to ScriptWrappable.

Created:
5 years, 7 months ago by vivekg_samsung
Modified:
4 years, 4 months ago
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, falken, horo+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+worker_chromium.org, kinuko+serviceworker, michaeln, nhiroki, rwlbuis, serviceworker-reviews, sof, tzik, vivekg_samsung
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WIP] Migrate hasPendingActivity from ActiveDOMObject to ScriptWrappable. R=haraken@chromium.org BUG=483722

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase #

Total comments: 1

Patch Set 3 : Using toScriptWrappable #

Total comments: 1

Patch Set 4 : Plugin check #

Patch Set 5 : Verify with RELEASE_ASSERT #

Patch Set 6 : Assert check #

Patch Set 7 : Refined Version #

Total comments: 5

Patch Set 8 : Review Comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -26 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h View 1 1 chunk +1 line, -0 lines 1 comment Download
M third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ActiveDOMObject.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp View 1 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp View 1 1 chunk +2 lines, -2 lines 1 comment Download
M third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/SuspendableTimer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerThread.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 99 (24 generated)
vivekg
This CL is mostly a mechanical change in which I have just introduced hasPendingActivity to ...
5 years, 7 months ago (2015-05-15 04:50:30 UTC) #3
vivekg
This CL is mostly a mechanical change in which I have just introduced hasPendingActivity to ...
5 years, 7 months ago (2015-05-15 04:50:31 UTC) #4
haraken
+kinuko-san https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp File Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp#newcode110 Source/core/dom/ContextLifecycleNotifier.cpp:110: // Any idea on how to handle this ...
5 years, 7 months ago (2015-05-15 12:14:25 UTC) #6
vivekg
On 2015/05/15 at 12:14:25, haraken wrote: > +kinuko-san > > https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp > File Source/core/dom/ContextLifecycleNotifier.cpp (right): ...
5 years, 7 months ago (2015-05-18 16:27:05 UTC) #7
kinuko
https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp File Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp#newcode110 Source/core/dom/ContextLifecycleNotifier.cpp:110: // Any idea on how to handle this usage ...
5 years, 7 months ago (2015-05-19 16:02:30 UTC) #8
kinuko
On 2015/05/19 16:02:30, kinuko wrote: > https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp > File Source/core/dom/ContextLifecycleNotifier.cpp (right): > > https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp#newcode110 > ...
5 years, 7 months ago (2015-05-19 16:09:59 UTC) #9
haraken
On 2015/05/19 16:09:59, kinuko wrote: > On 2015/05/19 16:02:30, kinuko wrote: > > > https://codereview.chromium.org/1133713008/diff/1/Source/core/dom/ContextLifecycleNotifier.cpp ...
5 years, 5 months ago (2015-07-08 02:07:31 UTC) #10
vivekg
On 2015/07/08 at 02:07:31, haraken wrote: > On 2015/05/19 16:09:59, kinuko wrote: > > On ...
5 years, 5 months ago (2015-07-09 08:51:20 UTC) #11
haraken
On 2015/07/09 08:51:20, vivekg_ wrote: > On 2015/07/08 at 02:07:31, haraken wrote: > > On ...
5 years, 5 months ago (2015-07-09 09:12:38 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/20001
5 years, 2 months ago (2015-10-09 06:52:45 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/124212)
5 years, 2 months ago (2015-10-09 08:30:09 UTC) #16
vivekg
The windows and mac have reported about the below test failure with ASSERTION. plugins/refcount-leaks.html Whereas ...
5 years, 2 months ago (2015-10-09 09:38:37 UTC) #17
haraken
On 2015/10/09 09:38:37, vivekg_ wrote: > The windows and mac have reported about the below ...
5 years, 2 months ago (2015-10-09 09:41:06 UTC) #18
vivekg
On 2015/10/09 09:41:06, haraken wrote: > On 2015/10/09 09:38:37, vivekg_ wrote: > > The windows ...
5 years, 2 months ago (2015-10-09 09:43:32 UTC) #19
haraken
https://codereview.chromium.org/1133713008/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/1133713008/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode265 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:265: ScriptWrappable* scriptwrappable = getInternalField<ScriptWrappable, v8DOMWrapperObjectIndex>(wrapper); Is it guaranteed that ...
5 years, 2 months ago (2015-10-09 09:48:09 UTC) #20
haraken
On 2015/10/09 09:48:09, haraken wrote: > https://codereview.chromium.org/1133713008/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp > File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): > > https://codereview.chromium.org/1133713008/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode265 > ...
5 years, 2 months ago (2015-10-09 09:56:59 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/40001
5 years, 2 months ago (2015-10-09 10:43:21 UTC) #23
vivekg
On 2015/10/09 09:56:59, haraken wrote: > On 2015/10/09 09:48:09, haraken wrote: > > > https://codereview.chromium.org/1133713008/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp ...
5 years, 2 months ago (2015-10-09 10:52:34 UTC) #24
haraken
On 2015/10/09 10:52:34, vivekg_ wrote: > On 2015/10/09 09:56:59, haraken wrote: > > On 2015/10/09 ...
5 years, 2 months ago (2015-10-09 10:56:58 UTC) #25
vivekg
On 2015/10/09 10:56:58, haraken wrote: > On 2015/10/09 10:52:34, vivekg_ wrote: > > On 2015/10/09 ...
5 years, 2 months ago (2015-10-09 11:54:57 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/124265)
5 years, 2 months ago (2015-10-09 12:12:38 UTC) #28
haraken
Maybe you want to insert RELEASE_ASSERT around toScriptWrappable in V8GCController.cpp to identify where you're crashing?
5 years, 2 months ago (2015-10-09 12:23:03 UTC) #29
vivekg
On 2015/10/09 12:23:03, haraken wrote: > Maybe you want to insert RELEASE_ASSERT around toScriptWrappable in ...
5 years, 2 months ago (2015-10-09 12:47:45 UTC) #30
haraken
https://codereview.chromium.org/1133713008/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp File third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/1133713008/diff/40001/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp#newcode266 third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp:266: if (scriptwrappable && scriptwrappable->hasPendingActivity()) { What happens if you ...
5 years, 2 months ago (2015-10-09 13:26:26 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/60001
5 years, 2 months ago (2015-10-09 13:43:43 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-09 15:12:01 UTC) #35
vivekg
On 2015/10/09 15:12:01, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
5 years, 2 months ago (2015-10-09 16:59:21 UTC) #36
haraken
On 2015/10/09 16:59:21, vivekg_ wrote: > On 2015/10/09 15:12:01, commit-bot: I haz the power wrote: ...
5 years, 2 months ago (2015-10-10 14:20:56 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/80001
5 years, 2 months ago (2015-10-12 05:42:56 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/124801)
5 years, 2 months ago (2015-10-12 07:08:41 UTC) #41
vivekg
On 2015/10/10 14:20:56, haraken wrote: > On 2015/10/09 16:59:21, vivekg_ wrote: > > On 2015/10/09 ...
5 years, 2 months ago (2015-10-12 08:16:38 UTC) #42
haraken
On 2015/10/12 08:16:38, vivekg_ wrote: > On 2015/10/10 14:20:56, haraken wrote: > > On 2015/10/09 ...
5 years, 2 months ago (2015-10-12 09:14:50 UTC) #43
vivekg
On 2015/10/12 09:14:50, haraken wrote: > On 2015/10/12 08:16:38, vivekg_ wrote: > > On 2015/10/10 ...
5 years, 2 months ago (2015-10-13 06:08:35 UTC) #44
haraken
On 2015/10/13 06:08:35, vivekg_ wrote: > On 2015/10/12 09:14:50, haraken wrote: > > On 2015/10/12 ...
5 years, 2 months ago (2015-10-13 06:16:23 UTC) #45
vivekg
On 2015/10/13 06:16:23, haraken wrote: > On 2015/10/13 06:08:35, vivekg_ wrote: > > On 2015/10/12 ...
5 years, 2 months ago (2015-10-14 06:33:01 UTC) #46
haraken
On 2015/10/14 06:33:01, vivekg_ wrote: > On 2015/10/13 06:16:23, haraken wrote: > > On 2015/10/13 ...
5 years, 2 months ago (2015-10-14 07:56:10 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/100001
5 years, 2 months ago (2015-10-14 09:45:45 UTC) #49
vivekg
On 2015/10/14 07:56:10, haraken wrote: > On 2015/10/14 06:33:01, vivekg_ wrote: > > On 2015/10/13 ...
5 years, 2 months ago (2015-10-14 10:34:23 UTC) #50
haraken
+yukishiino for help In short: If we insert the following line to V8GCController (look at ...
5 years, 2 months ago (2015-10-14 11:12:11 UTC) #52
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/126054)
5 years, 2 months ago (2015-10-14 11:17:25 UTC) #54
Yuki
On 2015/10/14 11:12:11, haraken wrote: > +yukishiino for help > > In short: If we ...
5 years, 2 months ago (2015-10-15 10:19:28 UTC) #55
haraken
On 2015/10/15 10:19:28, Yuki wrote: > On 2015/10/14 11:12:11, haraken wrote: > > +yukishiino for ...
5 years, 2 months ago (2015-10-15 10:30:25 UTC) #56
Yuki
On 2015/10/15 10:30:25, haraken wrote: > strcmp is not nice since it's heavy. Maybe can ...
5 years, 2 months ago (2015-10-15 10:43:06 UTC) #57
haraken
On 2015/10/15 10:43:06, Yuki wrote: > On 2015/10/15 10:30:25, haraken wrote: > > strcmp is ...
5 years, 2 months ago (2015-10-15 10:43:53 UTC) #58
haraken
On 2015/10/15 10:43:53, haraken wrote: > On 2015/10/15 10:43:06, Yuki wrote: > > On 2015/10/15 ...
5 years, 2 months ago (2015-10-15 10:45:02 UTC) #59
Yuki
On 2015/10/15 10:45:02, haraken wrote: > Also we should implement toScriptWrappable(NPObject*) { static_assert(0, "should > ...
5 years, 2 months ago (2015-10-15 10:48:52 UTC) #60
haraken
On 2015/10/15 10:48:52, Yuki wrote: > On 2015/10/15 10:45:02, haraken wrote: > > Also we ...
5 years, 2 months ago (2015-10-15 11:11:33 UTC) #61
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/120001
5 years, 2 months ago (2015-10-15 13:05:53 UTC) #63
vivekg
So anyone having familiarity with this logic can help? https://codereview.chromium.org/1133713008/diff/120001/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp File third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/1133713008/diff/120001/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp#newcode113 third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp:113: ...
5 years, 2 months ago (2015-10-15 13:14:01 UTC) #64
haraken
On 2015/10/15 13:14:01, vivekg_ wrote: > So anyone having familiarity with this logic can help? ...
5 years, 2 months ago (2015-10-15 13:41:42 UTC) #66
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-15 15:30:49 UTC) #68
vivekg
I will be OOO for the next week. Will be back on 26th October.
5 years, 2 months ago (2015-10-16 05:59:37 UTC) #69
Yuki
https://codereview.chromium.org/1133713008/diff/120001/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp File third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp (right): https://codereview.chromium.org/1133713008/diff/120001/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp#newcode900 third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp:900: ScriptWrappable::hasPendingActivity() ? " ScriptWrappable::hasPendingActivity()" : "", The direct super ...
5 years, 2 months ago (2015-10-16 06:43:16 UTC) #70
vivekg
Thanks for the review. Removed the code. https://codereview.chromium.org/1133713008/diff/120001/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp File third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp (right): https://codereview.chromium.org/1133713008/diff/120001/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp#newcode900 third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp:900: ScriptWrappable::hasPendingActivity() ? ...
5 years, 2 months ago (2015-10-16 06:59:33 UTC) #71
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133713008/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1133713008/140001
5 years, 2 months ago (2015-10-16 07:01:04 UTC) #73
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-16 08:12:51 UTC) #75
vivekg
On 2015/10/15 13:41:42, haraken wrote: > A worker does not have a Document. Worker's 'context' ...
5 years, 1 month ago (2015-10-27 03:21:08 UTC) #76
kinuko (google)
On 2015/10/27 03:21:08, vivekg_ wrote: > On 2015/10/15 13:41:42, haraken wrote: > > A worker ...
5 years, 1 month ago (2015-10-27 05:51:50 UTC) #79
vivekg
yurys@ any comments/pointers?
5 years, 1 month ago (2015-10-29 10:54:13 UTC) #80
kinuko
Did a little more tests using the 'repro' code attached to the original bug (https://bugs.webkit.org/show_bug.cgi?id=62292). ...
5 years, 1 month ago (2015-10-29 16:06:10 UTC) #81
haraken
Thanks for investigating the weird bit! On 2015/10/29 16:06:10, kinuko wrote: > Did a little ...
5 years, 1 month ago (2015-10-29 16:13:56 UTC) #82
yurys
I'm not sure I understand the value of moving the method from ActiveDOMObject to ScriptWrappable. ...
5 years, 1 month ago (2015-10-29 16:28:26 UTC) #84
haraken
On 2015/10/29 16:28:26, yurys wrote: > I'm not sure I understand the value of moving ...
5 years, 1 month ago (2015-10-29 16:35:43 UTC) #85
kinuko
On 2015/10/29 16:13:56, haraken wrote: > Thanks for investigating the weird bit! > > On ...
5 years, 1 month ago (2015-10-30 06:05:40 UTC) #86
haraken
On 2015/10/30 06:05:40, kinuko wrote: > On 2015/10/29 16:13:56, haraken wrote: > > Thanks for ...
5 years, 1 month ago (2015-10-30 18:06:21 UTC) #87
kinuko
On 2015/10/30 18:06:21, haraken wrote: > On 2015/10/30 06:05:40, kinuko wrote: > > On 2015/10/29 ...
5 years, 1 month ago (2015-11-01 15:04:11 UTC) #88
haraken
> > The spec requires that the worker object is kept alive while the worker ...
5 years, 1 month ago (2015-11-01 17:33:25 UTC) #89
kinuko
On 2015/11/01 17:33:25, haraken wrote: > > > The spec requires that the worker object ...
5 years, 1 month ago (2015-11-02 07:06:00 UTC) #90
haraken
Thanks for being persistent on this. > > - I now understand how the worker ...
5 years, 1 month ago (2015-11-02 10:54:18 UTC) #91
kinuko
On 2015/11/02 10:54:18, haraken wrote: > Thanks for being persistent on this. > > > ...
5 years, 1 month ago (2015-11-05 13:25:42 UTC) #92
kinuko
On 2015/11/05 13:25:42, kinuko wrote: > On 2015/11/02 10:54:18, haraken wrote: > > Thanks for ...
5 years, 1 month ago (2015-11-05 14:00:25 UTC) #93
haraken
On 2015/11/05 14:00:25, kinuko wrote: > On 2015/11/05 13:25:42, kinuko wrote: > > On 2015/11/02 ...
5 years, 1 month ago (2015-11-05 23:22:39 UTC) #94
vivekg
haraken@: Sorry about the delay in responding. I have been occupied with internal work and ...
5 years ago (2015-12-01 04:10:45 UTC) #95
haraken
On 2015/12/01 04:10:45, vivekg_ wrote: > haraken@: Sorry about the delay in responding. I have ...
5 years ago (2015-12-02 04:14:54 UTC) #96
haraken
4 years, 11 months ago (2016-01-22 17:18:48 UTC) #97
On 2015/12/02 04:14:54, haraken wrote:
> On 2015/12/01 04:10:45, vivekg_ wrote:
> > haraken@: Sorry about the delay in responding. I have been occupied with
> > internal work and it would be little unlikely that I can complete this
> activity.
> > Is there someone who can take this forward?
> 
> No one is working on this. Actually I'm getting lost :/
> 
> I tried to implement the approach described in #93 but realized that it
wouldn't
> work. Consider the following scenario:
> 
> 1) The worker thread runs a GC. No pending activity is found.
> 2) The worker thread creates a new pending activity (e.g., setTimeout).
> 3) The main thread runs a GC. It collects the worker object because no pending
> activity was observed at 1). This is wrong.
> 
> If we don't collect the worker object at 3), it means that we cannot collect
the
> worker object forever.
> 
> One solution would be to synchronously iterate all wrappers of the worker
thread
> at 3) and check if there is no pending activity. But it would be unacceptably
> heavy.
> 
> In short, I have no idea for now.

I'll take over this work. I uploaded a CL to
https://codereview.chromium.org/1609343002/

Powered by Google App Engine
This is Rietveld 408576698