[webkit-reviews] review requested: [Bug 36482] Regression(r55766): [Chromium] chromiumDataObject.hasData() reports true for an empty clipboard : [Attachment 51485] patch - check whether new URL is valid/empty, fix 2 incorrect usages in ClipboardChromium

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 24 01:31:21 PDT 2010


Roland Steiner <rolandsteiner at chromium.org> has asked  for review:
Bug 36482: Regression(r55766): [Chromium] chromiumDataObject.hasData() reports
true for an empty clipboard
https://bugs.webkit.org/show_bug.cgi?id=36482

Attachment 51485: patch - check whether new URL is valid/empty, fix 2 incorrect
usages in ClipboardChromium
https://bugs.webkit.org/attachment.cgi?id=51485&action=review

------- Additional Comments from Roland Steiner <rolandsteiner at chromium.org>
> Aha, found it.  ChromiumClipboard is a friend class of ChromiumDataObject and

> it sets url directly in a lot of places (declareAndWriteDragImage, writeURL,
> etc).  I guess they should no longer be friends?  That causes this check to
be
> missed most of the time.

The friend clause was actually by design, so that ClipboardChromium (and only
ClipboardChromium) can populate a ChromiumDataObject without too much fuss. But
you're right, the last 2 places (declareAndWriteDragImage, writeURL) are
incorrect. That's actually a bug from an earlier patch, but I can just as well
fix it here.

Uploaded new patch that fixes the incorrect usage.

(Aside: Note that this code may well be quite short-lived once Daniel Cheng
finishes his general MIME-support refactoring.)


More information about the webkit-reviews mailing list