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

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to