[webkit-dev] Regarding kjs:Window:clear()

Nilesh Patil vniles at gmail.com
Mon Mar 16 00:34:49 PDT 2009


Thank you Darin !!

- Niilesh
On Fri, Mar 13, 2009 at 9:35 PM, Darin Adler <darin at apple.com> wrote:
> On Mar 13, 2009, at 12:45 AM, Nilesh Patil wrote:
>
>> What does kjs:Window:clear() do ?
>
> You must be looking at an old version of the WebKit source tree; there is no
> longer a function of that name.
>
> The JSDOMWindowBase::clear function clears out the state of a DOM window
> object, leaving it in a state where it can be re-used on a new document.
>
>> will it call destructor ?
>
> I don’t understand the question. The clear function doesn’t directly call
> any destructor and is not responsible for destroying the DOM window object,
> if that’s what you’re asking.
>
>> Because its not called when window is closed
>
> With the latest WebKit and Safari on Mac OS X, and it was called when I did
> the following test:
>
>    1) go to www.google.com
>    2) close the window
>
> The -[WebView _close] method called FrameLoader:;detachFromParent, which
> called Frame::pageDestroyed, which called
> ScriptController::clearWindowShell, which called JSDOMWindowBase::clear.
>
>    -- Darin
>
>


More information about the webkit-dev mailing list