Bug 42242

Summary: [Qt] Implement QScriptEngine::newFunction() parts that depend on QScriptContext
Product: WebKit Reporter: Kent Hansen <kent.hansen>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: cmarcelo, jedrzej.nowacki
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 41662    

Kent Hansen
Reported 2010-07-14 02:19:44 PDT
As a start, a QScriptContext can be constructed in our custom JSObjectCallAsFunctionCallback, passing the function, thisObject, argumentCount, and arguments to it; e.g. QScriptContext *QScriptEnginePrivate::createContext(function, thisObject, argumentCount, arguments); This would be sufficient to implement QScriptContext::argument(), QScriptContext::argumentCount(), QScriptContext::callee(), and QScriptContext::thisObject(). Ideally retrieving the information could be delegated to JSContextRef, but it doesn't have the API for it currently. The above approach should cover 95% of the use-cases for QScriptContext wrt. QScriptEngine::newFunction(), however.
Attachments
Caio Marcelo de Oliveira Filho
Comment 1 2011-07-27 12:21:49 PDT
Porting QtScript API over JSC C API will not be continued.
Note You need to log in before you can comment on or make changes to this bug.