Bug 260303
| Summary: | os_log_set_hook return value is improperly ignored | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> |
| Component: | WebKit Misc. | Assignee: | Brent Fulgham <bfulgham> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brent Fulgham
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.
<rdar://112032774>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Brent Fulgham
Pull request: https://github.com/WebKit/WebKit/pull/16754
EWS
Committed 267007@main (3372a68e3655): <https://commits.webkit.org/267007@main>
Reviewed commits have been landed. Closing PR #16754 and removing active labels.