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

[REG: 5.11 -> 5.12] "use strict" in WorkerScript does not allow calling functions defined outside of onMessage function

    XMLWordPrintable

Details

    Description

      To reproduce, run attached example. w.js contains:

      'use strict';
      function func() {
          console.log("func was called")
      }
      
      WorkerScript.onMessage = function(msg) {
          func()
      }
      

      And it will say:

      qrc:/w.js:7: TypeError: undefined is not a function
      

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes