Project

General

Profile

Actions

Bug #160

closed

QScriptEngine fails to create function objects

Added by Igor Pashev over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
2013-10-27
Due date:
% Done:

0%

Estimated time:

Description

Source code (also attached):

#include <QtCore/QtCore>
#include <QtScript/QtScript>

int main(int argc, char *argv[])
{
  QCoreApplication a(argc, argv);
  QScriptEngine engine;

  QScriptValue aValue = engine.evaluate("2+3");
  qDebug() << "aValue:" << aValue.toString();

  QScriptValue aFunction = engine.evaluate("(function(a,b) {return a+b;})");
  qDebug() << "aFunction:" << aFunction.toString();

  QScriptValue jsonParser = engine.evaluate(QLatin1String("JSON.parse"));
  qDebug() << "jsonParser:" << jsonParser.toString();

  return 0;
}

On Linux:

# ./qscript 
aValue: "5" 
aFunction: "function (a, b) {return a+b;}" 
jsonParser: "function parse() {
    [native code]
}" 

On Dyson:

# ./qscript
aValue: "5" 
aFunction: "-12571136" 
jsonParser: "undefined" 


Files

qscript.cpp (517 Bytes) qscript.cpp Igor Pashev, 2013-10-27 08:55 AM
qscript.pro (325 Bytes) qscript.pro Igor Pashev, 2013-10-27 08:55 AM
dyson-js-solaris-memory-layout.patch (4.65 KB) dyson-js-solaris-memory-layout.patch Igor Pashev, 2013-10-30 08:21 AM

Related issues 2 (1 open1 closed)

Related to Dyson - Bug #164: JIT does not work in WebKitGTKNew2013-12-08

Actions
Blocks Dyson - Bug #151: qtcreator crashesClosed2013-09-18

Actions
Actions #1

Updated by Igor Pashev over 10 years ago

Actions #2

Updated by Igor Pashev over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF