Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88875

WebChannel is broken in ApplicationWorld with javascript disabled in MainWorld

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2
    • 5.15.1
    • WebEngine
    • None
    • Windows

    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)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davidsz Szabolcs David
            mgenessegrenier Mathieu Genesse-Grenier
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes