History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5181
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: Unassigned
Reporter: P T Withington
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

new calls do not have correct line number in backtrace

Created: 02/Dec/07 04:02 PM   Updated: 04/Dec/07 02:03 PM
Component/s: Compiler - JavaScript
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,445
Runtime: N/A
Fix in hand: False


 Description  « Hide
A new call is a function call, just like any other call expression, but the line number annotation is not updated for a new call. Hence an error in a constructor will report the incorrect line number in the caller. E.g.:

<canvas>
  <script>
    function Foo () { null.bar(); };
    (function test () {
      Debug.info("Current line number");
      new Foo();
    })();
 </script>
</canvas>

Will give a backtrace showing the new call as coming from line #5 when it should say line #6.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 04/Dec/07 02:03 PM
r7445 | ptw | 2007-12-04 17:00:52 -0500 (Tue, 04 Dec 2007) | 28 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMessage.lzs
   M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
   M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java

Change 20071202-ptw-w by ptw@dueling-banjos.local on 2007-12-02 20:37:06 EST
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Debugger improvements to help me with diamond DHTML

Bugs Fixed:
LPP-5182 'We could give better backtraces for unhandled errors in DHTML'
LPP-5181 'new calls do not have correct line number in backtrace'

Technical Reviewer: dda@ddanderson.com (Message-Id: <FA6270BB-CDAD-4533-B76B-25F0D9981C6C@ddanderson.com>)
QA Reviewer: ewinard@laszlosystems.com (pending)

Details:
    LzMessage: Look for saved backtrace

    LzRuntime: Pass uncaught error backtrace to LzMessage

    JavascriptGenerator, CodeGenerator: Break out call-site
    annotation, use in function calls and new calls

    JavascriptGenerator: Put a catch block around all functions to
    record a backtrace if an exception is thrown and not caught.

Tests:
    smokecheck, test case from bugs