[webkit-reviews] review granted: [Bug 73371] Add a way to revert a variable to its previous value after leaving a scope. : [Attachment 117063] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 29 16:06:10 PST 2011


Adam Barth <abarth at webkit.org> has granted David Levin <levin at chromium.org>'s
request for review:
Bug 73371: Add a way to revert a variable to its previous value after leaving a
scope.
https://bugs.webkit.org/show_bug.cgi?id=73371

Attachment 117063: Patch
https://bugs.webkit.org/attachment.cgi?id=117063&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=117063&action=review


> Source/JavaScriptCore/wtf/AutoRevert.h:39
> +// shorter lifetime than its scoped_variable, to prevent invalid memory
writes

scoped_variable => scopedVariable

> Tools/TestWebKitAPI/Tests/WTF/AutoRevert.cpp:36
> +	   AutoRevert<bool> autoRevert(&originallyFalse, true);

C++ isn't smart enough to imply the template value?  I thought it could figure
it out from the constructor.


More information about the webkit-reviews mailing list