WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 41320
Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=41320
Summary
Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
Darin Adler
Reported
2010-06-28 17:49:38 PDT
Add adoptPtr and releasePtr functions for OwnPtr and PassOwnPtr
Attachments
Patch
(50.49 KB, patch)
2010-06-29 14:10 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(50.49 KB, patch)
2010-06-29 14:54 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(51.71 KB, patch)
2010-06-30 15:59 PDT
,
Darin Adler
abarth
: review+
abarth
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2010-06-29 14:10:48 PDT
Created
attachment 60051
[details]
Patch
WebKit Review Bot
Comment 2
2010-06-29 14:14:44 PDT
Attachment 60051
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 JavaScriptCore/wtf/OwnPtr.h:38: Code inside a namespace should not be indented. [whitespace/indent] [4] JavaScriptCore/wtf/PassOwnPtr.h:40: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2010-06-29 14:54:00 PDT
Created
attachment 60060
[details]
Patch
WebKit Review Bot
Comment 4
2010-06-29 14:55:40 PDT
Attachment 60060
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 JavaScriptCore/wtf/OwnPtr.h:38: Code inside a namespace should not be indented. [whitespace/indent] [4] JavaScriptCore/wtf/PassOwnPtr.h:40: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 5
2010-06-29 15:21:20 PDT
Attachment 60051
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/3349242
Darin Adler
Comment 6
2010-06-29 15:24:52 PDT
From the output of the Chromium EWS bot it looks like JavaScriptCore/wtf/MessageQueue.h has some release calls that have to be changed to call leakPtr instead.
WebKit Review Bot
Comment 7
2010-06-29 17:30:34 PDT
Attachment 60060
[details]
did not build on chromium: Build output:
http://webkit-commit-queue.appspot.com/results/3313961
WebKit Review Bot
Comment 8
2010-06-29 18:55:03 PDT
Attachment 60060
[details]
did not build on gtk: Build output:
http://webkit-commit-queue.appspot.com/results/3382020
WebKit Review Bot
Comment 9
2010-06-29 19:12:57 PDT
Attachment 60060
[details]
did not build on win: Build output:
http://webkit-commit-queue.appspot.com/results/3376019
Darin Adler
Comment 10
2010-06-30 15:59:42 PDT
Created
attachment 60159
[details]
Patch
Adam Barth
Comment 11
2010-06-30 16:27:21 PDT
Comment on
attachment 60159
[details]
Patch I'm slightly nervous about the CrossOriginPreflightResultCache part because I don't understand it fully. JavaScriptCore/wtf/PassOwnPtr.h:79 + PassOwnPtr(PtrType ptr) : m_ptr(ptr) { } Explicit? I guess it wasn't explicit before.... JavaScriptCore/wtf/PassOwnPtr.h:85 + explicit PassOwnPtr(PtrType ptr) : m_ptr(ptr) { } How does this differ from the above? WebCore/css/CSSSegmentedFontFace.cpp:113 + if (const SimpleFontData* faceFontData = m_fontFaces[i]->getFontData(fontDescription, syntheticBold, syntheticItalic)) { Seems slightly unrelated, but yay for removing static_cast WebCore/loader/CrossOriginPreflightResultCache.cpp:155 + delete addResult.first->second; Is this a real leak that you're fixing at the same time? Might be better to do in a separate patch. I don't understand this part well enough to know if it's right.
Darin Adler
Comment 12
2010-06-30 16:49:37 PDT
(In reply to
comment #11
)
> JavaScriptCore/wtf/PassOwnPtr.h:79 > + PassOwnPtr(PtrType ptr) : m_ptr(ptr) { } > Explicit? I guess it wasn't explicit before.... > > JavaScriptCore/wtf/PassOwnPtr.h:85 > + explicit PassOwnPtr(PtrType ptr) : m_ptr(ptr) { } > How does this differ from the above?
The difference is that it’s private.
> WebCore/css/CSSSegmentedFontFace.cpp:113 > + if (const SimpleFontData* faceFontData = m_fontFaces[i]->getFontData(fontDescription, syntheticBold, syntheticItalic)) { > Seems slightly unrelated, but yay for removing static_cast
The history here is funny. An earlier patch had this erroneously as an OwnPtr.
> WebCore/loader/CrossOriginPreflightResultCache.cpp:155 > + delete addResult.first->second; > Is this a real leak that you're fixing at the same time? Might be better to do in a separate patch. I don't understand this part well enough to know if it's right.
I do think it's a real, theoretical leak. I don’t know how to make it actually leak. I could definitely leave that delete out and instead put in a FIXME, then add the deletion in a separate patch.
Darin Adler
Comment 13
2010-06-30 16:50:12 PDT
I’m worried that the Qt-bot said fail, but gave me no details!
Adam Barth
Comment 14
2010-06-30 16:54:01 PDT
boo. The Qt bot should have details. The style bot also failed to give results. Odd.
Darin Adler
Comment 15
2010-07-06 09:15:05 PDT
Committed
r62551
: <
http://trac.webkit.org/changeset/62551
>
WebKit Review Bot
Comment 16
2010-07-06 09:33:32 PDT
http://trac.webkit.org/changeset/62551
might have broken Chromium Linux Release
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