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

QScriptValue::construct() crashes if the constructor throws a non-Object value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 4.7.2
    • 4.6.0
    • Qt Script
    • None
    • 746f4b50e9c13c720162f3bcc8795b7ef772fbba

      The attached application crashes.
      The expected output is "123", as per the description at http://doc.trolltech.com/4.7/qscriptvalue.html#construct: "Calling construct() can cause an exception to occur in the script engine; in that case, construct() returns the value that was thrown".
      It didn't crash in 4.5, but the output was wrong there as well ("[object Object]", i.e. it looks like it returned a new object rather than the exception value).

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

            kenthans Kent Hansen (Inactive)
            kenthans Kent Hansen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes