| 1 | /* |
| 2 | * Copyright (C) 1999-2001 Harri Porten ([email protected]) |
| 3 | * Copyright (C) 2001 Peter Kelly ([email protected]) |
| 4 | * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 5 | * Copyright (C) 2007 Eric Seidel ([email protected]) |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Library General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This library is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * Library General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Library General Public License |
| 18 | * along with this library; see the file COPYING.LIB. If not, write to |
| 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | * Boston, MA 02110-1301, USA. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #include "config.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/config.h`/ |
| 25 | #include "JSObject.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h`/ |
| 26 | |
| 27 | #include "DatePrototype.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.h`/ |
| 28 | #include "ErrorConstructor.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/ErrorConstructor.h`/ |
| 29 | #include "GetterSetter.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/GetterSetter.h`/ |
| 30 | #include "JSGlobalObject.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObject.h`/ |
| 31 | #include "NativeErrorConstructor.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NativeErrorConstructor.h`/ |
| 32 | #include "ObjectPrototype.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/ObjectPrototype.h`/ |
| 33 | #include "PropertyDescriptor.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertyDescriptor.h`/ |
| 34 | #include "PropertyNameArray.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertyNameArray.h`/ |
| 35 | #include "Lookup.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Lookup.h`/ |
| 36 | #include "Nodes.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/parser/Nodes.h`/ |
| 37 | #include "Operations.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Operations.h`/ |
| 38 | #include <math.h> |
| 39 | #include <wtf/Assertions.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h`/ |
| 40 | |
| 41 | namespace JSCcxx . . $ `<built-in>:463:9`! { |
| 42 | |
| 43 | ASSERT_CLASS_FITS_IN_CELLcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h:42:9`!(JSObject); |
| 44 | |
| 45 | static inline void getClassPropertyNamescxx . . $ QTJSC/getClassPropertyNames(1a5bd9591b58af04).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const ClassInfocxx . . $ QTJSC/ClassInfo#* classInfo, PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#& propertyNames, EnumerationModecxx . . $ QTJSC/EnumerationMode# mode) |
| 46 | { |
| 47 | // Add properties from the static hashtables of properties |
| 48 | for (; classInfo; classInfo = classInfo->parentClasscxx . . $ QTJSC/ClassInfo#parentClass.) { |
| 49 | const HashTablecxx . . $ QTJSC/HashTable#* table = classInfo->propHashTablecxx . . $ QTJSC/ClassInfo#propHashTable(c82a68e073ea6db6).(exec); |
| 50 | if (!table) |
| 51 | continue; |
| 52 | table->initializeIfNeededcxx . . $ QTJSC/HashTable#initializeIfNeeded(31a096c468e6ff8e).(exec); |
| 53 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(table->table); |
| 54 | |
| 55 | int hashSizeMask = table->compactSizecxx . . $ QTJSC/HashTable#compactSize. - 1; |
| 56 | const HashEntrycxx . . $ QTJSC/HashEntry#* entry = table->tablecxx . . $ QTJSC/HashTable#table.; |
| 57 | for (int i = 0; i <= hashSizeMask; ++i, ++entry) { |
| 58 | if (entry->keycxx . . $ QTJSC/HashEntry#key(eff8ac5d0836371c).() && (!(entry->attributescxx . . $ QTJSC/HashEntry#attributes(bd807b21b9713a30).() & DontEnumcxx . . $ QTJSC/DontEnum.) || (mode == IncludeDontEnumPropertiescxx . . $ QTJSC/IncludeDontEnumProperties.))) |
| 59 | propertyNames.addcxx . . $ QTJSC/PropertyNameArray#add(f38096febece923b).(entry->keycxx . . $ QTJSC/HashEntry#key(eff8ac5d0836371c).()); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void JSObjectcxx . . $ QTJSC/JSObject#::markChildrencxx . . $ QTJSC/JSObject#markChildren(bd9cae851d80a865).(MarkStackcxx . . $ QTJSC/MarkStack#& markStack) |
| 65 | { |
| 66 | #ifndef NDEBUGcxx . . $ `<built-in>:472:9`! |
| 67 | bool wasCheckingForDefaultMarkViolation = markStack.m_isCheckingForDefaultMarkViolation; |
| 68 | markStack.m_isCheckingForDefaultMarkViolation = false; |
| 69 | #endif |
| 70 | |
| 71 | markChildrenDirectcxx . . $ QTJSC/JSObject#markChildrenDirect(bd9cae851d80a865).(markStack); |
| 72 | |
| 73 | #ifndef NDEBUGcxx . . $ `<built-in>:472:9`! |
| 74 | markStack.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation; |
| 75 | #endif |
| 76 | } |
| 77 | |
| 78 | UStringcxx . . $ QTJSC/UString# JSObjectcxx . . $ QTJSC/JSObject#::classNamecxx . . $ QTJSC/JSObject#className(ba9ec689f7dd9231).() const |
| 79 | { |
| 80 | const ClassInfocxx . . $ QTJSC/ClassInfo#* info = classInfocxx . . $ QTJSC/JSCell#classInfo(f90fb4cda7a7c2e2).(); |
| 81 | if (info) |
| 82 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). infocxx . . $ QTJSC/UString#UString(85c52e162fed56f9).->classNamecxx . . $ QTJSC/ClassInfo#className.; |
| 83 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "Object"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 84 | } |
| 85 | |
| 86 | bool JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertySlotcxx . . $ QTJSC/JSObject#getOwnPropertySlot(d57d1c8d4b24d235).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#& slot) |
| 87 | { |
| 88 | return getOwnPropertySlotcxx . . $ QTJSC/JSObject#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(exec, Identifiercxx . . $ QTJSC/Identifier#::fromcxx . . $ QTJSC/Identifier#from(d1afedae20629715).(exec, propertyName), slot); |
| 89 | } |
| 90 | |
| 91 | static void throwSetterErrorcxx . . $ QTJSC/throwSetterError(d2cb180e190a9680).(ExecStatecxx . . $ QTJSC/ExecState#* exec) |
| 92 | { |
| 93 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "setting a property that has only a getter"); |
| 94 | } |
| 95 | |
| 96 | // ECMA 8.6.2.2 |
| 97 | void JSObjectcxx . . $ QTJSC/JSObject#::putcxx . . $ QTJSC/JSObject#put(dfb3133dafbe9ff4).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSValuecxx . . $ QTJSC/JSValue# value, PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#& slot) |
| 98 | { |
| 99 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(value); |
| 100 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); |
| 101 | |
| 102 | if (propertyName ==cxx . . $ QTJSC/`operator==`(8208a731c2dadbc2). exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().underscoreProto) { |
| 103 | // Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla. |
| 104 | if (!value.isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).() && !value.isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) |
| 105 | return; |
| 106 | |
| 107 | JSValuecxx . . $ QTJSC/JSValue# nextPrototypeValue = value; |
| 108 | while (nextPrototypeValue && nextPrototypeValue.isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) { |
| 109 | JSObjectcxx . . $ QTJSC/JSObject#* nextPrototype = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(nextPrototypeValue)->unwrappedObjectcxx . . $ QTJSC/JSObject#unwrappedObject(2eaa870b9a6c25e1).(); |
| 110 | if (nextPrototype == this) { |
| 111 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, GeneralErrorcxx . . $ QTJSC/GeneralError., "cyclic __proto__ value"); |
| 112 | return; |
| 113 | } |
| 114 | nextPrototypeValue =cxx . . $ QTJSC/JSValue#`operator=`(5dfb8b6405afb35f). nextPrototype->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).(); |
| 115 | } |
| 116 | |
| 117 | setPrototypecxx . . $ QTJSC/JSObject#setPrototype(5c2ac18db087b3e6).(value); |
| 118 | return; |
| 119 | } |
| 120 | |
| 121 | // Check if there are any setters or getters in the prototype chain |
| 122 | JSValuecxx . . $ QTJSC/JSValue# prototypecxx . . $ QTJSC/JSValue#JSValue(49f6e7a06ebc5aa8).; |
| 123 | for (JSObjectcxx . . $ QTJSC/JSObject#* obj = this; !obj->structurecxx . . $ QTJSC/JSCell#structure(a25848528202c7a).()->hasGetterSetterProperties(); obj = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(prototype)) { |
| 124 | prototype =cxx . . $ QTJSC/JSValue#`operator=`(5dfb8b6405afb35f). obj->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).(); |
| 125 | if (prototype.isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) { |
| 126 | putDirectInternalcxx . . $ QTJSC/JSObject#putDirectInternal(15024d1923313e43).(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), propertyName, value, 0, true, slot); |
| 127 | return; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | unsigned attributes; |
| 132 | JSCellcxx . . $ QTJSC/JSCell#* specificValue; |
| 133 | if ((m_structure->get(propertyName, attributes, specificValue) != WTFcxx . . $ `<built-in>:467:9`!::notFound) && attributes & ReadOnly) |
| 134 | return; |
| 135 | |
| 136 | for (JSObjectcxx . . $ QTJSC/JSObject#* obj = this; ; obj = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(prototype)) { |
| 137 | #ifdef QT_BUILD_SCRIPT_LIBcxx . . $ `<built-in>:481:9`! |
| 138 | PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor# descriptorcxx . . $ QTJSC/PropertyDescriptor#PropertyDescriptor(49f6e7a06ebc5aa8).; |
| 139 | if (obj->getPropertyDescriptorcxx . . $ QTJSC/JSObject#getPropertyDescriptor(dce4ef7012294c32).(exec, propertyName, descriptor)) { |
| 140 | JSObjectcxx . . $ QTJSC/JSObject#* setterFunc; |
| 141 | if ((descriptor.isAccessorDescriptorcxx . . $ QTJSC/PropertyDescriptor#isAccessorDescriptor(50ce9a9e25b4a850).() && !!descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).() && ((setterFunc = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).())), true)) |
| 142 | || (!!descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).() && descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).().isGetterSettercxx . . $ QTJSC/JSValue#isGetterSetter(50ce9a9e25b4a850).() && ((setterFunc = asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).())->settercxx . . $ QTJSC/GetterSetter#setter(8ac23ea934d7a115).()), true))) { |
| 143 | #else |
| 144 | if (JSValue gs = obj->getDirect(propertyName)) { |
| 145 | if (gs.isGetterSetter()) { |
| 146 | JSObject* setterFunc = asGetterSetter(gs)->setter(); |
| 147 | #endif |
| 148 | if (!setterFunc) { |
| 149 | throwSetterErrorcxx . . $ QTJSC/throwSetterError(d2cb180e190a9680).(exec); |
| 150 | return; |
| 151 | } |
| 152 | |
| 153 | CallDatacxx . . $ QTJSC/CallData# callData; |
| 154 | CallTypecxx . . $ QTJSC/CallType# callType = setterFunc->getCallDatacxx . . $ QTJSC/JSCell#getCallData(9482040cf952d29d).(callData); |
| 155 | MarkedArgumentBuffercxx . . $ QTJSC/MarkedArgumentBuffer# argscxx . . $ QTJSC/MarkedArgumentBuffer#MarkedArgumentBuffer(49f6e7a06ebc5aa8).; |
| 156 | args.appendcxx . . $ QTJSC/MarkedArgumentBuffer#append(5c2ac18db087b3e6).(value); |
| 157 | callcxx . . $ QTJSC/call(342816bfcb24d530).(exec, setterFunc, callType, callData, this, args); |
| 158 | return; |
| 159 | } |
| 160 | |
| 161 | // If there's an existing property on the object or one of its |
| 162 | // prototypes it should be replaced, so break here. |
| 163 | break; |
| 164 | } |
| 165 | |
| 166 | prototype =cxx . . $ QTJSC/JSValue#`operator=`(5dfb8b6405afb35f). obj->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).(); |
| 167 | if (prototype.isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) |
| 168 | break; |
| 169 | } |
| 170 | |
| 171 | putDirectInternalcxx . . $ QTJSC/JSObject#putDirectInternal(15024d1923313e43).(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), propertyName, value, 0, true, slot); |
| 172 | return; |
| 173 | } |
| 174 | |
| 175 | void JSObjectcxx . . $ QTJSC/JSObject#::putcxx . . $ QTJSC/JSObject#put(b1b60585cf3bb95).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned propertyName, JSValuecxx . . $ QTJSC/JSValue# value) |
| 176 | { |
| 177 | PutPropertySlotcxx . . $ QTJSC/PutPropertySlot# slotcxx . . $ QTJSC/PutPropertySlot#PutPropertySlot(49f6e7a06ebc5aa8).; |
| 178 | putcxx . . $ QTJSC/JSObject#put(dfb3133dafbe9ff4).(exec, Identifiercxx . . $ QTJSC/Identifier#::fromcxx . . $ QTJSC/Identifier#from(d1afedae20629715).(exec, propertyName), value, slot); |
| 179 | } |
| 180 | |
| 181 | void JSObjectcxx . . $ QTJSC/JSObject#::putWithAttributescxx . . $ QTJSC/JSObject#putWithAttributes(1c4b6fa69de3bf40).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSValuecxx . . $ QTJSC/JSValue# value, unsigned attributes, bool checkReadOnly, PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#& slot) |
| 182 | { |
| 183 | putDirectInternalcxx . . $ QTJSC/JSObject#putDirectInternal(15024d1923313e43).(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), propertyName, value, attributes, checkReadOnly, slot); |
| 184 | } |
| 185 | |
| 186 | void JSObjectcxx . . $ QTJSC/JSObject#::putWithAttributescxx . . $ QTJSC/JSObject#putWithAttributes(3dd2e6313723688d).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSValuecxx . . $ QTJSC/JSValue# value, unsigned attributes) |
| 187 | { |
| 188 | putDirectInternalcxx . . $ QTJSC/JSObject#putDirectInternal(795df8b79bb53573).(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), propertyName, value, attributes); |
| 189 | } |
| 190 | |
| 191 | void JSObjectcxx . . $ QTJSC/JSObject#::putWithAttributescxx . . $ QTJSC/JSObject#putWithAttributes(37deedd917f4cba0).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned propertyName, JSValuecxx . . $ QTJSC/JSValue# value, unsigned attributes) |
| 192 | { |
| 193 | putWithAttributescxx . . $ QTJSC/JSObject#putWithAttributes(3dd2e6313723688d).(exec, Identifiercxx . . $ QTJSC/Identifier#::fromcxx . . $ QTJSC/Identifier#from(d1afedae20629715).(exec, propertyName), value, attributes); |
| 194 | } |
| 195 | |
| 196 | bool JSObjectcxx . . $ QTJSC/JSObject#::hasPropertycxx . . $ QTJSC/JSObject#hasProperty(19361922c79e8980).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) const |
| 197 | { |
| 198 | PropertySlotcxx . . $ QTJSC/PropertySlot# slotcxx . . $ QTJSC/PropertySlot#PropertySlot(49f6e7a06ebc5aa8).; |
| 199 | return const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(this)->getPropertySlotcxx . . $ QTJSC/JSObject#getPropertySlot(6f4ef3dbfe7d5ab9).(exec, propertyName, slot); |
| 200 | } |
| 201 | |
| 202 | bool JSObjectcxx . . $ QTJSC/JSObject#::hasPropertycxx . . $ QTJSC/JSObject#hasProperty(7acd47e03afc206f).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned propertyName) const |
| 203 | { |
| 204 | PropertySlotcxx . . $ QTJSC/PropertySlot# slotcxx . . $ QTJSC/PropertySlot#PropertySlot(49f6e7a06ebc5aa8).; |
| 205 | return const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(this)->getPropertySlotcxx . . $ QTJSC/JSObject#getPropertySlot(d57d1c8d4b24d235).(exec, propertyName, slot); |
| 206 | } |
| 207 | |
| 208 | // ECMA 8.6.2.5 |
| 209 | bool JSObjectcxx . . $ QTJSC/JSObject#::deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(13154ef9bddc9416).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) |
| 210 | { |
| 211 | unsigned attributes; |
| 212 | JSCellcxx . . $ QTJSC/JSCell#* specificValue; |
| 213 | if (m_structure->get(propertyName, attributes, specificValue) != WTFcxx . . $ `<built-in>:467:9`!::notFound) { |
| 214 | if ((attributes & DontDeletecxx . . $ QTJSC/DontDelete.)) |
| 215 | return false; |
| 216 | removeDirectcxx . . $ QTJSC/JSObject#removeDirect(d7ed36c5537ed570).(propertyName); |
| 217 | return true; |
| 218 | } |
| 219 | |
| 220 | // Look in the static hashtable of properties |
| 221 | const HashEntrycxx . . $ QTJSC/HashEntry#* entry = findPropertyHashEntrycxx . . $ QTJSC/JSObject#findPropertyHashEntry(9d28b986369f6e8f).(exec, propertyName); |
| 222 | if (entry && entry->attributescxx . . $ QTJSC/HashEntry#attributes(bd807b21b9713a30).() & DontDeletecxx . . $ QTJSC/DontDelete.) |
| 223 | return false; // this builtin property can't be deleted |
| 224 | |
| 225 | // FIXME: Should the code here actually do some deletion? |
| 226 | return true; |
| 227 | } |
| 228 | |
| 229 | bool JSObjectcxx . . $ QTJSC/JSObject#::hasOwnPropertycxx . . $ QTJSC/JSObject#hasOwnProperty(19361922c79e8980).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) const |
| 230 | { |
| 231 | PropertySlotcxx . . $ QTJSC/PropertySlot# slotcxx . . $ QTJSC/PropertySlot#PropertySlot(49f6e7a06ebc5aa8).; |
| 232 | return const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(this)->getOwnPropertySlotcxx . . $ QTJSC/JSObject#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(exec, propertyName, slot); |
| 233 | } |
| 234 | |
| 235 | bool JSObjectcxx . . $ QTJSC/JSObject#::deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(2f8cbeb04562a47b).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned propertyName) |
| 236 | { |
| 237 | return deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(13154ef9bddc9416).(exec, Identifiercxx . . $ QTJSC/Identifier#::fromcxx . . $ QTJSC/Identifier#from(d1afedae20629715).(exec, propertyName)); |
| 238 | } |
| 239 | |
| 240 | static ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# callDefaultValueFunctioncxx . . $ QTJSC/callDefaultValueFunction(f8ca34949b821cb4).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const JSObjectcxx . . $ QTJSC/JSObject#* object, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) |
| 241 | { |
| 242 | JSValuecxx . . $ QTJSC/JSValue# function = object->getcxx . . $ QTJSC/JSObject#get(ccadc8db5e9d2977).(exec, propertyName); |
| 243 | CallDatacxx . . $ QTJSC/CallData# callData; |
| 244 | CallTypecxx . . $ QTJSC/CallType# callType = function.getCallDatacxx . . $ QTJSC/JSValue#getCallData(9482040cf952d29d).(callData); |
| 245 | if (callType == CallTypeNonecxx . . $ QTJSC/CallTypeNone.) |
| 246 | return exec->exceptioncxx . . $ QTJSC/ExecState#exception(888c053acf364da1).(); |
| 247 | |
| 248 | // Prevent "toString" and "valueOf" from observing execution if an exception |
| 249 | // is pending. |
| 250 | if (exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).()) |
| 251 | return exec->exceptioncxx . . $ QTJSC/ExecState#exception(888c053acf364da1).(); |
| 252 | |
| 253 | JSValuecxx . . $ QTJSC/JSValue# result = callcxx . . $ QTJSC/call(342816bfcb24d530).(exec, function, callType, callData, const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(object), exec->emptyListcxx . . $ QTJSC/ExecState#emptyList(2af1302b5585147a).()); |
| 254 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!result.isGetterSetter()); |
| 255 | if (exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).()) |
| 256 | return exec->exceptioncxx . . $ QTJSC/ExecState#exception(888c053acf364da1).(); |
| 257 | if (result.isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 258 | return JSValuecxx . . $ QTJSC/JSValue#JSValue(49f6e7a06ebc5aa8).(); |
| 259 | return result; |
| 260 | } |
| 261 | |
| 262 | bool JSObjectcxx . . $ QTJSC/JSObject#::getPrimitiveNumbercxx . . $ QTJSC/JSObject#getPrimitiveNumber(5ae801b0dd2b44e9).(ExecStatecxx . . $ QTJSC/ExecState#* exec, double& number, JSValuecxx . . $ QTJSC/JSValue#& result) |
| 263 | { |
| 264 | result =cxx . . $ QTJSC/JSValue#`operator=`(5dfb8b6405afb35f). defaultValuecxx . . $ QTJSC/JSObject#defaultValue(9c1c7f5535dadf1e).(exec, PreferNumbercxx . . $ QTJSC/PreferNumber.); |
| 265 | number = result.toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec); |
| 266 | return !result.isStringcxx . . $ QTJSC/JSValue#isString(50ce9a9e25b4a850).(); |
| 267 | } |
| 268 | |
| 269 | // ECMA 8.6.2.6 |
| 270 | JSValuecxx . . $ QTJSC/JSValue# JSObjectcxx . . $ QTJSC/JSObject#::defaultValuecxx . . $ QTJSC/JSObject#defaultValue(9c1c7f5535dadf1e).(ExecStatecxx . . $ QTJSC/ExecState#* exec, PreferredPrimitiveTypecxx . . $ QTJSC/PreferredPrimitiveType# hint) const |
| 271 | { |
| 272 | // Must call toString first for Date objects. |
| 273 | if ((hint == PreferStringcxx . . $ QTJSC/PreferString.) || (hint != PreferNumbercxx . . $ QTJSC/PreferNumber. && prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).() == exec->lexicalGlobalObjectcxx . . $ QTJSC/ExecState#lexicalGlobalObject(3d50c730b5e26899).()->datePrototypecxx . . $ QTJSC/JSGlobalObject#datePrototype(67c5d8adc7c52485).())) { |
| 274 | JSValuecxx . . $ QTJSC/JSValue# value = callDefaultValueFunctioncxx . . $ QTJSC/callDefaultValueFunction(f8ca34949b821cb4).(exec, this, exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().toString); |
| 275 | if (value) |
| 276 | return value; |
| 277 | value = callDefaultValueFunctioncxx . . $ QTJSC/callDefaultValueFunction(f8ca34949b821cb4).(exec, this, exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().valueOf); |
| 278 | if (value) |
| 279 | return value; |
| 280 | } else { |
| 281 | JSValuecxx . . $ QTJSC/JSValue# value = callDefaultValueFunctioncxx . . $ QTJSC/callDefaultValueFunction(f8ca34949b821cb4).(exec, this, exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().valueOf); |
| 282 | if (value) |
| 283 | return value; |
| 284 | value = callDefaultValueFunctioncxx . . $ QTJSC/callDefaultValueFunction(f8ca34949b821cb4).(exec, this, exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().toString); |
| 285 | if (value) |
| 286 | return value; |
| 287 | } |
| 288 | |
| 289 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!exec->hadException()); |
| 290 | |
| 291 | return throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "No default value"); |
| 292 | } |
| 293 | |
| 294 | const HashEntrycxx . . $ QTJSC/HashEntry#* JSObjectcxx . . $ QTJSC/JSObject#::findPropertyHashEntrycxx . . $ QTJSC/JSObject#findPropertyHashEntry(9d28b986369f6e8f).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) const |
| 295 | { |
| 296 | for (const ClassInfocxx . . $ QTJSC/ClassInfo#* info = classInfocxx . . $ QTJSC/JSCell#classInfo(f90fb4cda7a7c2e2).(); info; info = info->parentClasscxx . . $ QTJSC/ClassInfo#parentClass.) { |
| 297 | if (const HashTablecxx . . $ QTJSC/HashTable#* propHashTable = info->propHashTablecxx . . $ QTJSC/ClassInfo#propHashTable(c82a68e073ea6db6).(exec)) { |
| 298 | if (const HashEntrycxx . . $ QTJSC/HashEntry#* entry = propHashTable->entrycxx . . $ QTJSC/HashTable#entry(9d28b986369f6e8f).(exec, propertyName)) |
| 299 | return entry; |
| 300 | } |
| 301 | } |
| 302 | return 0; |
| 303 | } |
| 304 | |
| 305 | void JSObjectcxx . . $ QTJSC/JSObject#::defineGettercxx . . $ QTJSC/JSObject#defineGetter(413481394bc380b4).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSObjectcxx . . $ QTJSC/JSObject#* getterFunction, unsigned attributes) |
| 306 | { |
| 307 | JSValuecxx . . $ QTJSC/JSValue# object = getDirectcxx . . $ QTJSC/JSObject#getDirect(3d7955d927d372a0).(propertyName); |
| 308 | if (object && object.isGetterSettercxx . . $ QTJSC/JSValue#isGetterSetter(50ce9a9e25b4a850).()) { |
| 309 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_structure->hasGetterSetterProperties()); |
| 310 | asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(object)->setGettercxx . . $ QTJSC/GetterSetter#setGetter(aa1c69ebc68b9201).(getterFunction); |
| 311 | return; |
| 312 | } |
| 313 | |
| 314 | PutPropertySlotcxx . . $ QTJSC/PutPropertySlot# slotcxx . . $ QTJSC/PutPropertySlot#PutPropertySlot(49f6e7a06ebc5aa8).; |
| 315 | GetterSettercxx . . $ QTJSC/GetterSetter#* getterSetter = new (exec) GetterSettercxx . . $ QTJSC/GetterSetter#GetterSetter(d2cb180e190a9680).(exec); |
| 316 | putDirectInternalcxx . . $ QTJSC/JSObject#putDirectInternal(15024d1923313e43).(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), propertyName, getterSettercxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64)., attributes | Gettercxx . . $ QTJSC/Getter., true, slot); |
| 317 | |
| 318 | // putDirect will change our Structure if we add a new property. For |
| 319 | // getters and setters, though, we also need to change our Structure |
| 320 | // if we override an existing non-getter or non-setter. |
| 321 | if (slot.typecxx . . $ QTJSC/PutPropertySlot#type(80881eb9ae1a951c).() != PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#::NewPropertycxx . . $ QTJSC/PutPropertySlot#NewProperty.) { |
| 322 | if (!m_structure->isDictionary()) { |
| 323 | RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> structure = Structure::getterSetterTransition(m_structure); |
| 324 | setStructurecxx . . $ QTJSC/JSObject#setStructure(9678d77265d996b).(structure.release()); |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | m_structure->setHasGetterSetterProperties(true); |
| 329 | getterSetter->setGettercxx . . $ QTJSC/GetterSetter#setGetter(aa1c69ebc68b9201).(getterFunction); |
| 330 | } |
| 331 | |
| 332 | void JSObjectcxx . . $ QTJSC/JSObject#::defineSettercxx . . $ QTJSC/JSObject#defineSetter(413481394bc380b4).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSObjectcxx . . $ QTJSC/JSObject#* setterFunction, unsigned attributes) |
| 333 | { |
| 334 | JSValuecxx . . $ QTJSC/JSValue# object = getDirectcxx . . $ QTJSC/JSObject#getDirect(3d7955d927d372a0).(propertyName); |
| 335 | if (object && object.isGetterSettercxx . . $ QTJSC/JSValue#isGetterSetter(50ce9a9e25b4a850).()) { |
| 336 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_structure->hasGetterSetterProperties()); |
| 337 | asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(object)->setSettercxx . . $ QTJSC/GetterSetter#setSetter(aa1c69ebc68b9201).(setterFunction); |
| 338 | return; |
| 339 | } |
| 340 | |
| 341 | PutPropertySlotcxx . . $ QTJSC/PutPropertySlot# slotcxx . . $ QTJSC/PutPropertySlot#PutPropertySlot(49f6e7a06ebc5aa8).; |
| 342 | GetterSettercxx . . $ QTJSC/GetterSetter#* getterSetter = new (exec) GetterSettercxx . . $ QTJSC/GetterSetter#GetterSetter(d2cb180e190a9680).(exec); |
| 343 | putDirectInternalcxx . . $ QTJSC/JSObject#putDirectInternal(15024d1923313e43).(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), propertyName, getterSettercxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64)., attributes | Settercxx . . $ QTJSC/Setter., true, slot); |
| 344 | |
| 345 | // putDirect will change our Structure if we add a new property. For |
| 346 | // getters and setters, though, we also need to change our Structure |
| 347 | // if we override an existing non-getter or non-setter. |
| 348 | if (slot.typecxx . . $ QTJSC/PutPropertySlot#type(80881eb9ae1a951c).() != PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#::NewPropertycxx . . $ QTJSC/PutPropertySlot#NewProperty.) { |
| 349 | if (!m_structure->isDictionary()) { |
| 350 | RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> structure = Structure::getterSetterTransition(m_structure); |
| 351 | setStructurecxx . . $ QTJSC/JSObject#setStructure(9678d77265d996b).(structure.release()); |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | m_structure->setHasGetterSetterProperties(true); |
| 356 | getterSetter->setSettercxx . . $ QTJSC/GetterSetter#setSetter(aa1c69ebc68b9201).(setterFunction); |
| 357 | } |
| 358 | |
| 359 | JSValuecxx . . $ QTJSC/JSValue# JSObjectcxx . . $ QTJSC/JSObject#::lookupGettercxx . . $ QTJSC/JSObject#lookupGetter(c9cd87a849817b6).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) |
| 360 | { |
| 361 | JSObjectcxx . . $ QTJSC/JSObject#* object = this; |
| 362 | while (true) { |
| 363 | if (JSValuecxx . . $ QTJSC/JSValue# value = object->getDirectcxx . . $ QTJSC/JSObject#getDirect(3d7955d927d372a0).(propertyName)) { |
| 364 | if (!value.isGetterSettercxx . . $ QTJSC/JSValue#isGetterSetter(50ce9a9e25b4a850).()) |
| 365 | return jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).(); |
| 366 | JSObjectcxx . . $ QTJSC/JSObject#* functionObject = asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(value)->gettercxx . . $ QTJSC/GetterSetter#getter(8ac23ea934d7a115).(); |
| 367 | if (!functionObject) |
| 368 | return jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).(); |
| 369 | return functionObject; |
| 370 | } |
| 371 | |
| 372 | if (!object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).() || !object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).().isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 373 | return jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).(); |
| 374 | object = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).()); |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | JSValuecxx . . $ QTJSC/JSValue# JSObjectcxx . . $ QTJSC/JSObject#::lookupSettercxx . . $ QTJSC/JSObject#lookupSetter(c9cd87a849817b6).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) |
| 379 | { |
| 380 | JSObjectcxx . . $ QTJSC/JSObject#* object = this; |
| 381 | while (true) { |
| 382 | if (JSValuecxx . . $ QTJSC/JSValue# value = object->getDirectcxx . . $ QTJSC/JSObject#getDirect(3d7955d927d372a0).(propertyName)) { |
| 383 | if (!value.isGetterSettercxx . . $ QTJSC/JSValue#isGetterSetter(50ce9a9e25b4a850).()) |
| 384 | return jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).(); |
| 385 | JSObjectcxx . . $ QTJSC/JSObject#* functionObject = asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(value)->settercxx . . $ QTJSC/GetterSetter#setter(8ac23ea934d7a115).(); |
| 386 | if (!functionObject) |
| 387 | return jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).(); |
| 388 | return functionObject; |
| 389 | } |
| 390 | |
| 391 | if (!object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).() || !object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).().isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 392 | return jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).(); |
| 393 | object = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).()); |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | bool JSObjectcxx . . $ QTJSC/JSObject#::hasInstancecxx . . $ QTJSC/JSObject#hasInstance(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# value, JSValuecxx . . $ QTJSC/JSValue# proto) |
| 398 | { |
| 399 | if (!value.isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 400 | return false; |
| 401 | |
| 402 | if (!proto.isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) { |
| 403 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "instanceof called on an object with an invalid prototype property."); |
| 404 | return false; |
| 405 | } |
| 406 | |
| 407 | JSObjectcxx . . $ QTJSC/JSObject#* object = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(value); |
| 408 | while ((object = object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).().getObjectcxx . . $ QTJSC/JSValue#getObject(8ac23ea934d7a115).())) { |
| 409 | if (proto == object) |
| 410 | return true; |
| 411 | } |
| 412 | return false; |
| 413 | } |
| 414 | |
| 415 | bool JSObjectcxx . . $ QTJSC/JSObject#::propertyIsEnumerablecxx . . $ QTJSC/JSObject#propertyIsEnumerable(19361922c79e8980).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) const |
| 416 | { |
| 417 | PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor# descriptorcxx . . $ QTJSC/PropertyDescriptor#PropertyDescriptor(49f6e7a06ebc5aa8).; |
| 418 | if (!const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(this)->getOwnPropertyDescriptorcxx . . $ QTJSC/JSObject#getOwnPropertyDescriptor(dce4ef7012294c32).(exec, propertyName, descriptor)) |
| 419 | return false; |
| 420 | return descriptor.enumerablecxx . . $ QTJSC/PropertyDescriptor#enumerable(50ce9a9e25b4a850).(); |
| 421 | } |
| 422 | |
| 423 | bool JSObjectcxx . . $ QTJSC/JSObject#::getPropertySpecificValuecxx . . $ QTJSC/JSObject#getPropertySpecificValue(63f8a2d4b0ad97).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSCellcxx . . $ QTJSC/JSCell#*& specificValue) const |
| 424 | { |
| 425 | unsigned attributes; |
| 426 | if (m_structure->get(propertyName, attributes, specificValue) != WTFcxx . . $ `<built-in>:467:9`!::notFound) |
| 427 | return true; |
| 428 | |
| 429 | // This could be a function within the static table? - should probably |
| 430 | // also look in the hash? This currently should not be a problem, since |
| 431 | // we've currently always call 'get' first, which should have populated |
| 432 | // the normal storage. |
| 433 | return false; |
| 434 | } |
| 435 | |
| 436 | void JSObjectcxx . . $ QTJSC/JSObject#::getPropertyNamescxx . . $ QTJSC/JSObject#getPropertyNames(2f9e3f18de200b4e).(ExecStatecxx . . $ QTJSC/ExecState#* exec, PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#& propertyNames, EnumerationModecxx . . $ QTJSC/EnumerationMode# mode) |
| 437 | { |
| 438 | getOwnPropertyNamescxx . . $ QTJSC/JSObject#getOwnPropertyNames(2f9e3f18de200b4e).(exec, propertyNames, mode); |
| 439 | |
| 440 | if (prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).().isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) |
| 441 | return; |
| 442 | |
| 443 | JSObjectcxx . . $ QTJSC/JSObject#* prototype = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(this->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).()); |
| 444 | while(1) { |
| 445 | if (prototype->structurecxx . . $ QTJSC/JSCell#structure(a25848528202c7a).()->typeInfo().overridesGetPropertyNames()) { |
| 446 | prototype->getPropertyNamescxx . . $ QTJSC/JSObject#getPropertyNames(2f9e3f18de200b4e).(exec, propertyNames, mode); |
| 447 | break; |
| 448 | } |
| 449 | prototype->getOwnPropertyNamescxx . . $ QTJSC/JSObject#getOwnPropertyNames(2f9e3f18de200b4e).(exec, propertyNames, mode); |
| 450 | JSValuecxx . . $ QTJSC/JSValue# nextProto = prototype->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).(); |
| 451 | if (nextProto.isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) |
| 452 | break; |
| 453 | prototype = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(nextProto); |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | void JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertyNamescxx . . $ QTJSC/JSObject#getOwnPropertyNames(2f9e3f18de200b4e).(ExecStatecxx . . $ QTJSC/ExecState#* exec, PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#& propertyNames, EnumerationModecxx . . $ QTJSC/EnumerationMode# mode) |
| 458 | { |
| 459 | m_structure->getPropertyNames(propertyNames, mode); |
| 460 | getClassPropertyNamescxx . . $ QTJSC/getClassPropertyNames(1a5bd9591b58af04).(exec, classInfocxx . . $ QTJSC/JSCell#classInfo(f90fb4cda7a7c2e2).(), propertyNames, mode); |
| 461 | } |
| 462 | |
| 463 | bool JSObjectcxx . . $ QTJSC/JSObject#::toBooleancxx . . $ QTJSC/JSObject#toBoolean(9608304f86fd7dc).(ExecStatecxx . . $ QTJSC/ExecState#*) const |
| 464 | { |
| 465 | return true; |
| 466 | } |
| 467 | |
| 468 | double JSObjectcxx . . $ QTJSC/JSObject#::toNumbercxx . . $ QTJSC/JSObject#toNumber(1fd034e372fd1279).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const |
| 469 | { |
| 470 | JSValuecxx . . $ QTJSC/JSValue# primitive = toPrimitivecxx . . $ QTJSC/JSObject#toPrimitive(9c1c7f5535dadf1e).(exec, PreferNumbercxx . . $ QTJSC/PreferNumber.); |
| 471 | if (exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).()) // should be picked up soon in Nodes.cpp |
| 472 | return 0.0; |
| 473 | return primitive.toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec); |
| 474 | } |
| 475 | |
| 476 | UStringcxx . . $ QTJSC/UString# JSObjectcxx . . $ QTJSC/JSObject#::toStringcxx . . $ QTJSC/JSObject#toString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const |
| 477 | { |
| 478 | JSValuecxx . . $ QTJSC/JSValue# primitive = toPrimitivecxx . . $ QTJSC/JSObject#toPrimitive(9c1c7f5535dadf1e).(exec, PreferStringcxx . . $ QTJSC/PreferString.); |
| 479 | if (exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).()) |
| 480 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). ""cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 481 | return primitivecxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d)..toStringcxx . . $ QTJSC/JSValue#toString(9c94f5abb1995042).(exec); |
| 482 | } |
| 483 | |
| 484 | JSObjectcxx . . $ QTJSC/JSObject#* JSObjectcxx . . $ QTJSC/JSObject#::toObjectcxx . . $ QTJSC/JSObject#toObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const |
| 485 | { |
| 486 | return const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(this); |
| 487 | } |
| 488 | |
| 489 | JSObjectcxx . . $ QTJSC/JSObject#* JSObjectcxx . . $ QTJSC/JSObject#::toThisObjectcxx . . $ QTJSC/JSObject#toThisObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const |
| 490 | { |
| 491 | return const_cast<JSObjectcxx . . $ QTJSC/JSObject#*>(this); |
| 492 | } |
| 493 | |
| 494 | JSObjectcxx . . $ QTJSC/JSObject#* JSObjectcxx . . $ QTJSC/JSObject#::unwrappedObjectcxx . . $ QTJSC/JSObject#unwrappedObject(2eaa870b9a6c25e1).() |
| 495 | { |
| 496 | return this; |
| 497 | } |
| 498 | |
| 499 | void JSObjectcxx . . $ QTJSC/JSObject#::removeDirectcxx . . $ QTJSC/JSObject#removeDirect(d7ed36c5537ed570).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName) |
| 500 | { |
| 501 | size_t offset; |
| 502 | if (m_structure->isUncacheableDictionary()) { |
| 503 | offset = m_structure->removePropertyWithoutTransition(propertyName); |
| 504 | if (offset != WTFcxx . . $ `<built-in>:467:9`!::notFoundcxx . . $ QTWTF/notFound.) |
| 505 | putDirectOffsetcxx . . $ QTJSC/JSObject#putDirectOffset(3158aa3e980d8b6b).(offset, jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).()); |
| 506 | return; |
| 507 | } |
| 508 | |
| 509 | RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> structure = Structure::removePropertyTransition(m_structure, propertyName, offset); |
| 510 | setStructurecxx . . $ QTJSC/JSObject#setStructure(9678d77265d996b).(structure.release()); |
| 511 | if (offset != WTFcxx . . $ `<built-in>:467:9`!::notFoundcxx . . $ QTWTF/notFound.) |
| 512 | putDirectOffsetcxx . . $ QTJSC/JSObject#putDirectOffset(3158aa3e980d8b6b).(offset, jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).()); |
| 513 | } |
| 514 | |
| 515 | void JSObjectcxx . . $ QTJSC/JSObject#::putDirectFunctioncxx . . $ QTJSC/JSObject#putDirectFunction(c24ce1583bb64360).(ExecStatecxx . . $ QTJSC/ExecState#* exec, InternalFunctioncxx . . $ QTJSC/InternalFunction#* function, unsigned attr) |
| 516 | { |
| 517 | putDirectFunctioncxx . . $ QTJSC/JSObject#putDirectFunction(26678ba113b0b148).(Identifiercxx . . $ QTJSC/Identifier#Identifier(7710b6c66c0f9b39).(exec, function->namecxx . . $ QTJSC/InternalFunction#name(1c31f8efbb776821).(exec)), function, attr); |
| 518 | } |
| 519 | |
| 520 | void JSObjectcxx . . $ QTJSC/JSObject#::putDirectFunctionWithoutTransitioncxx . . $ QTJSC/JSObject#putDirectFunctionWithoutTransition(c24ce1583bb64360).(ExecStatecxx . . $ QTJSC/ExecState#* exec, InternalFunctioncxx . . $ QTJSC/InternalFunction#* function, unsigned attr) |
| 521 | { |
| 522 | putDirectFunctionWithoutTransitioncxx . . $ QTJSC/JSObject#putDirectFunctionWithoutTransition(c24ce1583bb64360).(Identifiercxx . . $ QTJSC/Identifier#Identifier(7710b6c66c0f9b39).(exec, function->namecxx . . $ QTJSC/InternalFunction#name(1c31f8efbb776821).(exec)), function, attr); |
| 523 | } |
| 524 | |
| 525 | NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! void JSObjectcxx . . $ QTJSC/JSObject#::fillGetterPropertySlotcxx . . $ QTJSC/JSObject#fillGetterPropertySlot(7eadf007d9fb8d43).(PropertySlotcxx . . $ QTJSC/PropertySlot#& slot, JSValuecxx . . $ QTJSC/JSValue#* location) |
| 526 | { |
| 527 | if (JSObjectcxx . . $ QTJSC/JSObject#* getterFunction = asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(*location)->gettercxx . . $ QTJSC/GetterSetter#getter(8ac23ea934d7a115).()) |
| 528 | slot.setGetterSlotcxx . . $ QTJSC/PropertySlot#setGetterSlot(aa1c69ebc68b9201).(getterFunction); |
| 529 | else |
| 530 | slot.setUndefinedcxx . . $ QTJSC/PropertySlot#setUndefined(49f6e7a06ebc5aa8).(); |
| 531 | } |
| 532 | |
| 533 | Structurecxx . . $ QTJSC/Structure#* JSObjectcxx . . $ QTJSC/JSObject#::createInheritorIDcxx . . $ QTJSC/JSObject#createInheritorID(4f089b87575e542).() |
| 534 | { |
| 535 | #ifdef QT_BUILD_SCRIPT_LIBcxx . . $ `<built-in>:481:9`! |
| 536 | // ### Qt Script needs the hasOwnProperty() calls etc. for QScriptObject |
| 537 | m_inheritorID = Structure::create(this, TypeInfo(ObjectType, ImplementsHasInstance | JSCcxx . . $ `<built-in>:463:9`!::OverridesHasInstance | JSCcxx . . $ `<built-in>:463:9`!::OverridesGetOwnPropertySlot | JSCcxx . . $ `<built-in>:463:9`!::OverridesMarkChildren | JSCcxx . . $ `<built-in>:463:9`!::OverridesGetPropertyNames)); |
| 538 | #else |
| 539 | m_inheritorID = JSObject::createStructure(this); |
| 540 | #endif |
| 541 | return m_inheritorID.get(); |
| 542 | } |
| 543 | |
| 544 | void JSObjectcxx . . $ QTJSC/JSObject#::allocatePropertyStoragecxx . . $ QTJSC/JSObject#allocatePropertyStorage(6714b5f2551eea49).(size_t oldSize, size_t newSize) |
| 545 | { |
| 546 | allocatePropertyStorageInlinecxx . . $ QTJSC/JSObject#allocatePropertyStorageInline(6714b5f2551eea49).(oldSize, newSize); |
| 547 | } |
| 548 | |
| 549 | bool JSObjectcxx . . $ QTJSC/JSObject#::getOwnPropertyDescriptorcxx . . $ QTJSC/JSObject#getOwnPropertyDescriptor(dce4ef7012294c32).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#& descriptor) |
| 550 | { |
| 551 | unsigned attributes = 0; |
| 552 | JSCellcxx . . $ QTJSC/JSCell#* cell = 0; |
| 553 | size_t offset = m_structure->get(propertyName, attributes, cell); |
| 554 | if (offset == WTFcxx . . $ `<built-in>:467:9`!::notFoundcxx . . $ QTWTF/notFound.) |
| 555 | return false; |
| 556 | descriptor.setDescriptorcxx . . $ QTJSC/PropertyDescriptor#setDescriptor(48358939f851dacc).(getDirectOffsetcxx . . $ QTJSC/JSObject#getDirectOffset(e9dec2041b7a6b55).(offset), attributes); |
| 557 | return true; |
| 558 | } |
| 559 | |
| 560 | bool JSObjectcxx . . $ QTJSC/JSObject#::getPropertyDescriptorcxx . . $ QTJSC/JSObject#getPropertyDescriptor(dce4ef7012294c32).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#& descriptor) |
| 561 | { |
| 562 | JSObjectcxx . . $ QTJSC/JSObject#* object = this; |
| 563 | while (true) { |
| 564 | if (object->getOwnPropertyDescriptorcxx . . $ QTJSC/JSObject#getOwnPropertyDescriptor(dce4ef7012294c32).(exec, propertyName, descriptor)) |
| 565 | return true; |
| 566 | JSValuecxx . . $ QTJSC/JSValue# prototype = object->prototypecxx . . $ QTJSC/JSObject#prototype(888c053acf364da1).(); |
| 567 | if (!prototype.isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 568 | return false; |
| 569 | object = asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(prototype); |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | static bool putDescriptorcxx . . $ QTJSC/putDescriptor(7e0fdabc8203f1b3).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSObjectcxx . . $ QTJSC/JSObject#* target, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#& descriptor, unsigned attributes, JSValuecxx . . $ QTJSC/JSValue# oldValue) |
| 574 | { |
| 575 | if (descriptor.isGenericDescriptorcxx . . $ QTJSC/PropertyDescriptor#isGenericDescriptor(50ce9a9e25b4a850).() || descriptor.isDataDescriptorcxx . . $ QTJSC/PropertyDescriptor#isDataDescriptor(50ce9a9e25b4a850).()) { |
| 576 | target->putWithAttributescxx . . $ QTJSC/JSObject#putWithAttributes(3dd2e6313723688d).(exec, propertyName, descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).() ? descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).() : oldValue, attributes & ~(Gettercxx . . $ QTJSC/Getter. | Settercxx . . $ QTJSC/Setter.)); |
| 577 | return true; |
| 578 | } |
| 579 | attributes &= ~ReadOnlycxx . . $ QTJSC/ReadOnly.; |
| 580 | if (descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).() && descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).().isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 581 | target->defineGettercxx . . $ QTJSC/JSObject#defineGetter(413481394bc380b4).(exec, propertyName, asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).()), attributes); |
| 582 | if (exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).()) |
| 583 | return false; |
| 584 | if (descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).() && descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).().isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).()) |
| 585 | target->defineSettercxx . . $ QTJSC/JSObject#defineSetter(413481394bc380b4).(exec, propertyName, asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).()), attributes); |
| 586 | return !exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).(); |
| 587 | } |
| 588 | |
| 589 | bool JSObjectcxx . . $ QTJSC/JSObject#::defineOwnPropertycxx . . $ QTJSC/JSObject#defineOwnProperty(61b34c48dc1d764f).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#& descriptor, bool throwException) |
| 590 | { |
| 591 | // If we have a new property we can just put it on normally |
| 592 | PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor# currentcxx . . $ QTJSC/PropertyDescriptor#PropertyDescriptor(49f6e7a06ebc5aa8).; |
| 593 | if (!getOwnPropertyDescriptorcxx . . $ QTJSC/JSObject#getOwnPropertyDescriptor(dce4ef7012294c32).(exec, propertyName, current)) |
| 594 | return putDescriptorcxx . . $ QTJSC/putDescriptor(7e0fdabc8203f1b3).(exec, this, propertyName, descriptor, descriptor.attributescxx . . $ QTJSC/PropertyDescriptor#attributes(ddd8539a2fcdd4ce).(), jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).()); |
| 595 | |
| 596 | if (descriptor.isEmptycxx . . $ QTJSC/PropertyDescriptor#isEmpty(50ce9a9e25b4a850).()) |
| 597 | return true; |
| 598 | |
| 599 | if (current.equalTocxx . . $ QTJSC/PropertyDescriptor#equalTo(946a185620593746).(exec, descriptor)) |
| 600 | return true; |
| 601 | |
| 602 | // Filter out invalid changes |
| 603 | if (!current.configurablecxx . . $ QTJSC/PropertyDescriptor#configurable(50ce9a9e25b4a850).()) { |
| 604 | if (descriptor.configurablecxx . . $ QTJSC/PropertyDescriptor#configurable(50ce9a9e25b4a850).()) { |
| 605 | if (throwException) |
| 606 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to configurable attribute of unconfigurable property."); |
| 607 | return false; |
| 608 | } |
| 609 | if (descriptor.enumerablePresentcxx . . $ QTJSC/PropertyDescriptor#enumerablePresent(50ce9a9e25b4a850).() && descriptor.enumerablecxx . . $ QTJSC/PropertyDescriptor#enumerable(50ce9a9e25b4a850).() != current.enumerablecxx . . $ QTJSC/PropertyDescriptor#enumerable(50ce9a9e25b4a850).()) { |
| 610 | if (throwException) |
| 611 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to change enumerable attribute of unconfigurable property."); |
| 612 | return false; |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | // A generic descriptor is simply changing the attributes of an existing property |
| 617 | if (descriptor.isGenericDescriptorcxx . . $ QTJSC/PropertyDescriptor#isGenericDescriptor(50ce9a9e25b4a850).()) { |
| 618 | if (!current.attributesEqualcxx . . $ QTJSC/PropertyDescriptor#attributesEqual(64a9d19dbbeff22f).(descriptor)) { |
| 619 | deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(13154ef9bddc9416).(exec, propertyName); |
| 620 | putDescriptorcxx . . $ QTJSC/putDescriptor(7e0fdabc8203f1b3).(exec, this, propertyName, descriptor, current.attributesWithOverridecxx . . $ QTJSC/PropertyDescriptor#attributesWithOverride(c28ab2c24163a797).(descriptor), current.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).()); |
| 621 | } |
| 622 | return true; |
| 623 | } |
| 624 | |
| 625 | // Changing between a normal property or an accessor property |
| 626 | if (descriptor.isDataDescriptorcxx . . $ QTJSC/PropertyDescriptor#isDataDescriptor(50ce9a9e25b4a850).() != current.isDataDescriptorcxx . . $ QTJSC/PropertyDescriptor#isDataDescriptor(50ce9a9e25b4a850).()) { |
| 627 | if (!current.configurablecxx . . $ QTJSC/PropertyDescriptor#configurable(50ce9a9e25b4a850).()) { |
| 628 | if (throwException) |
| 629 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to change access mechanism for an unconfigurable property."); |
| 630 | return false; |
| 631 | } |
| 632 | deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(13154ef9bddc9416).(exec, propertyName); |
| 633 | return putDescriptorcxx . . $ QTJSC/putDescriptor(7e0fdabc8203f1b3).(exec, this, propertyName, descriptor, current.attributesWithOverridecxx . . $ QTJSC/PropertyDescriptor#attributesWithOverride(c28ab2c24163a797).(descriptor), current.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).() ? current.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).() : jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).()); |
| 634 | } |
| 635 | |
| 636 | // Changing the value and attributes of an existing property |
| 637 | if (descriptor.isDataDescriptorcxx . . $ QTJSC/PropertyDescriptor#isDataDescriptor(50ce9a9e25b4a850).()) { |
| 638 | if (!current.configurablecxx . . $ QTJSC/PropertyDescriptor#configurable(50ce9a9e25b4a850).()) { |
| 639 | if (!current.writablecxx . . $ QTJSC/PropertyDescriptor#writable(50ce9a9e25b4a850).() && descriptor.writablecxx . . $ QTJSC/PropertyDescriptor#writable(50ce9a9e25b4a850).()) { |
| 640 | if (throwException) |
| 641 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to change writable attribute of unconfigurable property."); |
| 642 | return false; |
| 643 | } |
| 644 | if (!current.writablecxx . . $ QTJSC/PropertyDescriptor#writable(50ce9a9e25b4a850).()) { |
| 645 | if (descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).() || !JSValuecxx . . $ QTJSC/JSValue#::strictEqualcxx . . $ QTJSC/JSValue#strictEqual(658e1865c47113e6).(exec, current.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).(), descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).())) { |
| 646 | if (throwException) |
| 647 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to change value of a readonly property."); |
| 648 | return false; |
| 649 | } |
| 650 | } |
| 651 | } else if (current.attributesEqualcxx . . $ QTJSC/PropertyDescriptor#attributesEqual(64a9d19dbbeff22f).(descriptor)) { |
| 652 | if (!descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).()) |
| 653 | return true; |
| 654 | PutPropertySlotcxx . . $ QTJSC/PutPropertySlot# slotcxx . . $ QTJSC/PutPropertySlot#PutPropertySlot(49f6e7a06ebc5aa8).; |
| 655 | putcxx . . $ QTJSC/JSObject#put(dfb3133dafbe9ff4).(exec, propertyName, descriptor.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).(), slot); |
| 656 | if (exec->hadExceptioncxx . . $ QTJSC/ExecState#hadException(50ce9a9e25b4a850).()) |
| 657 | return false; |
| 658 | return true; |
| 659 | } |
| 660 | deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(13154ef9bddc9416).(exec, propertyName); |
| 661 | return putDescriptorcxx . . $ QTJSC/putDescriptor(7e0fdabc8203f1b3).(exec, this, propertyName, descriptor, current.attributesWithOverridecxx . . $ QTJSC/PropertyDescriptor#attributesWithOverride(c28ab2c24163a797).(descriptor), current.valuecxx . . $ QTJSC/PropertyDescriptor#value(888c053acf364da1).()); |
| 662 | } |
| 663 | |
| 664 | // Changing the accessor functions of an existing accessor property |
| 665 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(descriptor.isAccessorDescriptor()); |
| 666 | if (!current.configurablecxx . . $ QTJSC/PropertyDescriptor#configurable(50ce9a9e25b4a850).()) { |
| 667 | if (descriptor.setterPresentcxx . . $ QTJSC/PropertyDescriptor#setterPresent(50ce9a9e25b4a850).() && !(current.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).() && JSValuecxx . . $ QTJSC/JSValue#::strictEqualcxx . . $ QTJSC/JSValue#strictEqual(658e1865c47113e6).(exec, current.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).(), descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).()))) { |
| 668 | if (throwException) |
| 669 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to change the setter of an unconfigurable property."); |
| 670 | return false; |
| 671 | } |
| 672 | if (descriptor.getterPresentcxx . . $ QTJSC/PropertyDescriptor#getterPresent(50ce9a9e25b4a850).() && !(current.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).() && JSValuecxx . . $ QTJSC/JSValue#::strictEqualcxx . . $ QTJSC/JSValue#strictEqual(658e1865c47113e6).(exec, current.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).(), descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).()))) { |
| 673 | if (throwException) |
| 674 | throwErrorcxx . . $ QTJSC/throwError(c8108d54e75f502b).(exec, TypeErrorcxx . . $ QTJSC/TypeError., "Attempting to change the getter of an unconfigurable property."); |
| 675 | return false; |
| 676 | } |
| 677 | } |
| 678 | JSValuecxx . . $ QTJSC/JSValue# accessor = getDirectcxx . . $ QTJSC/JSObject#getDirect(3d7955d927d372a0).(propertyName); |
| 679 | if (!accessor) |
| 680 | return false; |
| 681 | GetterSettercxx . . $ QTJSC/GetterSetter#* getterSetter = asGetterSettercxx . . $ QTJSC/asGetterSetter(83fbe31bb54d665).(accessor); |
| 682 | if (current.attributesEqualcxx . . $ QTJSC/PropertyDescriptor#attributesEqual(64a9d19dbbeff22f).(descriptor)) { |
| 683 | if (descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).()) |
| 684 | getterSetter->setSettercxx . . $ QTJSC/GetterSetter#setSetter(aa1c69ebc68b9201).(asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).())); |
| 685 | if (descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).()) |
| 686 | getterSetter->setGettercxx . . $ QTJSC/GetterSetter#setGetter(aa1c69ebc68b9201).(asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).())); |
| 687 | return true; |
| 688 | } |
| 689 | deletePropertycxx . . $ QTJSC/JSObject#deleteProperty(13154ef9bddc9416).(exec, propertyName); |
| 690 | unsigned attrs = current.attributesWithOverridecxx . . $ QTJSC/PropertyDescriptor#attributesWithOverride(c28ab2c24163a797).(descriptor); |
| 691 | if (descriptor.settercxx . . $ QTJSC/PropertyDescriptor#setter(888c053acf364da1).()) |
| 692 | attrs |= Settercxx . . $ QTJSC/Setter.; |
| 693 | if (descriptor.gettercxx . . $ QTJSC/PropertyDescriptor#getter(888c053acf364da1).()) |
| 694 | attrs |= Gettercxx . . $ QTJSC/Getter.; |
| 695 | putDirectcxx . . $ QTJSC/JSObject#putDirect(10adf5710ac333de).(propertyName, getterSettercxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64)., attrs); |
| 696 | return true; |
| 697 | } |
| 698 | |
| 699 | } // namespace JSC |