Bug 15931

Summary: Eliminate Instance::createBindingForLanguageInstance()
Product: WebKit Reporter: Alp Toker <alp>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: barraclough, ggaren, michael.goddard
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Alp Toker
Reported 2007-11-10 03:41:09 PST
Instance::createBindingForLanguageInstance() and Instance::createRuntimeObject() currently hard-code all possible binding types in a large switch statement. This is a bottleneck for increasing the modularity of JavaScriptCore. It can be fixed fairly easily but its many callers throughout JavaScriptCore, WebCore and WebKit will need to be refactored to accommodate the change. The fix will probably involve getting callers to instantiate the object wrapper directly instead of calling this utility function.
Attachments
Michael Goddard
Comment 1 2007-12-20 18:05:27 PST
Hmm.. I'd like to see the ability to use Object.prototype functions (like hasOwnProperty etc) on runtime objects (in particular Qt ones).. either RuntimeObjectImp inherits from Object, or certain functions are copied over, or different language bindings could have different runtime JSObjects.. If the callers have to instantiate the object wrappers directly, this would be a bit more difficult than having a centralized convenience function. I don't like having the Instance API itself (the non static functions) exposed, however, since I don't think they add value.
Note You need to log in before you can comment on or make changes to this bug.