[webkit-changes] [WebKit/WebKit] 698815: [JSC] Return written bytes in JSStringGetUTF8CStri...

Yusuke Suzuki noreply at github.com
Fri Aug 23 18:23:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 698815c7917c7ce54e8d8613c1f0f159cc3bfef3
      https://github.com/WebKit/WebKit/commit/698815c7917c7ce54e8d8613c1f0f159cc3bfef3
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-08-23 (Fri, 23 Aug 2024)

  Changed paths:
    M Source/JavaScriptCore/API/JSStringRef.cpp
    M Source/JavaScriptCore/API/tests/testapi.c

  Log Message:
  -----------
  [JSC] Return written bytes in JSStringGetUTF8CString when it encounters invalid source
https://bugs.webkit.org/show_bug.cgi?id=278587
rdar://133747399

Reviewed by Yijia Huang.

As API document describes, we should return written bytes even when we encountered the invalid source (like, unpaired surrogate) and stopped
conversion in the middle of the string.

* Source/JavaScriptCore/API/JSStringRef.cpp:
(JSStringGetUTF8CString):
* Source/JavaScriptCore/API/tests/testapi.c:
(checkJSStringInvalid):
(main):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list