<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>260303</bug_id>
          
          <creation_ts>2023-08-16 14:28:05 -0700</creation_ts>
          <short_desc>os_log_set_hook return value is improperly ignored</short_desc>
          <delta_ts>2023-08-17 11:22:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1971619</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2023-08-16 14:28:05 -0700</bug_when>
    <thetext>In Bug 253342 we adopted `os_log_set_hook` so that we could relay logging information from the WebContent process to the Network process to add to the logging system.

The documentation for this method says:

 * os_log_set_hook returns the previously registered hook or NULL
 * when this function is first called. As a client, if you register a hook and the
 * return value is not NULL then it is your responsibility to chain the
 * previous hook into the new hook so that both are invoked.

Any previously registered hook is unlikely to be able to interact with `logd`, since we are sandboxed, but perhaps there are other side-effects we want to retain.

To comply with the API design, we should invoke any preregistered hooks before calling our own logic.

&lt;rdar://112032774&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971631</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2023-08-16 14:41:18 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/16754</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971875</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-08-17 11:22:15 -0700</bug_when>
    <thetext>Committed 267007@main (3372a68e3655): &lt;https://commits.webkit.org/267007@main&gt;

Reviewed commits have been landed. Closing PR #16754 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>