[webkit-changes] [WebKit/WebKit] a7b9e4: ASSERTION FAILED: !is8Bit()

Darin Adler noreply at github.com
Wed Oct 19 10:00:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7b9e4efad0c1fd416dc3838067a31f68e7afa00
      https://github.com/WebKit/WebKit/commit/a7b9e4efad0c1fd416dc3838067a31f68e7afa00
  Author: Darin Adler <darin at apple.com>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M Source/WTF/wtf/text/StringImpl.h
    M Source/WTF/wtf/text/StringView.h

  Log Message:
  -----------
  ASSERTION FAILED: !is8Bit()
https://bugs.webkit.org/show_bug.cgi?id=246688
rdar://101291623

Reviewed by Mark Lam.

* Source/WTF/wtf/text/StringImpl.h:
(WTF::StringImpl::characters16 const): Allow calling this on the empty string without asserting.
There is no problem returning the 8-bit character pointer as a 16-bit character pointer when the
length is zero; the pointer will never be dereferenced.
* Source/WTF/wtf/text/StringView.h:
(WTF::StringView::characters16 const): Ditto.

Canonical link: https://commits.webkit.org/255739@main




More information about the webkit-changes mailing list