RESOLVED FIXED 85736
Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
https://bugs.webkit.org/show_bug.cgi?id=85736
Summary Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of St...
Kinuko Yasuda
Reported 2012-05-06 09:25:30 PDT
Entry.toURL() implementation should return KURL instead of String. This would not have any visible impact in the app-facing javascript layer but must make the code clearer and more readable.
Attachments
Patch (6.63 KB, patch)
2012-05-06 09:37 PDT, Kinuko Yasuda
no flags
Patch (10.50 KB, patch)
2012-05-06 11:17 PDT, Kinuko Yasuda
no flags
Kinuko Yasuda
Comment 1 2012-05-06 09:37:58 PDT
Kinuko Yasuda
Comment 2 2012-05-06 10:08:10 PDT
This is one of the patches separated from the bigger one for http://webkit.org/b/84135 (for cross-filesystem support).
Kinuko Yasuda
Comment 3 2012-05-06 11:17:03 PDT
David Levin
Comment 4 2012-05-06 11:30:53 PDT
Comment on attachment 140428 [details] Patch I don't understand why I don't see any changes to whoever calls toURL (maybe there was an implicit conversion?). Anyway, as long as this compiles it seems fine.
Kinuko Yasuda
Comment 5 2012-05-06 21:16:21 PDT
(In reply to comment #4) > (From update of attachment 140428 [details]) > I don't understand why I don't see any changes to whoever calls toURL (maybe there was an implicit conversion?). Anyway, as long as this compiles it seems fine. Yes it is converted back to String by implicit conversion in the binding layer. I found that some other IDL implementation is doing this and thought it'd be nice to make it clearer what type of object we are dealing with in C++ world. I could add an explicit conversion code before at the boundary between the binding code if it makes things even clearer.
Kinuko Yasuda
Comment 6 2012-05-07 02:02:32 PDT
Darin Adler
Comment 7 2012-05-07 10:30:45 PDT
Comment on attachment 140428 [details] Patch This seems like a bad change. Why parse the URL and then convert it back to a string each time? We should not use KURL for anything just because it happens to be a URL. This is adding extra work for no benefit.
Kinuko Yasuda
Comment 8 2012-05-07 12:02:40 PDT
(In reply to comment #7) > (From update of attachment 140428 [details]) > This seems like a bad change. Why parse the URL and then convert it back to a string each time? We should not use KURL for anything just because it happens to be a URL. This is adding extra work for no benefit. Ok, on the second thought I wondered the same. I'm going to make another change to revert it. Thanks,
Kinuko Yasuda
Comment 9 2012-05-07 23:57:21 PDT
(In reply to comment #8) > (In reply to comment #7) > > (From update of attachment 140428 [details] [details]) > > This seems like a bad change. Why parse the URL and then convert it back to a string each time? We should not use KURL for anything just because it happens to be a URL. This is adding extra work for no benefit. > > Ok, on the second thought I wondered the same. I'm going to make another change to revert it. Thanks, The patch is: https://bugs.webkit.org/show_bug.cgi?id=85858
Note You need to log in before you can comment on or make changes to this bug.