RESOLVED FIXED 41823
Fix adoptRef assertion failures caused by stack-allocated ResourceHandle objects
https://bugs.webkit.org/show_bug.cgi?id=41823
Summary Fix adoptRef assertion failures caused by stack-allocated ResourceHandle objects
Darin Adler
Reported 2010-07-07 18:10:51 PDT
Fix adoptRef assertion failures caused by stack-allocated ResourceHandle objects
Attachments
Patch (5.25 KB, patch)
2010-07-07 18:12 PDT, Darin Adler
no flags
resourcehandle.diff (2.63 KB, patch)
2010-07-08 12:28 PDT, Xan Lopez
no flags
Darin Adler
Comment 1 2010-07-07 18:12:31 PDT
Darin Adler
Comment 2 2010-07-07 18:18:13 PDT
Comment on attachment 60818 [details] Patch Anders reviewed this.
Darin Adler
Comment 3 2010-07-07 18:19:44 PDT
WebKit Review Bot
Comment 4 2010-07-07 18:39:10 PDT
http://trac.webkit.org/changeset/62736 might have broken GTK Linux 32-bit Release
Gustavo Noronha (kov)
Comment 5 2010-07-08 10:05:17 PDT
The failure reported by the bot seems to be indeed caused by this change. These two tests started timing out with the change, and reverting the change locally make them work again: http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync.html http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync.html
Darin Adler
Comment 6 2010-07-08 10:43:27 PDT
Uh oh. Any ideas for fixing that?
Xan Lopez
Comment 7 2010-07-08 11:09:44 PDT
(In reply to comment #6) > Uh oh. Any ideas for fixing that? Aren't you just never calling .start() in the handle after the patch?
Darin Adler
Comment 8 2010-07-08 11:10:41 PDT
(In reply to comment #7) > Aren't you just never calling .start() in the handle after the patch? I believe the synchronous loading function now calls create(), which calls start(). So that should work.
Xan Lopez
Comment 9 2010-07-08 11:18:03 PDT
(In reply to comment #8) > (In reply to comment #7) > > Aren't you just never calling .start() in the handle after the patch? > > I believe the synchronous loading function now calls create(), which calls start(). So that should work. I see, you are right. I guess the explanation is that it's failing in the previous checks in the create function now, otherwise the code seems identical.
Darin Adler
Comment 10 2010-07-08 11:20:01 PDT
(In reply to comment #9) > I see, you are right. I guess the explanation is that it's failing in the previous checks in the create function now, otherwise the code seems identical. I guess instead of calling create we should just explicitly do adoptRef(new) and start() to keep things working for now, and consider adding a FIXME saying we should use create. Xan, do you want to use a new bug to track that change? Do you want me to do it, or would you do it?
Xan Lopez
Comment 11 2010-07-08 11:24:37 PDT
(In reply to comment #10) > (In reply to comment #9) > > I see, you are right. I guess the explanation is that it's failing in the previous checks in the create function now, otherwise the code seems identical. > > I guess instead of calling create we should just explicitly do adoptRef(new) and start() to keep things working for now, and consider adding a FIXME saying we should use create. Xan, do you want to use a new bug to track that change? Do you want me to do it, or would you do it? Let me do the patch and test it here, I'll attach it in the bug and you can review it.
Xan Lopez
Comment 12 2010-07-08 12:28:16 PDT
Created attachment 60927 [details] resourcehandle.diff Sorry for the delay, a World recompile kicked in. This fixes things locally for me.
Darin Adler
Comment 13 2010-07-08 13:52:49 PDT
Comment on attachment 60927 [details] resourcehandle.diff WebCore/platform/network/soup/ResourceHandleSoup.cpp:665 + handle.get()->start(frame); No need for get() here.
Xan Lopez
Comment 14 2010-07-08 14:02:09 PDT
Comment on attachment 60927 [details] resourcehandle.diff Landed in r62832 with the suggested fix.
Note You need to log in before you can comment on or make changes to this bug.