[Webkit-unassigned] [Bug 7183] New: JS-Cocoa bridge. If the bridged method has the wrong arity, I'll get a runtime error: like *** Exception handlers were not properly removed...

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Fri Feb 10 17:30:17 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7183

           Summary: JS-Cocoa bridge. If the bridged method has the wrong
                    arity, I'll get a runtime error: like *** Exception
                    handlers were not properly removed...
           Product: WebKit
           Version: 417.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: major
          Priority: P2
         Component: JavaScript
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: michaelkhanna at gmail.com


When using the JS-Cocoa bridge, If the bridged method has the wrong arity, I'll
get a runtime error:

*** Exception handlers were not properly removed. Some code has jumped or
returned out of an NS_DURING...NS_HANDLER region without using the
NS_VOIDRETURN or NS_VALUERETURN macros.

and the program will crash.

the JS caller looks like:
var strBibleRef = DataTypeManager.Render(strRef, strLang, strStyle);

the bridged method looks like:
- (NSString *) Render:(NSString *)strRef
{ .....

the bug does not appear once the arity of the bridged method matches the arity
of the caller; even when the -isSelectorExcludedFromWebScript is improperly
called as such(missing two colons):
+(BOOL)isSelectorExcludedFromWebScript:(SEL)aSel {
        if ( aSel == @selector(Render:)) {
                return NO;
        }
        return YES;
}


My OS is 10.4.4, but I'm using the 10.3.9 SDK.
XCode 2.2


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list