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

Storing QJSValue references while using QJSEngine::evaluate() results in garbage collection issue

    XMLWordPrintable

    Details

    • Commits:
      073cde9d21f95a896ffff3abfcc9a9da89175e28 (qtdeclarative)

      Description

      There is QObject exposed to javascript allowing to load javascript from file, evaluate it and reference it in the calling js code (method require()). Also it stores QJSValue for the future usage (e.g. return it if the same name will be requested). It results in maybe missed reference (garbage collector is trying to gather it while reference still exists). See attachment (needs cmake 2.8.8+ but can be modified to use qmake easily I guess )

        Attachments

        1. patch.txt
          2 kB
        2. test_js.tar.gz
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            shausman Simon Hausmann
            Reporter:
            deztructor Denis Zalevskiy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes