We need to check NULL frame in EventHandler::updateDragAndDrop. Otherwise, if we drag something to an iframe with invalid source, it might crash.
Created attachment 40379 [details] Proposed Patch
Comment on attachment 40379 [details] Proposed Patch > - if (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > - accept = static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame()->eventHandler()->updateDragAndDrop(event, clipboard); > + Frame* frame = (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > + ? static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame() : 0; We don't line up ? characters like this. In fact, I'm not sure why it's indented the way it is. Just indent four characters as you would anywhere else. r=me
(In reply to comment #2) > (From update of attachment 40379 [details]) > > - if (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > > - accept = static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame()->eventHandler()->updateDragAndDrop(event, clipboard); > > + Frame* frame = (newTarget->hasTagName(frameTag) || newTarget->hasTagName(iframeTag)) > > + ? static_cast<HTMLFrameElementBase*>(newTarget)->contentFrame() : 0; > > We don't line up ? characters like this. In fact, I'm not sure why it's > indented the way it is. Just indent four characters as you would anywhere else. > > r=me I just copied the same code structure from the nearby code. I will fix both occurrences when I land the change. Thanks.
Committed as http://trac.webkit.org/changeset/48934.