WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
103690
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ilya Tikhonovsky
Comment 1
2012-11-29 17:55:40 PST
Created
attachment 176869
[details]
Patch
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
Committed
r136288
: <
http://trac.webkit.org/changeset/136288
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug