WebKit Bugzilla
Attachment 361587 Details for
Bug 194467
: [Cocoa] CTLineGetGlyphRuns() might return nullptr
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194467-20190208192147.patch (text/plain), 2.32 KB, created by
Myles C. Maxfield
on 2019-02-08 19:21:48 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-02-08 19:21:48 PST
Size:
2.32 KB
patch
obsolete
>Subversion Revision: 241227 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b3bdd47f32bb2c2c6848732055a8e130c8c45d41..b066bab3f6aa44b43c9a466d186ab7a8b3a0d738 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-08 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ [Cocoa] CTLineGetGlyphRuns() might return nullptr >+ https://bugs.webkit.org/show_bug.cgi?id=194467 >+ <rdar://problem/42423999> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Be somewhat defensive to try to make sure this sort of thing doesn't happen in the future. >+ >+ Covered by find/text/find-backwards.html >+ >+ * platform/graphics/mac/ComplexTextControllerCoreText.mm: >+ (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): >+ > 2019-02-08 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Shrink sizeof(CodeBlock) more >diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >index 034b7ac006c5c6c8c6b41cec2e72f5701b6b8930..7474e62b4dda9f3cdcbedd7a2b783d3f12849029 100644 >--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >@@ -162,6 +162,9 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, > RetainPtr<CTTypesetterRef> typesetter = adoptCF(CTTypesetterCreateWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions)); > IGNORE_NULL_CHECK_WARNINGS_END > >+ if (!typesetter) >+ return; >+ > line = adoptCF(CTTypesetterCreateLine(typesetter.get(), CFRangeMake(0, 0))); > } else { > ProviderInfo info = { cp, length, stringAttributes.get() }; >@@ -169,10 +172,16 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, > line = adoptCF(CTLineCreateWithUniCharProvider(&provideStringAndAttributes, nullptr, &info)); > } > >+ if (!line) >+ return; >+ > m_coreTextLines.append(line.get()); > > CFArrayRef runArray = CTLineGetGlyphRuns(line.get()); > >+ if (!runArray) >+ return; >+ > CFIndex runCount = CFArrayGetCount(runArray); > > for (CFIndex r = 0; r < runCount; r++) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194467
: 361587