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

QJSEngine::evaluate changed behaviour for strict mode scripts

    XMLWordPrintable

Details

    • a1fd2866465c4be2815a6ada776867b3d4efc557

    Description

      QJSEngine::evaluate changed behaviour from 5.10 to 5.11 for strict mode scripts:

          QJSValue def = engine.evaluate("'use strict'; function foo() { return 42 }");
          QJSValue globalObject = engine.globalObject();
          QJSValue foo = globalObject.property("foo");
      
          QJSValue use = engine.evaluate("'use strict'; foo()");
      

      Here foo was a function object in 5.10, but is undefined in 5.11. So use will be ReferenceError in 5.11, while it did work in 5.10.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-65167
          # Subject Branch Project Status CR V

          Activity

            People

              erikv Erik Verbruggen
              erikv Erik Verbruggen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes