ClassicPendingScript outliving after navigation (memory leak) |
||||
Issue descriptionThis memory leak was found with Real-world leak detector (https://docs.google.com/document/d/1wUWa7dWUdvr6dLdYHFfMQdnvgzt7lrrvzYfpAK-_6e0/edit?ts=5976c2d3). After navigating away from https://binomo.com/, ClassicPendingScript is alive with the state of kWaitingForStreaming. It seems like ScriptStreamer::StreamingComplete never gets called for a script (https://assets.zendesk.com/embeddable_framework/main.js) which is loaded for this website.
,
Nov 16 2017
,
Nov 17 2017
Marja, if I remember correctly you worked with script streaming in the past. Any idea if this bug with ScriptStreamer::StreamingComplete is in V8 or in webpage JS code?
,
Nov 17 2017
Daniel: Marja mentioned offline that you are working on a similar case. Could you please take a look?
,
Dec 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b7712bbb47becf743b6af7818698dc4a34bff91f commit b7712bbb47becf743b6af7818698dc4a34bff91f Author: Yuzu Saijo <yuzus@chromium.org> Date: Mon Dec 11 09:02:06 2017 Change WrapPersistent to WrapWeakPersistent to fix memory leak This CL intends to fix a memory leak that is caused by a reference cycle (ScriptRunner -> ScriptRunner). Memory leak happens with ClassicPendingScript over page navigation with https://binomo.com, the case which a script is loaded but never finishes streaming (i.e. ScriptStreamer::StreamingComplete is never called). This leads to a memory leak because streamer_done_ which has ScriptStreamer in a closure never gets released. Bug: 785173 Change-Id: I901bdf134dabaa5d32a090b3490e77d5292ffae0 Reviewed-on: https://chromium-review.googlesource.com/758306 Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Yuzu Saijo <yuzus@chromium.org> Cr-Commit-Position: refs/heads/master@{#523060} [modify] https://crrev.com/b7712bbb47becf743b6af7818698dc4a34bff91f/third_party/WebKit/Source/core/dom/ScriptRunner.cpp |
||||
►
Sign in to add a comment |
||||
Comment 1 by yuzus@chromium.org
, Nov 15 2017