Bug 15931
Summary: | Eliminate Instance::createBindingForLanguageInstance() | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alp Toker <alp> |
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | barraclough, ggaren, michael.goddard |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Alp Toker
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Michael Goddard
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.