Bug 49762 - Stylesheet wrappers are not GC protected
Summary: Stylesheet wrappers are not GC protected
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-18 14:59 PST by Alexey Proskuryakov
Modified: 2010-11-18 19:04 PST (History)
3 users (show)

See Also:


Attachments
proposed fix (37.32 KB, patch)
2010-11-18 15:27 PST, Alexey Proskuryakov
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-11-18 14:59:23 PST
Custom properties on a stylesheet don't persist, unless an explicit reference to it is kept.
Comment 1 Alexey Proskuryakov 2010-11-18 15:27:48 PST
Created attachment 74303 [details]
proposed fix
Comment 2 Geoffrey Garen 2010-11-18 15:39:36 PST
Comment on attachment 74303 [details]
proposed fix

From a GC footprint perspective, the approach here isn't ideal, since, as you say in your FIXME, we might artificially keep alive style wrappers we could have thrown away.

However, I expect that the set of all style-related DOM nodes in a document is quite small in practice -- and often these nodes aren't even wrapped by JS -- so in these cases I think this approach is fine.
Comment 3 Alexey Proskuryakov 2010-11-18 16:24:22 PST
Committed <http://trac.webkit.org/changeset/72344>.
Comment 4 WebKit Review Bot 2010-11-18 17:14:10 PST
http://trac.webkit.org/changeset/72344 might have broken SnowLeopard Intel Release (Tests)
The following tests are not passing:
fast/dom/prototype-inheritance-2.html
Comment 5 Alexey Proskuryakov 2010-11-18 19:04:17 PST
A subtest changed from FAIL to PASS there. Probably for a good reason, but maybe not, hard to tell with those mega-tests.