<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>41662</bug_id>
          
          <creation_ts>2010-07-06 01:45:54 -0700</creation_ts>
          <short_desc>[Qt] QScriptEngine should have an API for wrapping a C function</short_desc>
          <delta_ts>2011-07-07 07:52:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>42174</dependson>
    
    <dependson>42242</dependson>
          <blocked>31863</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kent Hansen">kent.hansen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>jedrzej.nowacki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>246943</commentid>
    <comment_count>0</comment_count>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-07-06 01:45:54 -0700</bug_when>
    <thetext>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 &quot;new&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>248057</commentid>
    <comment_count>1</comment_count>
    <who name="Caio Marcelo de Oliveira Filho">cmarcelo</who>
    <bug_when>2010-07-08 01:00:09 -0700</bug_when>
    <thetext>I&apos;m working on this one, but have no permissions to set the &quot;Assigned To&quot; field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>250580</commentid>
    <comment_count>2</comment_count>
    <who name="Caio Marcelo de Oliveira Filho">cmarcelo</who>
    <bug_when>2010-07-13 09:52:19 -0700</bug_when>
    <thetext>Following Jedrzej suggestion, I&apos;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 &quot;callback&quot; support (bug 42174), since the former may need some extensions on the JSC C API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>433448</commentid>
    <comment_count>3</comment_count>
    <who name="Jędrzej Nowacki">jedrzej.nowacki</who>
    <bug_when>2011-07-07 07:52:11 -0700</bug_when>
    <thetext>Porting QtScript API over JSC C API will not be continued.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>