RESOLVED FIXED103690
RenderBlock minor clean-up: replace raw pointers with OwnPtrs.
https://bugs.webkit.org/show_bug.cgi?id=103690
Summary RenderBlock minor clean-up: replace raw pointers with OwnPtrs.
Ilya Tikhonovsky
Reported 2012-11-29 17:26:10 PST
I found another place with raw memory management in RenderBlock code. patch to follow
Attachments
Patch (9.61 KB, patch)
2012-11-29 17:55 PST, Ilya Tikhonovsky
eric: review+
Ilya Tikhonovsky
Comment 1 2012-11-29 17:55:40 PST
Adam Barth
Comment 2 2012-11-30 13:32:41 PST
Comment on attachment 176869 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176869&action=review > Source/WebCore/rendering/RenderBlock.cpp:3183 > continuations = new ListHashSet<RenderInline*>; > - table->set(this, continuations); > + table->set(this, adoptPtr(continuations)); Consider merging these lines. We prefer to call adoptPtr immediately after calling new: adoptPtr(new Foo(....))
Eric Seidel (no email)
Comment 3 2012-11-30 13:34:26 PST
Comment on attachment 176869 [details] Patch This seems reasonable. A little scary, but reasonable. I agree with Adam that putting adoptPtr on the same line as new is better. It might complicate a couple callers as you couldn't use a raw pointer for a local though.
Ilya Tikhonovsky
Comment 4 2012-11-30 15:23:14 PST
Note You need to log in before you can comment on or make changes to this bug.