diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-09 23:36:57 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2015-01-12 11:04:36 +0100 |
commit | b29a1aee35bc6e79beb028c92e5aab9bee0c18b3 (patch) | |
tree | fff5e8400fa797108f1835128c775bdab934bdb3 /src/qml/jsruntime/qv4objectproto.cpp | |
parent | 431458b685fa9f7355f50d21a09ee9f93bcb42d5 (diff) |
Move extensible into the internal class
With this, we can now save one pointer per Heap
object.
Change-Id: I7f69193ff51c9fd9c5dbfba90aa1ebb3f93da2e6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index 34a9b9cb64..445d4f7a68 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -244,8 +244,6 @@ ReturnedValue ObjectPrototype::method_seal(CallContext *ctx) if (!o) return ctx->engine()->throwTypeError(); - o->setExtensible(false); - o->setInternalClass(o->internalClass()->sealed()); if (o->arrayData()) { @@ -269,8 +267,6 @@ ReturnedValue ObjectPrototype::method_freeze(CallContext *ctx) if (ArgumentsObject::isNonStrictArgumentsObject(o)) Scoped<ArgumentsObject>(scope, o)->fullyCreate(); - o->setExtensible(false); - o->setInternalClass(o->internalClass()->frozen()); if (o->arrayData()) { @@ -292,7 +288,7 @@ ReturnedValue ObjectPrototype::method_preventExtensions(CallContext *ctx) if (!o) return ctx->engine()->throwTypeError(); - o->setExtensible(false); + o->setInternalClass(o->internalClass()->nonExtensible()); return o.asReturnedValue(); } |