Closed Bug 567459 Opened 15 years ago Closed 4 years ago

Inconsistent script line extent for last executable statement in function

Categories

(Core :: JavaScript Engine, defect)

x86
Other
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: yeyan83, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5 Build Identifier: Trunk The script line extent of a for-loop within a function will change depending on whether the for-loop is the last executable statement in the function. Reproducible: Always Steps to Reproduce: 1. Simply paste the following function onto the javascript shell command line, taking care to keep the newlines as they are: function testfunc() { for (var i = 0; i < 4; ++i) { print(i); print(i+1); print(i+2); print(i+3); print(i+4); print(i+5); } //print("hello!"); } 2. Type getslx(testfunc) on the command line. 3. You will see that return value is 2 (incorrect value). 4. Restart the javascript shell. 5. Paste the same function with the print("hello!") line *uncommented*. 6. Type getslx(testfunc) on the command line. 7. You will see that return value is 10 (correct value). Actual Results: On step 3, the return value was 2. Expected Results: On step 3, the expected value is 9.
Assignee: general → nobody

Closing this as resolved:incomplete, the last activity on this issue was 12 years ago and it might not be relevant anymore.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.