[Webkit-unassigned] [Bug 85009] ScriptStateProtectedPtr should not keep a strong reference to the context

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 27 06:51:14 PDT 2012


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





--- Comment #8 from Yury Semikhatsky <yurys at chromium.org>  2012-04-27 06:51:15 PST ---
(In reply to comment #1)
> +pavel
> 
> I see three ways to fix this:
> 
> 1) discard console messages when the context goes away
> 2) keep the console messages, but cope with the script arguments maybe not being there
> 3) instead of retaining the whole context, only retain the individual arguments
> 
The problem is that we need to get the context while formatting the message. Also an argument may well keep reference to the context and keeping strong reference to the argument would keep the context alive. So it doesn't seem to make sense to have weak ref to the context and strong refs to the arguments. At the same time having weak refs to the arguments we cannot be sure that they are not collected. So the current approach when we discard arguments along with the context on frame navigation and clear all messages on the main frame navigation seems ok. We need to fix the scenario described above though.

-- 
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