Closed Bug 530199 Opened 10 years ago Closed 10 years ago
Cleanup in ns
SMILCSSValue Type: postpone allocation of Value Wrappers until they're needed
As part of the patch-revising in bug 520239 comment 5 / bug 520239 comment 6, I needed to shift memory-allocation from msSMILCSSShorthandType::Init until later on, when the memory actually gets used. This change made things cleaner, and I'd like to make the same change to nsSMILCSSValueType as well. Patch attached. It passes SMIL+CSS reftests/mochitests locally.  (e.g. no need for eCSSProperty_UNKNOWN checks, & assertions about consistency of member data in constructed-but-not-yet-meaningful structs)
Comment on attachment 413711 [details] [diff] [review] fix v1 (sorry, just noticed one minor thing to fix; reposting patch in just a minute)
Added one null-check-after-new.
Attachment #413715 - Flags: review?(roc)
Comment on attachment 413715 [details] [diff] [review] fix v1a + return wrapper ? + nsStyleAnimation::UncomputeValue(wrapper->mPropID, wrapper->mPresContext, + wrapper->mCSSValue, aString) : + PR_TRUE; // (empty wrapper means we have nothing to do) return !wrapper || nsStyleAnimation::UncomputeValue(...);
Attachment #413715 - Flags: review?(roc) → review+
Addressed comment 3 a while back, but forgot to mention here: http://hg.mozilla.org/users/dholbert_mozilla.com/smil-patches/rev/60a626f9c1f7 Landed on mozilla-central: http://hg.mozilla.org/mozilla-central/rev/5e6db9bd8270
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.