[Webkit-unassigned] [Bug 126121] The JavaScriptCore API ignores dynamically created protocols

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 30 16:46:30 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=126121


Brandon Evans <brandon at brandonevans.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brandon at brandonevans.ca




--- Comment #1 from Brandon Evans <brandon at brandonevans.ca>  2013-12-30 16:44:22 PST ---
I've been investigating this bug as well, and it seems that the private _protocol_getMethodTypeEncoding method also emits type strings (e.g. 'v24 at 0:8 at 16' vs. 'v24 at 0:8@"JSValue"16') when the compiler's type information is available. This extended type information is used when invoking Objective-C code, specifically when parseObjCType calls typeOfClass in ObjcRuntimeExtras.h at L197.

I made the appropriate changes to use method_getTypeEncoding instead like you suggested and most cases seem to work with the exception of methods that accept a JSValue as a parameter (such as a JS function). These end up getting passed an empty NSDictionary, so there's clearly some problems that occur when the argument type information isn't available to JSC.

It may be possible to work around this by also providing protocols for these specific methods and then ignoring them when doing a dynamic export to avoid losing the type information. This is clearly less elegant though.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list