Hi All,
Is the following usage of formstate correct in following function in
FrameLoader.cpp?
void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const
String& frameName, bool lockHistory, FrameLoadType newLoadType,
PassRefPtr<Event> event, PassRefPtr<FormState> prpFormState)
{
RefPtr<FormState> formState = prpFormState;
bool isFormSubmission = formState;
....
targetFrame->loader()->loadURL(newURL, referrer, String(), lockHistory,
newLoadType, event, formState); <------wrong as per my understanding
targetFrame->loader()->loadURL(newURL, referrer, String(), lockHistory,
newLoadType, event, formState.release()); <----Should be like this
...
}
I checked the webkit trunk. There are several such instances of this in
Frameloader.cpp.
As per my understanding of RefPtr & PassRefPtr, we should
call formState.release() to pass "PassRefPtr".
Thanks a lot,
Dinesh
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help