[webkit-changes] [WebKit/WebKit] b4145d: Fix assertion after 281812 at main

Alex Christensen noreply at github.com
Mon Aug 26 17:21:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b4145d91c54dc9fe85e3a6980bff564db716b93d
      https://github.com/WebKit/WebKit/commit/b4145d91c54dc9fe85e3a6980bff564db716b93d
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-08-26 (Mon, 26 Aug 2024)

  Changed paths:
    M Source/WebKit/Shared/API/APISerializedScriptValue.cpp

  Log Message:
  -----------
  Fix assertion after 281812 at main
https://bugs.webkit.org/show_bug.cgi?id=278682
rdar://134731526

Reviewed by Timothy Hatcher.

My assertion had an off-by-one error that was usually true because
it was checking that uninitialized memory was 0.  JSStringGetUTF8CString
returns a length that includes the null termination character, which
I got correct in the call to WKStringCreateWithUTF8CStringWithLength
but not in the assertion.  This fixes the assertion and makes the
tests stop asserting in debug builds.

* Source/WebKit/Shared/API/APISerializedScriptValue.cpp:
(API::valueToWKObject):

Canonical link: https://commits.webkit.org/282769@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