Skip to content

[6.2] Fix crash when subheading is clicked on ObjC page #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release/6.2
Choose a base branch
from

Conversation

mportiz08
Copy link
Contributor

  • Explanation: Fixes issue where clicking a link to a target on the same page of an Objective-C API may crash the renderer.
  • Scope: Impacts DocC generated API symbol pages with ObjC variants that have links to fragment identifiers.
  • Issue: rdar://154225522
  • Risk: Low, single addition to conditional for specific kinds of pages
  • Testing: Added unit tests, manually tested that jumping between sections of an ObjC symbol page doesn't crash anymore and there are no regressions switching between Swift/ObjC pages.
  • Reviewer: @marinaaisa
  • Original PR: Fix crash when subheading is clicked on ObjC page #951

Example of broken flow:
/documentation/foo
/documentation/foo?language=objc
/documentation/foo?language=objc#bar # may crash when link clicked

When a user clicks a subheading link on an Objective-C variant of a
page, it may crash because the renderer is mistakenly attempting to
apply the patch with ObjC data a second time, which it doesn't need to.

Resolves: rdar://154225522
@mportiz08 mportiz08 requested review from Teapane and eango July 2, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants