RESOLVED INVALID37032
operator ! operated on wrong target which is an object
https://bugs.webkit.org/show_bug.cgi?id=37032
Summary operator ! operated on wrong target which is an object
sw
Reported 2010-04-02 11:27:54 PDT
In WebCore/loader/SubresourceLoader.cpp line 84, the following line is there else if (!request.httpReferrer()) But since request.httpReferrer returns a String object, the ! operator will interpreted unintentionally, the correct fix shall be: else if (request.httpReferrer().isEmpty())
Attachments
Alexey Proskuryakov
Comment 1 2010-04-02 16:17:11 PDT
Does this affect observable behavior? Would you be willing to submit a patch, as described in <http://webkit.org/coding/contributing.html>?
sw
Comment 2 2010-04-02 16:23:01 PDT
seems it's not changing observable behavior. I'll submit a patch soon within 2 weeks since will be off next week.
Alexey Proskuryakov
Comment 3 2010-04-02 16:47:23 PDT
I'm actually not sure if there is anything to fix here. Using operator! with String used to convert to NSString* on Mac, but now we have this: inline bool operator!(const String& str) { return str.isNull(); } And it was added precisely to fix referrer sending: <http://trac.webkit.org/changeset/18577>.
sw
Comment 4 2010-04-02 17:08:11 PDT
I see your point, I should have checked it more carefully. Thanks. I think I need to go back and verify whether the httpReferer will return an empty or plain NULL string.
sw
Comment 5 2010-04-22 13:59:53 PDT
The current code is working as intended. No bug here.
Note You need to log in before you can comment on or make changes to this bug.