[Webkit-unassigned] [Bug 196324] New: Web Inspector: Canvas: unbinding a canvas should always remove the agent as an observer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 27 15:42:58 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=196324

            Bug ID: 196324
           Summary: Web Inspector: Canvas: unbinding a canvas should
                    always remove the agent as an observer
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: drousso at apple.com
                CC: inspector-bugzilla-changes at group.apple.com

`InspectorCanvasAgent::unbindCanvas` is currently called in two places:
 - `InspectorCanvasAgent::frameNavigated`, right after the `InspectorCanvasAgent` removes itself as an observer from the canvas in question
 - `InspectorCanvasAgent::canvasDestroyed`, which is called on all observers when the canvas is about to be destructed
Previously, in order to avoid modification-while-iterating, we wouldn't remove the `InspectorCanvasAgent` from the canvas inside `InspectorCanvasAgent::canvasDestroyed`, since the canvas is about to be destructed anyways.  This isn't a very good practice, and should be "corrected" (e.g. the observer shouldn't have any idea about the specifics of how the canvas treats/notifies its observers).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190327/98d528f6/attachment-0001.html>


More information about the webkit-unassigned mailing list