[webkit-reviews] review requested: [Bug 26104] [GTK] Make NetworkRequest a proper GObject and expose SoupMessage : [Attachment 30943] Refactor handling of the SoupMessage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 4 06:35:26 PDT 2009


Gustavo Noronha (kov) <gns at gnome.org> has asked  for review:
Bug 26104: [GTK] Make NetworkRequest a proper GObject and expose SoupMessage
https://bugs.webkit.org/show_bug.cgi?id=26104

Attachment 30943: Refactor handling of the SoupMessage
https://bugs.webkit.org/attachment.cgi?id=30943&action=review

------- Additional Comments from Gustavo Noronha (kov) <gns at gnome.org>
So, a small rationale: after landing the original patch, I went ahead and
started experimenting with implementing more functionality, using the
willSendRequest 'delegate'.

I have a patch I'll post here soonish that implements that as a new signal.
That patch exposed a bug in my original patch, though: I implemented a copy
constructor to handle the fact that SoupMessage had to be treated in a special
way, but I did not override operator=, which causes the message to be
shallow-copied in some cases, and thus double-freed.

I did implement the operator= override, and it works, but I decided to avoid
all this complexity by taking the same approach used by Qt: we create a new
SoupMessage whenever we need one, and store nothing in the ResourceRequest
object.

This lowers complexity, and will make us happy campers, not having to deal with
lots of custom code needing updating in ResourceRequest, and less crashes, too.


More information about the webkit-reviews mailing list