Bug 42242 - [Qt] Implement QScriptEngine::newFunction() parts that depend on QScriptContext
Summary: [Qt] Implement QScriptEngine::newFunction() parts that depend on QScriptContext
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 41662
  Show dependency treegraph
 
Reported: 2010-07-14 02:19 PDT by Kent Hansen
Modified: 2011-07-27 12:21 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Hansen 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.
Comment 1 Caio Marcelo de Oliveira Filho 2011-07-27 12:21:49 PDT
Porting QtScript API over JSC C API will not be continued.