diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-21 13:15:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 09:45:45 +0100 |
commit | fbcd0a22f643f0b0ec1404507d63bdf35cd9a195 (patch) | |
tree | b759029b5ca0f9db8d3bf1863ca319a92edb6baf /src/qml/qml/qqmlxmlhttprequest.cpp | |
parent | 5e8bee55aa78551c2d31b24228227c0bbbdc1d8d (diff) |
Move the vtable pointer from the object to the internal class
This saves one pointer per object, and willmake other optimizations
easier in the future.
Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 18e3e33c4b..e31b1c414a 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -192,7 +192,7 @@ public: , list(list) , d(data) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); if (d) d->addref(); @@ -226,7 +226,7 @@ public: : Object(engine) , d(data) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); if (d) d->addref(); @@ -258,7 +258,7 @@ public: NodePrototype(ExecutionEngine *engine) : Object(engine) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); Scope scope(engine); ScopedObject protectThis(scope, this); @@ -312,7 +312,7 @@ class Node : public Object : Object(engine) , d(data) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); if (d) d->addref(); @@ -1605,7 +1605,7 @@ struct QQmlXMLHttpRequestWrapper : public Object : Object(engine) , request(request) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); } ~QQmlXMLHttpRequestWrapper() { delete request; @@ -1626,7 +1626,7 @@ struct QQmlXMLHttpRequestCtor : public FunctionObject QQmlXMLHttpRequestCtor(ExecutionEngine *engine) : FunctionObject(engine->rootContext, QStringLiteral("XMLHttpRequest")) { - vtbl = &static_vtbl; + setVTable(&static_vtbl); Scope scope(engine); ScopedValue protectThis(scope, this); |