Bug 76713 - RAII to manage stylesheets for XSLTProcessorLibxslt
Summary: RAII to manage stylesheets for XSLTProcessorLibxslt
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 09:59 PST by Abhishek Arya
Modified: 2012-01-20 14:45 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abhishek Arya 2012-01-20 09:59:46 PST
dydx: inferno-sec, kling: For bug #75978, did you consider defining a NullifyOnReturn RAII object such that it can be used to clear m_stylesheet on destruction?
[09:49am] dydx: inferno-sec, kling: The function XSLTProcessor::transformToString() is reasonably sized (79 lines long) and there seems to be a explicit ordering for using m_stylesheet
[09:49am] inferno-sec: dydx: that XSLTProcessorLibxslt needs to maintain a ref to the stylesheet for callback
[09:51am] dydx: inferno-sec: ok, and ...
[09:51am] kling: dydx: inferno-sec: we could do that. i didn't think this case was exactly screaming for a special solution like that, but your idea is good
[09:52am] dydx: kling: For your consideration, I suggest such a solution since this function seems to have an ordering dependency due to callback nature and it's reasonable long.
Comment 1 Abhishek Arya 2012-01-20 10:01:22 PST
Came after discussion from fix in https://bugs.webkit.org/show_bug.cgi?id=75978
Comment 2 Eric Seidel (no email) 2012-01-20 12:31:26 PST
Don't we already have some sort of NullifyOnReturn WTF object?
Comment 3 Eric Seidel (no email) 2012-01-20 14:45:38 PST
I think I was thinking of http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/wtf/TemporaryChange.h