[Qt][WK2] Application URL schemes cause asserts when using debug.
authorzeno.albisser@nokia.com <zeno.albisser@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 10:03:54 +0000 (10:03 +0000)
committerzeno.albisser@nokia.com <zeno.albisser@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 10:03:54 +0000 (10:03 +0000)
commit048f743d9e3b24ad51d616299943dfe3b402144f
tree9d63beb12b54a9d15eb86ba3fb725b00c4eb1c3e
parent97e2d5a23706cac0ec5d72e9af8686a010accc7b
[Qt][WK2] Application URL schemes cause asserts when using debug.
https://bugs.webkit.org/show_bug.cgi?id=76700

Instances of QtNetworkRequestData / QtNetworkReplyData are meant
to be used for transfering data over IPC. To allow transferring
instances of these classes over IPC they need to be copyable,
and it must be possible to create such instances on the stack.
Because classes that inherit from RefCounted always need to be
used in connection with RefPtr, QtNetworkRequestData and
QtNetworkReplyData cannot inherit directly from RefCounted.

Deleting an object that inherits from RefCounted, without
the proper sequence of ref()/deref() being called by it's
RefPtr, causes asserts when running a debug version.

Reviewed by Simon Hausmann.

* Shared/qt/QtNetworkReplyData.h:
(WebKit::QtRefCountedNetworkReplyData::data):
* Shared/qt/QtNetworkRequestData.cpp:
(WebKit::QtRefCountedNetworkRequestData::QtRefCountedNetworkRequestData):
* Shared/qt/QtNetworkRequestData.h:
(WebKit::QtRefCountedNetworkRequestData::data):
* Target.pri:
* UIProcess/API/qt/qquicknetworkreply.cpp:
(QQuickNetworkReply::QQuickNetworkReply):
(QQuickNetworkReply::contentType):
(QQuickNetworkReply::setContentType):
(QQuickNetworkReply::operation):
(QQuickNetworkReply::setOperation):
(QQuickNetworkReply::contentDisposition):
(QQuickNetworkReply::setContentDisposition):
(QQuickNetworkReply::location):
(QQuickNetworkReply::setLocation):
(QQuickNetworkReply::lastModified):
(QQuickNetworkReply::setLastModified):
(QQuickNetworkReply::cookie):
(QQuickNetworkReply::setCookie):
(QQuickNetworkReply::userAgent):
(QQuickNetworkReply::setUserAgent):
(QQuickNetworkReply::server):
(QQuickNetworkReply::setServer):
(QQuickNetworkReply::data):
(QQuickNetworkReply::setData):
(QQuickNetworkReply::send):
(QQuickNetworkReply::networkRequestData):
(QQuickNetworkReply::setNetworkRequestData):
(QQuickNetworkReply::networkReplyData):
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquicknetworkrequest.cpp:
(QQuickNetworkRequest::QQuickNetworkRequest):
(QQuickNetworkRequest::setNetworkRequestData):
(QQuickNetworkRequest::url):
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::invokeApplicationSchemeHandler):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleApplicationSchemeRequest):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::resolveApplicationSchemeRequest):
(WebKit::WebPageProxy::sendApplicationSchemeReply):
* WebProcess/qt/QtNetworkReply.cpp:
(WebKit::QtNetworkReply::setData):
(WebKit::QtNetworkReply::readData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/qt/QtNetworkReplyData.h
Source/WebKit2/Shared/qt/QtNetworkRequestData.cpp
Source/WebKit2/Shared/qt/QtNetworkRequestData.h
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp
Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h
Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/qt/QtPageClient.cpp
Source/WebKit2/UIProcess/qt/QtPageClient.h
Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp