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

Issue 189513012: DOMDataStore should be cleared when shutting down worker threads (Closed)

Created:
6 years, 9 months ago by haraken
Modified:
6 years, 9 months ago
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, gavinp+loader_chromium.org, sof, kouhei+bindings_chromium.org, abarth-chromium, falken, marja+watch_chromium.org, adamk+blink_chromium.org, horo+watch_chromium.org, kinuko+watch, Nate Chapin, Inactive
Visibility:
Public.

Description

DOMDataStore should be cleared when shutting down worker threads - The essence of this CL is to call DOMWrapperWorld::dispose() when shutting down WorkerScriptController. This makes sure that DOMDataStore is cleared when shutting down the worker thread. - This CL also fixes misused RefPtr<DOMWrapperWorld> and DOMWrapperWorld*. In general, we should use RefPtr<DOMWrapperWorld> when we store DOMWrapperWorld in heap-allocated objects and when we want to pass ownership around. Otherwise, we should use DOMWrapperWorld*. BUG=341032 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168874

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -27 lines) Patch
M Source/bindings/v8/DOMWrapperWorld.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/DOMWrapperWorld.cpp View 1 2 chunks +7 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8AbstractEventListener.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8AbstractEventListener.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8PerContextData.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/V8PerContextData.cpp View 3 chunks +5 lines, -8 lines 0 comments Download
M Source/bindings/v8/V8WindowShell.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/WorkerScriptController.cpp View 1 2 3 chunks +4 lines, -6 lines 0 comments Download
M Source/core/events/ErrorEvent.h View 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/events/ErrorEvent.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/WorkerMessagingProxy.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/CustomEventTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
haraken
PTAL
6 years, 9 months ago (2014-03-10 04:41:09 UTC) #1
kouhei (in TOK)
https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/WorkerScriptController.cpp File Source/bindings/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/WorkerScriptController.cpp#newcode110 Source/bindings/v8/WorkerScriptController.cpp:110: m_world->dispose(); Can't we just delete the world instead? Why ...
6 years, 9 months ago (2014-03-10 04:49:26 UTC) #2
haraken
https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/WorkerScriptController.cpp File Source/bindings/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/WorkerScriptController.cpp#newcode110 Source/bindings/v8/WorkerScriptController.cpp:110: m_world->dispose(); On 2014/03/10 04:49:26, kouhei wrote: > Can't we ...
6 years, 9 months ago (2014-03-10 04:58:59 UTC) #3
dcarney
https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/DOMWrapperWorld.h File Source/bindings/v8/DOMWrapperWorld.h (right): https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/DOMWrapperWorld.h#newcode69 Source/bindings/v8/DOMWrapperWorld.h:69: static void allWorldsInMainThread(Vector<DOMWrapperWorld*>& worlds); i don't see what ensures ...
6 years, 9 months ago (2014-03-10 08:12:27 UTC) #4
haraken
PTAL https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/DOMWrapperWorld.h File Source/bindings/v8/DOMWrapperWorld.h (right): https://codereview.chromium.org/189513012/diff/1/Source/bindings/v8/DOMWrapperWorld.h#newcode69 Source/bindings/v8/DOMWrapperWorld.h:69: static void allWorldsInMainThread(Vector<DOMWrapperWorld*>& worlds); On 2014/03/10 08:12:28, dcarney ...
6 years, 9 months ago (2014-03-10 08:23:56 UTC) #5
dcarney
> (Either is fine with me. Since current(), mainWorld() etc return raw pointers, > it ...
6 years, 9 months ago (2014-03-10 08:33:40 UTC) #6
sof
Might this also address some of the Worker-specific leaks that have been reported? (e.g., http://crbug.com/332328 ...
6 years, 9 months ago (2014-03-10 10:18:26 UTC) #7
haraken
On 2014/03/10 10:18:26, sof wrote: > Might this also address some of the Worker-specific leaks ...
6 years, 9 months ago (2014-03-10 10:21:25 UTC) #8
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-10 10:43:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/189513012/40001
6 years, 9 months ago (2014-03-10 10:43:54 UTC) #10
haraken
https://codereview.chromium.org/189513012/diff/20001/Source/bindings/v8/WorkerScriptController.cpp File Source/bindings/v8/WorkerScriptController.cpp (right): https://codereview.chromium.org/189513012/diff/20001/Source/bindings/v8/WorkerScriptController.cpp#newcode110 Source/bindings/v8/WorkerScriptController.cpp:110: m_world->dispose(); I noticed that m_world->dispose() must be executed before ...
6 years, 9 months ago (2014-03-10 10:47:32 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-10 10:49:39 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit
6 years, 9 months ago (2014-03-10 10:49:40 UTC) #13
haraken
jochen@: would you rubberstamp to web/?
6 years, 9 months ago (2014-03-10 10:50:36 UTC) #14
adamk
lgtm for Source/web/
6 years, 9 months ago (2014-03-10 21:05:24 UTC) #15
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 9 months ago (2014-03-10 22:50:06 UTC) #16
haraken
On 2014/03/10 21:05:24, adamk wrote: > lgtm for Source/web/ Thanks!
6 years, 9 months ago (2014-03-10 22:50:12 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/189513012/40001
6 years, 9 months ago (2014-03-10 22:51:37 UTC) #18
commit-bot: I haz the power
6 years, 9 months ago (2014-03-10 23:08:12 UTC) #19
Message was sent while issue was closed.
Change committed as 168874

Powered by Google App Engine
This is Rietveld 408576698