[webkit-reviews] review requested: [Bug 217684] REGRESSION (r268384): ASSERTION FAILED: _startCount > 1 in -[WKMouseDeviceObserver stop] : [Attachment 411294] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 13 19:48:42 PDT 2020


Devin Rousso <drousso at apple.com> has asked  for review:
Bug 217684: REGRESSION (r268384): ASSERTION FAILED: _startCount > 1 in
-[WKMouseDeviceObserver stop]
https://bugs.webkit.org/show_bug.cgi?id=217684

Attachment 411294: Patch

https://bugs.webkit.org/attachment.cgi?id=411294&action=review




--- Comment #5 from Devin Rousso <drousso at apple.com> ---
Created attachment 411294

  --> https://bugs.webkit.org/attachment.cgi?id=411294&action=review

Patch

(In reply to Devin Rousso from comment #4)
> clearly there is something magical happening here :(

I have found the magic!  It was past me being stupid ��

It should be `_startCount >= 1` as it's totally possible for there to have been
only one prior call to `-[WKMouseDeviceObserver
start]`/`-[WKStylusDeviceObserver start]`.

I tested this change locally and it passed all the API tests with no crashes.

I think I'd still suggest the patch as I've written it as it's more
permissive/forgiving (e.g. if someone _really_ wants to make sure the listener
has stopped then they can call it without having to worry about a crash).  If
there is a preference/precedence for ensuring that things like this listener
are not over-stopped then I can just adjust the `ASSERT`.


More information about the webkit-reviews mailing list