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

QJSEngine::evaluate changed behaviour for strict mode scripts

XMLWordPrintable

    • a1fd2866465c4be2815a6ada776867b3d4efc557

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes