[Webkit-unassigned] [Bug 21461] New: JavaScriptCore C API Enhancements (For wrapping type systems)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 7 22:12:07 PDT 2008


           Summary: JavaScriptCore C API Enhancements (For wrapping type
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: carrr at rpi.edu

The current JavaScriptCore C API has several inadequacies and awkward points
making the dynamic wrapping of type systems (such as GObject, or the
Objective-C type system) difficult.

A few of these are outlined as follows, however I am not sure I have identified
them all, or in any way provided best solutions.

- When wrapping an object in the foreign type system, it is difficult to use
static functions. One of these issues, is there is no opportunity to provide
private data to the function (So that in your callback, you can identify which
function in the foreign type system has been called.). An obvious solution
would be an extension to the JSStaticFunction struct. Furthermore, (presumably
for optimization purposes). Another issue is the name member of the
JSStaticFunction struct is declared "const char * const", which obviously has
some awkwardness in creating them from non string literals.

- If not able to use the static function API, you have to manually manage
prototypes to add functions to a class you are creating. However this is
awkward to use, and two things would make this easier:
JSClassDefinition allowing you to specify the prototype to use when not using
automatic prototypes.
Something should allow you to get the prototype a JSClassRef will use without
instantiating an object.

Configure bugmail: https://bugs.webkit.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