[Webkit-unassigned] [Bug 38711] [chromium] DragDataChromium::asURL() shouldn't do file validity checks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 10 18:10:15 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38711


Daniel Cheng <dcheng at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55328|0                           |1
        is obsolete|                            |
  Attachment #55632|                            |review?
               Flag|                            |




--- Comment #5 from Daniel Cheng <dcheng at chromium.org>  2010-05-10 18:10:12 PST ---
Created an attachment (id=55632)
 --> (https://bugs.webkit.org/attachment.cgi?id=55632)
Patch

Just looking for comments for now. Dmitry commented that there might be some rationale for DragData::asURL to try as hard as possible to not return file:// URLs pointing to things that are not files.

Here are my arguments for why DragData::asURL shouldn't bother trying so hard:
1. Checking the file exists doesn't help much, since the loader will end up needing to do the check too.
2. File IO can be expensive. Why do it twice when you can do it once.
3. This code was never hit on Chromium anyway, due to the fact that we always populate the URL field if we see a URL-like thing in the drag (where that URL-like thing is plain text that happens to resemble a URL, a file object, etc).
4. If the renderer is sandboxed (which more platforms are starting to move towards), the calls will fail. This is already true of Chromium on Windows. Might as well let something which is privileged like the loader handle it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list