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

Summary: Solve Anonymous Function Name
Product: javascript Reporter: Joelle Lam <joellelam>
Component: DebuggerAssignee: Quy Nguyen <quynguyen>
Status: RESOLVED FIXED    
Severity: blocker CC: deva, sandipchitale
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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