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

QJSValue has a different representation of NULL to QV8Engine

    XMLWordPrintable

Details

    Description

      QJSValue represents a NULL value as QVariant(QMetaType::VoidStar, 0), which is at odds with the definition resulting from QV8Engine::toBasicVariant(), which returns QVariant();

      The latter cannot be changed, because it would result in property lookups that return null pointers yielding true from IsValid(), which would be an API change.

      Currently, the only place this discrepancy causes a problem is in the v4 autotest, where it causes V4 and V8 to produce different results when initializing a QJSValue property to 'null'. Perhaps it is not actually helpful to preserve type information in converting a void* via QJSValue, since this does not conform to the QV8Engine behavior?

      Attachments

        Issue Links

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

          Activity

            People

              nierob Nierob
              mvogt Matthew Vogt (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes