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

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

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes