The source files NotificationPresenterClientQt.cpp and DumpRenderTreeSupportQt.cpp have redundant checks after static_cast. In NotificationPresenterClientQt.cpp, the final "if()" is not needed: ========================================================= if (!context || context->isWorkerContext()) return 0; Document* document = static_cast<Document*>(context); if (!document) return 0; ========================================================= The context pointer has already been checked, so it must be non-NULL when the static_cast occurs. Thus, document will not be NULL and the check is redundant. Similarly, in DumpRenderTreeSupportQt.cpp: ========================================================= if (!coreNode || !coreNode->renderer()) return false; HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(coreNode); if (!inputElement) return false; ========================================================= coreNode has already been checked and is non-NULL when the static_cast to HTMLInputElement* occurs. The check after the cast is not needed.
Created attachment 82995 [details] remove redundant checks
Comment on attachment 82995 [details] remove redundant checks Clearing flags on attachment: 82995 Committed r79098: <http://trac.webkit.org/changeset/79098>
All reviewed patches have been landed. Closing bug.
Please cherry pick the fix to Qtwebkit 2.1.x
I don't see the point of adding refactorings like this to a stable branch (qtwebkit-2.1.x). Removing from meta-bug. If it fixes a real problem, let me know.