Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-6408

Obnoxiously instantiated free component may disrupt workflow evaluation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pull Request
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: IoC System
    • Labels:
      None

      Description

      This issue only affects the in-progress FLUID-6148.
      Although the technique is strongly discouraged and will soon be forbidden, the framework currently permits a component creator function to be invoked by an expander. This creates a likely memory leak since the component will not be torn down by ordinary destruction of the component tree, and also does not participate in reference resolution.
      The technique is currently in use in the preferences framework's tests https://github.com/amb26/infusion/blob/FLUID-6148/tests/framework-tests/preferences/js/PanelTestUtils.js
      which include

          fluid.defaults("fluid.tests.panels.utils.defaultTestPanel", {
              gradeNames: "fluid.resourceLoader",
              strings: {},
              testMessages: {},
              parentBundle: {
                  expander: {
                      funcName: "fluid.messageResolver",
                      args: [{messageBase: "{that}.options.testMessages"}]
                  }
              }
          });
      

      Whilst we curse this technique, it's important to ensure that the workflow algorithm is robust in the face of it. The issue is that our "stack of sequences" approach allows actions kicked off during concludeComponentObservation of one component to run ahead on the next "stack frame".

      In fact we need a "hybrid time" approach whereby all workflow phases before concludeComponentInit proceed "orthochronously" according to the planned Qix flooding (that is, reusing the same sequence) and new sequences only get allocated by concludeComponentInit itself. This restores the view that a component constructed during createOnEvent is fully constructed by the time the event handler returns (the original purpose of having the sequence stack in the first place) but that all prior workflow phases retain their proper sequencing amongst each other.

        Attachments

          Activity

            People

            Assignee:
            antranig Antranig Basman
            Reporter:
            antranig Antranig Basman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: