[GTK] UI process crashes when closing the window right after printing with javascript
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Jan 2014 07:56:42 +0000 (07:56 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Jan 2014 07:56:42 +0000 (07:56 +0000)
commit2880611c49bc7e665c2c17525a35be049b3eec4b
tree0b171fd26757e81f1b51a07c85c76fa23a1659bb
parent0278b9c5022a9ada2eb492c95163b1d5065be436
[GTK] UI process crashes when closing the window right after printing with javascript
https://bugs.webkit.org/show_bug.cgi?id=126981

Reviewed by Gustavo Noronha Silva.

The UI process crashes because when the page is closed, the web
view is destroyed before the print operation has actually
finished. Use a weak pointer to make sure the web view pointer is
set to NULL when the it's destroyed and emit the finished callback
always so that the user can clean up the operation even when the
web view has been closed.

* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(drawPagesForPrintingCompleted):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp