Last Comment Bug 682460 - Leak when forcing layout during mutation event for table attribute
: Leak when forcing layout during mutation event for table attribute
Status: RESOLVED FIXED
: assertion, mlk, regression
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on:
Blocks: 325861 326633 343943 211636
  Show dependency treegraph
 
Reported: 2011-08-26 16:12 PDT by Jesse Ruderman
Modified: 2011-09-27 14:57 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (367 bytes, text/html)
2011-08-26 16:12 PDT, Jesse Ruderman
no flags Details
stack trace (3.16 KB, text/plain)
2011-08-26 16:12 PDT, Jesse Ruderman
no flags Details
Patch v1 (5.02 KB, patch)
2011-08-27 04:04 PDT, :Ms2ger (⌚ UTC+1/+2)
bugs: review+
Details | Diff | Splinter Review
Patch for checkin (5.94 KB, patch)
2011-08-28 03:48 PDT, :Ms2ger (⌚ UTC+1/+2)
emorley: checkin+
Details | Diff | Splinter Review

Description Jesse Ruderman 2011-08-26 16:12:00 PDT
Created attachment 556167 [details]
testcase

###!!! ASSERTION: potential leak, plus waste of work: 'mTableInheritedAttributes == TABLE_ATTRS_DIRTY', file content/html/content/src/nsHTMLTableElement.cpp, line 1228

+ trace-refcnt reports a leaked "nsMappedAttributes" object
Comment 1 Jesse Ruderman 2011-08-26 16:12:24 PDT
Created attachment 556168 [details]
stack trace
Comment 2 Olli Pettay [:smaug] 2011-08-26 16:17:33 PDT
Using nsHTMLTableElement::SetAttr is just buggy
Comment 3 Olli Pettay [:smaug] 2011-08-26 16:21:09 PDT
I think this is a regression from bug 211636
Comment 4 Olli Pettay [:smaug] 2011-08-26 16:25:11 PDT
Yes, bug 211636 should have used Before/AfterSetAttr, not override SetAttr.
Comment 5 Boris Zbarsky [:bz] 2011-08-26 18:49:22 PDT
Olli, are you fixing this?  Or is Bernd?

Requesting tracking for the leak regression.
Comment 6 Bernd 2011-08-26 23:11:29 PDT
I don't feel comfortable with this, see https://bugzilla.mozilla.org/show_bug.cgi?id=211636#c9 
>I am insecure about the changes in SetAttr and UnsetAttr
Comment 7 :Ms2ger (⌚ UTC+1/+2) 2011-08-27 04:04:26 PDT
Created attachment 556252 [details] [diff] [review]
Patch v1

Something like this? (Untested)
Comment 8 Mozilla RelEng Bot 2011-08-27 09:20:49 PDT
Try run for edb5c7975703 is complete.
Detailed breakdown of the results available here:
    http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=edb5c7975703
Results (out of 229 total builds):
    success: 212
    warnings: 15
    failure: 2
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/Ms2ger@gmail.com-edb5c7975703
Comment 9 :Ms2ger (⌚ UTC+1/+2) 2011-08-28 03:48:48 PDT
Created attachment 556383 [details] [diff] [review]
Patch for checkin

As suggested by Bernd, fixed bug 211636 comment 16 as well. Ed, if you don't mind? (Passed try: <http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=edb5c7975703>)
Comment 11 Ed Morley [:emorley] 2011-08-28 13:27:49 PDT
http://hg.mozilla.org/mozilla-central/rev/f1cf848b1ff2

Note You need to log in before you can comment on or make changes to this bug.