Do not call -[NSView inputContext] in a dealloc.

-[NSView inputContext] will create an input context if one does not
exist. -[NSTextInputContext initWithClient:] takes a weak reference
to the view. Pre-Catalina, that weak reference was just a raw pointer;
in Catalina, that weak reference is an actual __weak reference,
accessed with objc_storeWeak() et al.

Pre-Catalina, a call to -[NSView inputContext] in a dealloc impl
that ends up trying to create an input context just ends up taking
the raw pointer reference; not the best idea, but not the end of
the world. With Catalina, doing so involves trying to create
a weak reference to a dying object, which makes the ObjC runtime
incredibly unhappy.

This is a sanity check that is breaking the code; remove it.

TEST=as in bug

Change-Id: Ic3d242117c3c5ada0852e4a77296a507b0fccfdc
Reviewed-by: Robert Sesek <>
Reviewed-by: Elly Fong-Jones <>
Auto-Submit: Avi Drissman <>
Commit-Queue: Avi Drissman <>
Cr-Commit-Position: refs/heads/master@{#672187}
1 file changed