Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-15378

The scriptRecursionLimit property does not limit recursion in a script.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Later
    • Adobe Flex SDK 4.0 (Release)
    • None
    • mx: Application
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Run the code below. Note that it has scriptRecursionLimit="50".
      2. Click the button to start recursing.

      Actual Results:
      It recurses 2,453 times before a stack overflow occurs.

      Expected Results:
      It should stop after 50.

      Workaround (if any):
      Put your own check in.

      Code:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" scriptRecursionLimit="50">

      <mx:Script>
      <![CDATA[
      private var recurses:int = 0;

      private function recurse():void

      { trace("recurses: " + recurses++); recurse(); }

      ]]
      >
      </mx:Script>

      <mx:Button label="Recurse" click="recurse()" />
      </mx:Application>

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: