Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Issue 139243002: StringImpl should not be referred from StringImplCF. (Closed)

Created:
6 years, 11 months ago by tasak
Modified:
6 years, 10 months ago
CC:
blink-reviews, jamesr, krit, loislo+blink_chromium.org, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, jbroman, danakj, yurys+blink_chromium.org, Rik, adamk+blink_chromium.org, jchaffraix+rendering, Inactive, Stephen Chennney, abarth-chromium, pdr., rwlbuis, Avi (use Gerrit)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

StringImpl should not be referred from StringImplCF. StringImplCF has different lifetime from StringImpl. If Blink instance has been already destroyed, objective-c clean-up code will crash. We should locally prepare NSString by using AtomicString and not use StringImpl::createCFString. BUG=305885 TEST=all tests should pass.

Patch Set 1 #

Total comments: 7

Patch Set 2 : Added release #

Patch Set 3 : Removed AtomicStringCF.cpp #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -74 lines) Patch
M Source/core/rendering/RenderThemeChromiumMac.mm View 2 chunks +4 lines, -2 lines 0 comments Download
M Source/platform/fonts/mac/ComplexTextControllerCoreText.mm View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/fonts/mac/FontCacheMac.mm View 1 1 chunk +3 lines, -1 line 0 comments Download
M Source/platform/mac/ThemeMac.mm View 1 chunk +2 lines, -1 line 0 comments Download
M Source/platform/text/LocaleMac.mm View 1 1 chunk +5 lines, -2 lines 0 comments Download
M Source/wtf/text/AtomicString.h View 1 2 2 chunks +0 lines, -10 lines 0 comments Download
D Source/wtf/text/AtomicStringCF.cpp View 1 2 1 chunk +0 lines, -56 lines 2 comments Download
M Source/wtf/wtf.gypi View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
tasak
I need this patch to land the following: https://codereview.chromium.org/82583005/ The reason why r164691 crashes browser_tests ...
6 years, 11 months ago (2014-01-15 08:31:38 UTC) #1
dglazkov
I am surprised that this is just now exposed by your change, but I have ...
6 years, 11 months ago (2014-01-15 18:47:07 UTC) #2
eseidel
I'm confused. Why did these work for WebKit but not for us?
6 years, 11 months ago (2014-01-15 19:02:55 UTC) #3
Nico
I too don't understand this change. It looks wrong to me. https://codereview.chromium.org/139243002/diff/1/Source/platform/fonts/mac/FontCacheMac.mm File Source/platform/fonts/mac/FontCacheMac.mm (right): ...
6 years, 11 months ago (2014-01-15 19:06:12 UTC) #4
tasak
Thank you for reviewing. I would like to explain what I want to do. On ...
6 years, 11 months ago (2014-01-16 01:01:30 UTC) #5
tasak
If possible, I would like to remove StringImplCF.cpp. At least, I would like to avoid ...
6 years, 11 months ago (2014-01-17 05:30:01 UTC) #6
tasak
https://codereview.chromium.org/139243002/diff/1/Source/platform/fonts/mac/FontCacheMac.mm File Source/platform/fonts/mac/FontCacheMac.mm (right): https://codereview.chromium.org/139243002/diff/1/Source/platform/fonts/mac/FontCacheMac.mm#newcode200 Source/platform/fonts/mac/FontCacheMac.mm:200: NSString *nsFontFamily = [[NSString alloc] initWithUTF8String:family.utf8().data()]; On 2014/01/15 19:06:12, ...
6 years, 11 months ago (2014-01-17 08:17:29 UTC) #7
tasak
PTAL?
6 years, 11 months ago (2014-01-23 08:55:50 UTC) #8
Nico
https://codereview.chromium.org/139243002/diff/160001/Source/wtf/text/AtomicStringCF.cpp File Source/wtf/text/AtomicStringCF.cpp (left): https://codereview.chromium.org/139243002/diff/160001/Source/wtf/text/AtomicStringCF.cpp#oldcode51 Source/wtf/text/AtomicStringCF.cpp:51: return add(reinterpret_cast<const UChar*>(ucharBuffer.data()), length); Does removing this method have ...
6 years, 11 months ago (2014-01-24 01:01:06 UTC) #9
Nico
If I understand your patch right, you're saying that the "operator NSString" in AtomicString doesn't ...
6 years, 11 months ago (2014-01-24 01:09:11 UTC) #10
tasak
Thank you for reviewing. On 2014/01/24 01:09:11, Nico wrote: > If I understand your patch ...
6 years, 11 months ago (2014-01-24 07:00:10 UTC) #11
Nico
On 2014/01/24 07:00:10, tasak wrote: > Thank you for reviewing. > > On 2014/01/24 01:09:11, ...
6 years, 11 months ago (2014-01-24 23:27:28 UTC) #12
tasak
6 years, 10 months ago (2014-01-29 04:09:04 UTC) #13
Thank you for comments.

On 2014/01/24 23:27:28, Nico wrote:
> 
> If browser_tests currently doesn't have an autorelease pool around every test,
I
> think we should add one. (Not in each test of course, but in the test runner.)
> 
> If the only place that uses StringImplCF.cpp is the NSString* operator in
> AtomicString, and that's only called in a handful places, then removing that
> sounds fine to me too from a code complexity point of view, but it doesn't
feel
> like the right fix for your bug. (Which seems more autorelease-pool-lifetime
> related.)

I see.
I agree that this patch is too much for landing the patch in
https://codereview.chromium.org/82583005/.

If I want to fix StringImplCF-related things, it is better to file a new bug.

I will close this cl and upload a patch to add autorelease pool to
PringLayoutTest.

Powered by Google App Engine
This is Rietveld 408576698