RESOLVED FIXED 121910
[WK2] Crash at at com.apple.WebKit2: WebKit::VoidCallback::invalidate + 46
https://bugs.webkit.org/show_bug.cgi?id=121910
Summary [WK2] Crash at at com.apple.WebKit2: WebKit::VoidCallback::invalidate + 46
Jer Noble
Reported 2013-09-25 09:02:44 PDT
[WK2] Crash at at com.apple.WebKit2: WebKit::VoidCallback::invalidate + 46
Attachments
Patch (3.99 KB, patch)
2013-09-25 09:07 PDT, Jer Noble
no flags
Patch (3.99 KB, patch)
2013-09-25 10:38 PDT, Jer Noble
no flags
Patch (3.60 KB, patch)
2013-09-25 16:22 PDT, Jer Noble
no flags
Patch (4.66 KB, patch)
2013-09-25 22:28 PDT, Jer Noble
darin: review+
Jer Noble
Comment 1 2013-09-25 09:07:45 PDT
Jer Noble
Comment 2 2013-09-25 09:08:20 PDT
Build Bot
Comment 3 2013-09-25 09:25:08 PDT
Build Bot
Comment 4 2013-09-25 09:47:13 PDT
Jer Noble
Comment 5 2013-09-25 10:38:19 PDT
Build Bot
Comment 6 2013-09-25 11:04:11 PDT
Build Bot
Comment 7 2013-09-25 11:22:37 PDT
Jer Noble
Comment 8 2013-09-25 16:22:40 PDT
Darin Adler
Comment 9 2013-09-25 18:53:27 PDT
Comment on attachment 212635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=212635&action=review I would say review+ except for the confusing assertions. > Source/WebKit2/ChangeLog:10 > + Store a copy of the VoidCallback passed to WKPage, and cancel the callback > + during dealloc by changing it's context to 0. This requires a small change > + to CallbackBase to add the ability to change the context post-creation. You changed the patch to use invalidate, so the comment about CallbackBase is no longer correct. > Source/WebKit2/ChangeLog:13 > + * UIProcess/GenericCallback.h: > + (WebKit::CallbackBase::setContext): Added; simple setter. This change is not in the patch. > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:115 > + ASSERT(!_repaintCallback); This is really confusing. How does calling invalidate on the callback cause it to become a nullptr? > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:409 > + ASSERT(!_repaintCallback); This is really confusing. How does calling invalidate on the callback cause it to become a nullptr? > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:416 > + _repaintCallback = 0; We like nullptr for this in newer code.
Jer Noble
Comment 10 2013-09-25 21:57:09 PDT
(In reply to comment #9) > (From update of attachment 212635 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=212635&action=review > > I would say review+ except for the confusing assertions. > > > Source/WebKit2/ChangeLog:10 > > + Store a copy of the VoidCallback passed to WKPage, and cancel the callback > > + during dealloc by changing it's context to 0. This requires a small change > > + to CallbackBase to add the ability to change the context post-creation. > > You changed the patch to use invalidate, so the comment about CallbackBase is no longer correct. Whoops; i'll update the ChangeLog. > > Source/WebKit2/ChangeLog:13 > > + * UIProcess/GenericCallback.h: > > + (WebKit::CallbackBase::setContext): Added; simple setter. > > This change is not in the patch. And here as well. > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:115 > > + ASSERT(!_repaintCallback); > > This is really confusing. How does calling invalidate on the callback cause it to become a nullptr? When you call VoidCallback::invalidate(), it immediately calls the callback method with an error parameter. The callback method will clear the _repaintCallback. > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:409 > > + ASSERT(!_repaintCallback); > > This is really confusing. How does calling invalidate on the callback cause it to become a nullptr? Ditto. > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:416 > > + _repaintCallback = 0; > > We like nullptr for this in newer code. Will change.
Jer Noble
Comment 11 2013-09-25 22:28:03 PDT
Jer Noble
Comment 12 2013-09-26 11:12:22 PDT
Note You need to log in before you can comment on or make changes to this bug.