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

Issue 303803002: Prevent <canvas> destructor from causing nested garbage collection (Closed)

Created:
6 years, 6 months ago by Justin Novosad
Modified:
6 years, 6 months ago
Reviewers:
Stephen White
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, dshwang, jbroman
Visibility:
Public.

Description

Prevent <canvas> destructor from causing nested garbage collection In the destruction of HTMLCanvasElement, we call HTMLCanvasElement::existingDrawingContext(), whose behavior was changed incorrectly in r162330 and was triggering the allocation of an ImageBuffer during tear-down. This is not only wasteful, but it can trigger a garbage collection because the creation of an ImageBuffer will increase the amount of externallay allocated memory that is declared to V8. Triggering a GC during the finalization of a garbage collected object is bad. BUG=378289 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174984

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -3 lines) Patch
M Source/core/html/HTMLCanvasElement.cpp View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Justin Novosad
PTAL
6 years, 6 months ago (2014-05-28 17:13:19 UTC) #1
Stephen White
LGTM, bots willing.
6 years, 6 months ago (2014-05-28 17:26:10 UTC) #2
Justin Novosad
The CQ bit was checked by junov@chromium.org
6 years, 6 months ago (2014-05-28 17:49:31 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junov@chromium.org/303803002/1
6 years, 6 months ago (2014-05-28 17:49:53 UTC) #4
commit-bot: I haz the power
Change committed as 174984
6 years, 6 months ago (2014-05-28 18:27:25 UTC) #5
Julien - ping for review
6 years, 6 months ago (2014-05-30 21:41:53 UTC) #6
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/307013006/ by jchaffraix@chromium.org.

The reason for reverting is: This change is the cause of a
leak in PhishingDOMFeatureExtractorTest.ScriptAndImageFeatures
under LSAN. See
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Te....

Powered by Google App Engine
This is Rietveld 408576698