Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-4392

[JS Performances] remove all eval

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.0
    • None
    • None
    • None

      Replace all evals by something like

      function executeFunctionByName(functionName, context /*, args */) {
          var args = Array.prototype.slice.call(arguments, 2);
          var namespaces = functionName.split(".");
          var func = namespaces.pop();
          for (var i = 0; i < namespaces.length; i++) {
              context = context[namespaces[i]];
          }
          return context[func].apply(context, args);
      }
      

          [CMS-4392] [JS Performances] remove all eval

          Raphaël Franchet made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Raphaël Franchet made changes -
          Fix Version/s New: 4.2.0 [ 14425 ]
          Fix Version/s Original: 3.8.5 [ 14565 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          The Ametys object give several methods for this optimisation
          So in Runtime there is only one eval that stays...

          Raphaël Franchet added a comment - The Ametys object give several methods for this optimisation So in Runtime there is only one eval that stays...
          Laurence Aumeunier made changes -
          Fix Version/s New: 3.8.5 [ 14565 ]
          Fix Version/s Original: 3.8.4 [ 14402 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 3.8.4 [ 14402 ]
          Fix Version/s Original: 3.8.3 [ 14086 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 3.8.3 [ 14086 ]
          Fix Version/s Original: 3.8.2 [ 13686 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 3.8.2 [ 13686 ]
          Fix Version/s Original: 3.8.1 [ 13089 ]
          Laurence Aumeunier made changes -
          Fix Version/s Original: 3.8 [ 12386 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 3.8.1 [ 13089 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 3.7 [ 12386 ]
          Fix Version/s Original: 3.6 [ 11785 ]

            Unassigned Unassigned
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: