summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2011-05-20 15:39:59 +0200
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2011-05-25 10:55:09 +0200
commit9001bb62b39cefe767e23f7f699384b9432e6dca (patch)
treebe6910428db41bc193a06b9ae4de84de9847cbce
parentf14139bb9fe8233abe49f9affda977df30381e25 (diff)
Remove outdated workaround in QSEP::NewArray
http://code.google.com/p/v8/issues/detail?id=1256 got fixed. The patch fixes a persistent leak. This patch 10x speedups an array creation time. Reviewed-by: Gabriel de Dietrich
-rw-r--r--src/script/api/qscriptengine.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 3b39e5b..30b70c3 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -1697,10 +1697,7 @@ QScriptPassPointer<QScriptValuePrivate> QScriptEnginePrivate::newArray(uint leng
length = 12345;
}
- v8::Persistent<v8::Array> array(v8::Persistent<v8::Array>::New(v8::Array::New(length)));
- // FIXME: This is a workaround for http://code.google.com/p/v8/issues/detail?id=1256
- array->Set(v8::String::New("length"), v8::Number::New(length));
- return new QScriptValuePrivate(this, array);
+ return new QScriptValuePrivate(this, v8::Array::New(length));
}
QScriptPassPointer<QScriptValuePrivate> QScriptEnginePrivate::newFunction(QScriptEngine::FunctionSignature fun, QScriptValuePrivate *prototype, int length)