Bug 13643 - Implement Function.prototype.caller
Summary: Implement Function.prototype.caller
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 419.x
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-09 10:06 PDT by Garrett Smith
Modified: 2007-05-09 13:31 PDT (History)
0 users

See Also:


Attachments
Test caller property (186 bytes, text/html)
2007-05-09 10:45 PDT, Garrett Smith
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Garrett Smith 2007-05-09 10:06:49 PDT
function.caller is essential for real application development. 

Necessary for: 
 - checking a function's entryPoint (necessary for lazy-load singleton)
 - for debugging, to generate a stack trace

function bar() {
  foo();
}

function foo() { 
  alert( foo.caller ); // undefined.
)

bar();
Documentation from the fine folks at mozilla:
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Function:caller

Bug from the smart people working on mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=65683
Comment 1 Sam Weinig 2007-05-09 10:24:40 PDT
Hi Garrett, thanks for submitting the report.  Have you tested this in the latest nightly as I expect this has already been fixed.
Comment 2 Garrett Smith 2007-05-09 10:45:28 PDT
Created attachment 14434 [details]
Test caller property

It works!