This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 140839 - Solve Anonymous Function Name
Summary: Solve Anonymous Function Name
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Quy Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-18 22:12 UTC by Joelle Lam
Modified: 2008-08-15 23:54 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joelle Lam 2008-07-18 22:12:53 UTC
We should solve anonymous function names.
Comment 1 Quy Nguyen 2008-08-15 23:54:14 UTC
I think the only way to solve this for all cases is to parse the entire source file for every anonymous function entry
in the call stack.  I've made a change that works, except in these cases:

a) The anonymous function with an assigned name has its first line of source on the line where the assignment occurs,
e.g. "aMethod : function() { var x = 0".  In this case, the function name will be displayed as 'anonymous'.

b) The function is anonymous but is enclosed by a named function that is assigned up to several lines before the start
of the anonymous function. For example, in this example the anonymous function will be incorrectly displayed as
"aMethod" instead of "anonymous":

aMethod : function() {
  function() {
    var x = 0;
  }.apply(this);
}


Changeset: f730bd3cbef8, 061890562f87