#include <private/qv4engine_p.h>
#include <private/qv4functionobject_p.h>
+#include <private/qv8objectresource_p.h>
+
QT_BEGIN_NAMESPACE
/*!
#include <QtCore/qstack.h>
#include <QtCore/qdebug.h>
+#include <private/qv4v8_p.h>
+#include <private/qv8objectresource_p.h>
+
#ifndef QT_NO_XMLSTREAMREADER
#define V8THROW_REFERENCE(string) { \
#include <private/qv4sequenceobject_p.h>
#include <private/qv4objectproto_p.h>
+#include <private/qv4v8_p.h>
+#include <private/qv8objectresource_p.h>
+
QT_BEGIN_NAMESPACE
using namespace QV4;
#include <private/qv4include_p.h>
#include <private/qv4jsonobject_p.h>
+#include <private/qv4v8_p.h>
+#include <private/qv8objectresource_p.h>
+
Q_DECLARE_METATYPE(QList<int>)
-void QV8Engine::initializeGlobal(v8::Handle<v8::Object> global)
+void QV8Engine::initializeGlobal()
{
QV4::GlobalExtensions::init(m_engine, m_v4Engine->globalObject);
void QV8Engine::initQmlGlobalObject()
{
- initializeGlobal(QV4::Value::fromObject(m_v4Engine->globalObject));
+ initializeGlobal();
freezeObject(QV4::Value::fromObject(m_v4Engine->globalObject));
}
#include <QtCore/QElapsedTimer>
#include <QtCore/QThreadStorage>
-#include <private/qv8_p.h>
#include <qjsengine.h>
#include <qjsvalue.h>
#include "qjsvalueiterator_p.h"
#include <private/qqmlpropertycache_p.h>
-#include "qv8objectresource_p.h"
#include <private/qv4qobjectwrapper_p.h>
#include <private/qv4value_p.h>
#include <private/qv4object_p.h>
return rv; \
} \
-template<class T>
-inline T *v8_resource_cast(v8::Handle<v8::Object> object) {
- QV8ObjectResource *resource = static_cast<QV8ObjectResource *>(object->GetExternalResource());
- return (resource && (quint32)resource->resourceType() == (quint32)T::V8ResourceType)?static_cast<T *>(resource):0;
-}
-
-template<class T>
-inline T *v8_resource_check(v8::Handle<v8::Object> object) {
- T *resource = static_cast<T *>(object->GetExternalResource());
- Q_ASSERT(resource && resource->resourceType() == (quint32)T::V8ResourceType);
- return resource;
-}
-
// Used to allow a QObject method take and return raw V8 handles without having to expose
// v8 in the public API.
// Use like this:
QVariant toBasicVariant(const QV4::Value &);
- void initializeGlobal(v8::Handle<v8::Object>);
+ void initializeGlobal();
private:
QVariantList variantListFromJS(QV4::ArrayObject *array, V8ObjectSet &visitedObjects);
QV8Engine *engine;
};
+template<class T>
+inline T *v8_resource_cast(v8::Handle<v8::Object> object) {
+ QV8ObjectResource *resource = static_cast<QV8ObjectResource *>(object->GetExternalResource());
+ return (resource && (quint32)resource->resourceType() == (quint32)T::V8ResourceType)?static_cast<T *>(resource):0;
+}
+
+template<class T>
+inline T *v8_resource_check(v8::Handle<v8::Object> object) {
+ T *resource = static_cast<T *>(object->GetExternalResource());
+ Q_ASSERT(resource && resource->resourceType() == (quint32)T::V8ResourceType);
+ return resource;
+}
+
QT_END_NAMESPACE
#endif // QV8OBJECTRESOURCE_P_H
#include <private/qv4value_p.h>
#include <private/qv4functionobject_p.h>
+#include <private/qv8objectresource_p.h>
+
#if defined(Q_OS_QNX) || defined(Q_OS_ANDROID)
#include <ctype.h>
#endif