WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
41662
[Qt] QScriptEngine should have an API for wrapping a C function
https://bugs.webkit.org/show_bug.cgi?id=41662
Summary
[Qt] QScriptEngine should have an API for wrapping a C function
Kent Hansen
Reported
2010-07-06 01:45:54 PDT
See
http://doc.trolltech.com/latest/qscriptengine.html#newFunction
This provides functionality similar to JSObjectMakeFunctionWithCallback() and JSObjectMakeConstructor() in the JSC C API. Implementing this feature also requires implementing the QScriptContext class (see
http://doc.trolltech.com/latest/qscriptcontext.html
), which provides the arguments, callee and this-object for a particular invocation of the function. In QtScript, the same type of callback is used for both normal functions and constructors; QScriptContext::isCalledAsConstructor() can be used to query whether the function was called as a constructor (e.g. as operand to "new").
Attachments
Add attachment
proposed patch, testcase, etc.
Caio Marcelo de Oliveira Filho
Comment 1
2010-07-08 01:00:09 PDT
I'm working on this one, but have no permissions to set the "Assigned To" field.
Caio Marcelo de Oliveira Filho
Comment 2
2010-07-13 09:52:19 PDT
Following Jedrzej suggestion, I'm going to split this in smaller tasks (bugs), and make them all depend on this bug. What I want is to split up the QScriptContext parts from the "callback" support (
bug 42174
), since the former may need some extensions on the JSC C API.
Jędrzej Nowacki
Comment 3
2011-07-07 07:52:11 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.
Top of Page
Format For Printing
XML
Clone This Bug