WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
87847
[Qt] Make conversion from QString to WTF::String (and back again) ~free
https://bugs.webkit.org/show_bug.cgi?id=87847
Summary
[Qt] Make conversion from QString to WTF::String (and back again) ~free
Tor Arne Vestbø
Reported
2012-05-30 06:33:28 PDT
[Qt] Make conversion from QString to WTF::String (and back again) ~free
Attachments
Patch
(6.84 KB, patch)
2012-05-30 06:35 PDT
,
Tor Arne Vestbø
no flags
Details
Formatted Diff
Diff
Patch
(6.94 KB, patch)
2012-05-30 06:54 PDT
,
Tor Arne Vestbø
no flags
Details
Formatted Diff
Diff
Patch
(7.04 KB, patch)
2012-05-30 06:59 PDT
,
Tor Arne Vestbø
no flags
Details
Formatted Diff
Diff
Patch
(7.73 KB, patch)
2012-05-30 07:24 PDT
,
Tor Arne Vestbø
no flags
Details
Formatted Diff
Diff
Patch
(7.23 KB, patch)
2012-05-31 07:40 PDT
,
Tor Arne Vestbø
barraclough
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Tor Arne Vestbø
Comment 1
2012-05-30 06:35:39 PDT
Created
attachment 144794
[details]
Patch
Tor Arne Vestbø
Comment 2
2012-05-30 06:54:38 PDT
Created
attachment 144800
[details]
Patch
Tor Arne Vestbø
Comment 3
2012-05-30 06:59:59 PDT
Created
attachment 144803
[details]
Patch
Tor Arne Vestbø
Comment 4
2012-05-30 07:24:55 PDT
Created
attachment 144808
[details]
Patch
Simon Hausmann
Comment 5
2012-05-30 07:37:41 PDT
Comment on
attachment 144808
[details]
Patch I think this looks good from a Qt perspective. I think we should run the idea also past some other String folks, to see if they have any concerns with doing this Qt specific optimization.
zalan
Comment 6
2012-05-30 07:39:57 PDT
Comment on
attachment 144808
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144808&action=review
> w/Source/WTF/wtf/text/StringImpl.h:406 > + QStringData* qStringData() { return bufferOwnership() == BufferAdoptedQString ? m_qStringData : 0; }
shouldnt m_qStringData be NULL anyway when it's not adoptedQString?
Simon Hausmann
Comment 7
2012-05-30 07:42:46 PDT
Comment on
attachment 144808
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144808&action=review
>> w/Source/WTF/wtf/text/StringImpl.h:406 >> + QStringData* qStringData() { return bufferOwnership() == BufferAdoptedQString ? m_qStringData : 0; } > > shouldnt m_qStringData be NULL anyway when it's not adoptedQString?
It could have a different value since it's part of a union.
zalan
Comment 8
2012-05-30 07:49:15 PDT
(In reply to
comment #7
)
> (From update of
attachment 144808
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=144808&action=review
> > >> w/Source/WTF/wtf/text/StringImpl.h:406 > >> + QStringData* qStringData() { return bufferOwnership() == BufferAdoptedQString ? m_qStringData : 0; } > > > > shouldnt m_qStringData be NULL anyway when it's not adoptedQString? > > It could have a different value since it's part of a union.
oh right. that was cut off of the review context. should have looked at the original code.
Tor Arne Vestbø
Comment 9
2012-05-30 07:50:02 PDT
(In reply to
comment #5
)
> (From update of
attachment 144808
[details]
) > I think this looks good from a Qt perspective. I think we should run the idea also past some other String folks, to see if they have any concerns with doing this Qt specific optimization.
Come to think of it, if more ports would like this we can always make the ownership BufferAdoptedPlatformString instead.
Early Warning System Bot
Comment 10
2012-05-30 09:03:01 PDT
Comment on
attachment 144808
[details]
Patch
Attachment 144808
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/12842890
Tor Arne Vestbø
Comment 11
2012-05-31 07:40:12 PDT
Created
attachment 145089
[details]
Patch Rebased to ToT, HAVE(QT5) landed in
r119098
Tor Arne Vestbø
Comment 12
2012-05-31 07:41:45 PDT
Darin, Gavin, what do you guys think?
Gavin Barraclough
Comment 13
2012-05-31 15:35:47 PDT
Comment on
attachment 145089
[details]
Patch This seems fine to me. We've discussed refactoring the various backing buffers behind an extra layer of abstraction at some point, with a virtual interface so we can move knowledge of the set of supported types out of backing buffers out of StringImpl. But if we do want to make a change like that, we could easily make QStringData one of the types of supported buffers.
Tor Arne Vestbø
Comment 14
2012-06-01 05:26:04 PDT
Committed
r119217
: <
http://trac.webkit.org/changeset/119217
>
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