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

[Reg] Crash / incorrect result when setting custom scope chain for a native context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • 4.8.x
    • 4.6.0
    • Qt Script
    • None

    Description

      Against 4.6, the attached program crashes.
      Against 4.7, it gives the output

      "" (expected: 123)
      "123" (expected: empty string)

      Which is not the same as against 4.5.
      An assignment in the custom scope that causes a new variable to be created (i.e. not prefixed by "var") should create the variable on the global object, not on the inner scope.

      Commenting out the "#define BUG2" line exposes another bug, which is that if the activation object of the nested context is popped using QScriptContext::popScope(), but no new scope object is pushed, subsequently QScriptContext::popContext() will crash.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              kenthans Kent Hansen (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes