[Webkit-unassigned] [Bug 135569] Always clear ConsoleClient when Page/WindowShell is destroyed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 4 14:23:01 PDT 2014


--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org>  2014-08-04 14:23:12 PST ---
(In reply to comment #3)
> Usually, it is the client's responsibility to clear this pointer, usually in the client object's destructor. Would that approach work here?
> (I think this patch is fine too, but it would be a bit cleaner for the client to clear its own pointer.)

This is a little more complicated than that. During the lifetime of a page, it seems there may be the potential for multiple DOMWindow objects / JSGlobalObjects. As these come and go (page navigation) we want to make sure we configure the ConsoleClient in each of these to be the PageConsole.

Currently this happens in WindowShell initialization and clearing in ScriptController. With one other place in ScriptCachedFrameData::restore when a page is created from the page cache. Here we are fixing an overlooked case in destruction (which doesn't go through the normal clearing path).

I agree, this is messy and should be made clearer somehow.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list