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

Issue 2649323005: Cleanly detach XHR and other pending loader clients from Inspector. (Closed)

Created:
3 years, 11 months ago by sof
Modified:
3 years, 10 months ago
Reviewers:
haraken, yhirano
CC:
chromium-reviews, blink-reviews, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanly detach XHR and other pending loader clients from Inspector. If the XHR object is finalized without first being notified of ExecutionContext destruction, its prefinalizer is responsible for making up the difference and behave as if that did. Do so by delegating to contextDestroyed(); this takes care of releasing its resources promptly, along with unregistering as a loader client (with its associated async loader and Inspector.) Also make other Inspector loading clients cleanly detach when finalized; prevents Inspector from keeping dead raw pointers to them. R=yhirano,haraken BUG=667254 Review-Url: https://codereview.chromium.org/2649323005 Cr-Commit-Position: refs/heads/master@{#446660} Committed: https://chromium.googlesource.com/chromium/src/+/ef8b2502b396988865f9d4754748a3767a40160e

Patch Set 1 #

Patch Set 2 : detach all loader clients from inspector #

Total comments: 6

Patch Set 3 : clarifications #

Total comments: 2

Patch Set 4 : unregister EventSource early #

Total comments: 2

Patch Set 5 : rebalance XHR disposal steps #

Messages

Total messages: 30 (15 generated)
sof
please take a look.
3 years, 11 months ago (2017-01-25 10:54:30 UTC) #9
yhirano
haraken, sof: I think contextDestroyed not being called is a bug, do you agree with ...
3 years, 11 months ago (2017-01-25 11:05:03 UTC) #10
yhirano
haraken, sof: I think contextDestroyed not being called is a bug, do you agree with ...
3 years, 11 months ago (2017-01-25 11:05:04 UTC) #11
yhirano
https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl File third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl (right): https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl#newcode216 third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl:216: void detachClientRequest(ExecutionContext*, ThreadableLoaderClient*); Please mention that this can be ...
3 years, 11 months ago (2017-01-25 11:06:26 UTC) #12
sof
On 2017/01/25 11:05:04, yhirano wrote: > haraken, sof: I think contextDestroyed not being called is ...
3 years, 11 months ago (2017-01-25 11:08:40 UTC) #13
sof
On 2017/01/25 11:08:40, sof wrote: > On 2017/01/25 11:05:04, yhirano wrote: > > haraken, sof: ...
3 years, 11 months ago (2017-01-25 11:09:51 UTC) #14
sof
https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl File third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl (right): https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl#newcode216 third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl:216: void detachClientRequest(ExecutionContext*, ThreadableLoaderClient*); On 2017/01/25 11:06:26, yhirano wrote: > ...
3 years, 11 months ago (2017-01-25 11:44:30 UTC) #17
yhirano
https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl File third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl (right): https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl#newcode216 third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl:216: void detachClientRequest(ExecutionContext*, ThreadableLoaderClient*); On 2017/01/25 11:44:30, sof wrote: > ...
3 years, 11 months ago (2017-01-27 07:57:59 UTC) #18
sof
thanks for the followup, getting a fix in sooner for this is preferable. https://codereview.chromium.org/2649323005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl File ...
3 years, 11 months ago (2017-01-27 08:40:35 UTC) #19
yhirano
lgtm, thanks. https://codereview.chromium.org/2649323005/diff/40001/third_party/WebKit/Source/modules/eventsource/EventSource.cpp File third_party/WebKit/Source/modules/eventsource/EventSource.cpp (right): https://codereview.chromium.org/2649323005/diff/40001/third_party/WebKit/Source/modules/eventsource/EventSource.cpp#newcode376 third_party/WebKit/Source/modules/eventsource/EventSource.cpp:376: void EventSource::contextDestroyed(ExecutionContext*) { InspectorInstrumentation::detachClientRequest(executionContext, this) needed?
3 years, 11 months ago (2017-01-27 08:58:44 UTC) #20
sof
haraken@: owner review when you next have moment, please? https://codereview.chromium.org/2649323005/diff/40001/third_party/WebKit/Source/modules/eventsource/EventSource.cpp File third_party/WebKit/Source/modules/eventsource/EventSource.cpp (right): https://codereview.chromium.org/2649323005/diff/40001/third_party/WebKit/Source/modules/eventsource/EventSource.cpp#newcode376 third_party/WebKit/Source/modules/eventsource/EventSource.cpp:376: ...
3 years, 11 months ago (2017-01-27 09:09:40 UTC) #21
haraken
LGTM https://codereview.chromium.org/2649323005/diff/60001/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp (right): https://codereview.chromium.org/2649323005/diff/60001/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp#newcode1097 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp:1097: contextDestroyed(getExecutionContext()); I'd prefer not manually calling contextDestroyed (it ...
3 years, 11 months ago (2017-01-27 09:47:58 UTC) #22
sof
https://codereview.chromium.org/2649323005/diff/60001/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp File third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp (right): https://codereview.chromium.org/2649323005/diff/60001/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp#newcode1097 third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp:1097: contextDestroyed(getExecutionContext()); On 2017/01/27 09:47:57, haraken wrote: > > I'd ...
3 years, 11 months ago (2017-01-27 10:19:59 UTC) #26
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/2649323005/80001
3 years, 11 months ago (2017-01-27 10:20:25 UTC) #27
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 13:52:58 UTC) #30
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/ef8b2502b396988865f9d4754748...

Powered by Google App Engine
This is Rietveld 408576698