RESOLVED FIXED 108808
[Qt] Restore URL Scheme Delegates after QtWebProcess crash
https://bugs.webkit.org/show_bug.cgi?id=108808
Summary [Qt] Restore URL Scheme Delegates after QtWebProcess crash
Milian Wolff
Reported 2013-02-04 03:17:20 PST
When the QtWebProcess crashes, the registered URL Scheme Delegates are not properly restored over IPC in the newly launched process instance.
Attachments
Patch (2.65 KB, patch)
2013-02-04 03:27 PST, Milian Wolff
no flags
Patch (2.67 KB, patch)
2013-02-04 06:17 PST, Milian Wolff
no flags
Patch (2.74 KB, patch)
2013-02-15 06:42 PST, Milian Wolff
no flags
Milian Wolff
Comment 1 2013-02-04 03:27:29 PST
Zeno Albisser
Comment 2 2013-02-04 04:48:06 PST
LGTM
Simon Hausmann
Comment 3 2013-02-04 05:35:22 PST
Comment on attachment 186334 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186334&action=review > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:790 > + for (int i = 0; i < experimental->schemeDelegates_Count(&schemes); ++i) { Why not call _Count before the loop instead of for each iteration? It cannot be inlined. LGTM otherwise.
Milian Wolff
Comment 4 2013-02-04 06:17:12 PST
Simon Hausmann
Comment 5 2013-02-04 07:02:05 PST
LGTM. Perhaps Benjamin can help us with the review :)
Michael Brüning
Comment 6 2013-02-14 07:11:51 PST
Comment on attachment 186364 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186364&action=review > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:789 > + QQmlListProperty<QQuickUrlSchemeDelegate> schemes = experimental->schemeDelegates(); I think we have to add this here in order to keep qrc-schemes working: webPageProxy->registerApplicationScheme(ASCIILiteral("qrc"));
Benjamin Poulain
Comment 7 2013-02-14 16:33:13 PST
Comment on attachment 186364 [details] Patch I have nothing against this. Simon, feel free to review. On a related node: shouldn't you switch to the CustomProtocolManager instead of the custom ApplicationScheme thingy? On a slightly related side note: It would be good to split WebPage and WebPageProxy between the stuff that are core, and the stuff that are platform quirks. This could be done by supplements and/or subclasses. Maybe you want to start something like this to clean custom handling like ApplicationScheme?
Zeno Albisser
Comment 8 2013-02-15 01:10:40 PST
(In reply to comment #7) > (From update of attachment 186364 [details]) > I have nothing against this. Simon, feel free to review. > > On a related node: shouldn't you switch to the CustomProtocolManager instead of the custom ApplicationScheme thingy? > On a slightly related side note: It would be good to split WebPage and WebPageProxy between the stuff that are core, and the stuff that are platform quirks. This could be done by supplements and/or subclasses. Maybe you want to start something like this to clean custom handling like ApplicationScheme? Hi Benjamin, I am currently working on exactly that issue. I think the CustomProtocolManager will fit relatively well. The only thing that I am aware of, that might be missing is a way to register/unregister schemes at runtime through the C-API. - Or did I overlook anything there?
Benjamin Poulain
Comment 9 2013-02-15 01:17:38 PST
> The only thing that I am aware of, that might be missing is a way to register/unregister schemes at runtime through the C-API. - Or did I overlook anything there? RegisterScheme/UnregisterScheme? http://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.messages.in :)
Benjamin Poulain
Comment 10 2013-02-15 01:18:34 PST
Oh, through C API! Yep, it is possible there isn't one.
Simon Hausmann
Comment 11 2013-02-15 01:39:20 PST
Comment on attachment 186364 [details] Patch r=me, signed off for WK2 by Benjamin, but Michael's proposed change seems required before landing (cq-)
Milian Wolff
Comment 12 2013-02-15 06:42:06 PST
Milian Wolff
Comment 13 2013-02-15 06:44:03 PST
OK, qrc scheme handler gets reregistered now as well. I furthermore created https://bugs.webkit.org/show_bug.cgi?id=109934 to figure out how we can disable the qrc scheme handler if not desired. Anything else?
WebKit Review Bot
Comment 14 2013-02-15 07:35:37 PST
Comment on attachment 188553 [details] Patch Clearing flags on attachment: 188553 Committed r142997: <http://trac.webkit.org/changeset/142997>
WebKit Review Bot
Comment 15 2013-02-15 07:35:42 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.