Bug 12332

Summary: callWebScriptMethod:withArguments: provides no way to determine if an exception was thrown
Product: WebKit Reporter: Mark Rowe (bdash) <mrowe>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Major Keywords: InRadar
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://lists.apple.com/archives/webkitsdk-dev/2006/Apr/msg00016.html

Mark Rowe (bdash)
Reported 2007-01-18 21:33:57 PST
As per the mailing list post in the specified URL, -[WebScriptObject callWebScriptMethod:withArguments:] translates an exception raised in the called method into a return value of WebUndefined. This makes it impossible to distinguish between a genuine return value of undefined and an exception being thrown. -[WebScriptObject callWebScriptMethod:withArguments:] returns nil in other situations: if the given method doesn't exist on the object, or if it is not a callable. It may make more sense to handle exceptions in a similar way, though the compatibility impact of changing the return value in this case is unknown.
Attachments
Mark Rowe (bdash)
Comment 1 2007-01-18 21:38:38 PST
Note You need to log in before you can comment on or make changes to this bug.