RESOLVED FIXED 120617
Change type of Document::doctype back to a raw pointer
https://bugs.webkit.org/show_bug.cgi?id=120617
Summary Change type of Document::doctype back to a raw pointer
Darin Adler
Reported 2013-09-02 23:47:12 PDT
Change type of Document::doctype back to a raw pointer
Attachments
Patch (3.10 KB, patch)
2013-09-02 23:49 PDT, Darin Adler
kling: review+
kling: commit-queue-
Darin Adler
Comment 1 2013-09-02 23:49:13 PDT
Darin Adler
Comment 2 2013-09-02 23:49:44 PDT
Kling, did you have a good reason to change this to a RefPtr?
Andreas Kling
Comment 3 2013-09-03 06:53:25 PDT
Comment on attachment 210327 [details] Patch Sure. r=me You should change documentTypeString() in markup.cpp back as well.
Andreas Kling
Comment 4 2013-09-03 07:37:17 PDT
(In reply to comment #2) > Kling, did you have a good reason to change this to a RefPtr? Not a great one. I felt that since this function is not performance-critical and its primary purpose is providing web API, we might as well tailor it to that use case. If that makes it a little more awkward to use it internally, all the better. BUT now that I look closer, it appears that JSC bindings don't actually handle PassRefPtr return values so well, and we end up with an extra ref/deref pair! :(
Darin Adler
Comment 5 2013-09-03 10:03:15 PDT
(In reply to comment #4) > I felt that since this function is not performance-critical and its primary purpose is providing web API, we might as well tailor it to that use case. If that makes it a little more awkward to use it internally, all the better. It seems OK to me to put the ref into the bindings rather than into the function in the DOM itself. In my opinion, functions should not return a PassRefPtr if it they don’t need to. For one thing, if there's already a wrapper there is no need to ref the pointer. > BUT now that I look closer, it appears that JSC bindings don't actually handle PassRefPtr return values so well, and we end up with an extra ref/deref pair! :( Oh, we should fix that.
Darin Adler
Comment 6 2013-09-03 21:52:18 PDT
Lucas Forschler
Comment 7 2019-02-06 09:03:03 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note You need to log in before you can comment on or make changes to this bug.