Description
WebChannel is not initialized when adding it in QWebEngineScript::ApplicationWorld and disabling javascript in QWebEngineScript::MainWorld (error message "Uncaught ReferenceError: qt is not defined"). WebChannelIPCTransport::DidClearWindowObject which contains WebChannelTransport::Install in qtwebengine/src/core/renderer/web_channel_ipc_transport.cpp is never called.
We tried overriding content::RenderFrameObserver::DidCreateScriptContext in WebChannelIPCTransport and call WebChannelTransport::Install there and it seems to fix the problem (m_canUseContext is set to false in WebChannelIPCTransport::WillReleaseScriptContext)