weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) |
| 3 | * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 4 | * Copyright (C) 2003, 2007, 2008 Apple Inc. All rights reserved. |
| 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Library General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Library General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Library General Public License |
| 17 | * along with this library; see the file COPYING.LIB. If not, write to |
| 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 | * Boston, MA 02110-1301, USA. |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #include "config.h" |
| 24 | #include "JSCell.h" |
| 25 | |
fpizlo@apple.com | 0e0d931 | 2013-08-15 20:43:06 +0000 | [diff] [blame] | 26 | #include "ArrayBufferView.h" |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 27 | #include "JSCInlines.h" |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 28 | #include "JSFunction.h" |
| 29 | #include "JSString.h" |
| 30 | #include "JSObject.h" |
mhahnenberg@apple.com | e5e2464 | 2011-09-24 01:19:56 +0000 | [diff] [blame] | 31 | #include "NumberObject.h" |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 32 | #include "WebAssemblyToJSCallee.h" |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 33 | #include <wtf/MathExtras.h> |
| 34 | |
cwzwarich@webkit.org | 3f782f6 | 2008-09-08 01:28:33 +0000 | [diff] [blame] | 35 | namespace JSC { |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 36 | |
mhahnenberg@apple.com | b6f8519 | 2014-02-27 01:27:18 +0000 | [diff] [blame] | 37 | COMPILE_ASSERT(sizeof(JSCell) == sizeof(uint64_t), jscell_is_eight_bytes); |
andersca@apple.com | 7de5aae | 2013-09-05 20:12:23 +0000 | [diff] [blame] | 38 | STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSCell); |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 39 | |
| 40 | void JSCell::destroy(JSCell* cell) |
| 41 | { |
| 42 | cell->JSCell::~JSCell(); |
| 43 | } |
| 44 | |
mhahnenberg@apple.com | 040ef24 | 2014-04-05 20:05:04 +0000 | [diff] [blame] | 45 | void JSCell::dump(PrintStream& out) const |
| 46 | { |
| 47 | methodTable()->dumpToStream(this, out); |
| 48 | } |
| 49 | |
| 50 | void JSCell::dumpToStream(const JSCell* cell, PrintStream& out) |
| 51 | { |
keith_miller@apple.com | 45da760 | 2017-01-27 01:47:52 +0000 | [diff] [blame] | 52 | out.printf("<%p, %s>", cell, cell->className(*cell->vm())); |
mhahnenberg@apple.com | 040ef24 | 2014-04-05 20:05:04 +0000 | [diff] [blame] | 53 | } |
| 54 | |
commit-queue@webkit.org | 00eb52f | 2016-03-01 02:07:12 +0000 | [diff] [blame] | 55 | size_t JSCell::estimatedSizeInBytes() const |
| 56 | { |
| 57 | return methodTable()->estimatedSize(const_cast<JSCell*>(this)); |
| 58 | } |
| 59 | |
| 60 | size_t JSCell::estimatedSize(JSCell* cell) |
| 61 | { |
fpizlo@apple.com | bc16ddb | 2016-09-06 01:02:22 +0000 | [diff] [blame] | 62 | return cell->cellSize(); |
commit-queue@webkit.org | 00eb52f | 2016-03-01 02:07:12 +0000 | [diff] [blame] | 63 | } |
| 64 | |
commit-queue@webkit.org | c4c0f56 | 2016-03-07 23:45:38 +0000 | [diff] [blame] | 65 | void JSCell::heapSnapshot(JSCell*, HeapSnapshotBuilder&) |
| 66 | { |
| 67 | } |
| 68 | |
benjamin@webkit.org | cff06e4 | 2012-08-30 21:23:51 +0000 | [diff] [blame] | 69 | bool JSCell::getString(ExecState* exec, String& stringValue) const |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 70 | { |
| 71 | if (!isString()) |
| 72 | return false; |
barraclough@apple.com | b749f0b | 2009-12-07 23:14:04 +0000 | [diff] [blame] | 73 | stringValue = static_cast<const JSString*>(this)->value(exec); |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 74 | return true; |
| 75 | } |
| 76 | |
benjamin@webkit.org | cff06e4 | 2012-08-30 21:23:51 +0000 | [diff] [blame] | 77 | String JSCell::getString(ExecState* exec) const |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 78 | { |
benjamin@webkit.org | cff06e4 | 2012-08-30 21:23:51 +0000 | [diff] [blame] | 79 | return isString() ? static_cast<const JSString*>(this)->value(exec) : String(); |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | JSObject* JSCell::getObject() |
| 83 | { |
darin@apple.com | 9fb218b | 2009-09-04 18:53:02 +0000 | [diff] [blame] | 84 | return isObject() ? asObject(this) : 0; |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | const JSObject* JSCell::getObject() const |
| 88 | { |
| 89 | return isObject() ? static_cast<const JSObject*>(this) : 0; |
| 90 | } |
| 91 | |
oliver@apple.com | 6ff615e | 2013-07-11 18:35:35 +0000 | [diff] [blame] | 92 | CallType JSCell::getCallData(JSCell*, CallData& callData) |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 93 | { |
oliver@apple.com | 6ff615e | 2013-07-11 18:35:35 +0000 | [diff] [blame] | 94 | callData.js.functionExecutable = 0; |
| 95 | callData.js.scope = 0; |
| 96 | callData.native.function = 0; |
utatane.tea@gmail.com | f76f1b4 | 2016-03-05 17:01:04 +0000 | [diff] [blame] | 97 | return CallType::None; |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 98 | } |
| 99 | |
oliver@apple.com | 6ff615e | 2013-07-11 18:35:35 +0000 | [diff] [blame] | 100 | ConstructType JSCell::getConstructData(JSCell*, ConstructData& constructData) |
mhahnenberg@apple.com | 79c8e6e | 2011-10-08 23:26:41 +0000 | [diff] [blame] | 101 | { |
oliver@apple.com | 6ff615e | 2013-07-11 18:35:35 +0000 | [diff] [blame] | 102 | constructData.js.functionExecutable = 0; |
| 103 | constructData.js.scope = 0; |
| 104 | constructData.native.function = 0; |
utatane.tea@gmail.com | f76f1b4 | 2016-03-05 17:01:04 +0000 | [diff] [blame] | 105 | return ConstructType::None; |
mhahnenberg@apple.com | 79c8e6e | 2011-10-08 23:26:41 +0000 | [diff] [blame] | 106 | } |
| 107 | |
utatane.tea@gmail.com | 78b50c6 | 2016-03-11 17:28:46 +0000 | [diff] [blame] | 108 | bool JSCell::put(JSCell* cell, ExecState* exec, PropertyName identifier, JSValue value, PutPropertySlot& slot) |
mhahnenberg@apple.com | 5e2b712 | 2011-10-08 00:06:07 +0000 | [diff] [blame] | 109 | { |
utatane.tea@gmail.com | 78b50c6 | 2016-03-11 17:28:46 +0000 | [diff] [blame] | 110 | if (cell->isString() || cell->isSymbol()) |
| 111 | return JSValue(cell).putToPrimitive(exec, identifier, value, slot); |
| 112 | |
mhahnenberg@apple.com | 3951278 | 2011-10-26 00:56:55 +0000 | [diff] [blame] | 113 | JSObject* thisObject = cell->toObject(exec, exec->lexicalGlobalObject()); |
utatane.tea@gmail.com | 78b50c6 | 2016-03-11 17:28:46 +0000 | [diff] [blame] | 114 | return thisObject->methodTable(exec->vm())->put(thisObject, exec, identifier, value, slot); |
mhahnenberg@apple.com | 5e2b712 | 2011-10-08 00:06:07 +0000 | [diff] [blame] | 115 | } |
| 116 | |
utatane.tea@gmail.com | 78b50c6 | 2016-03-11 17:28:46 +0000 | [diff] [blame] | 117 | bool JSCell::putByIndex(JSCell* cell, ExecState* exec, unsigned identifier, JSValue value, bool shouldThrow) |
mhahnenberg@apple.com | 5e2b712 | 2011-10-08 00:06:07 +0000 | [diff] [blame] | 118 | { |
utatane.tea@gmail.com | 947fa4e | 2015-01-31 01:23:56 +0000 | [diff] [blame] | 119 | if (cell->isString() || cell->isSymbol()) { |
oliver@apple.com | 6884841 | 2014-01-02 20:56:20 +0000 | [diff] [blame] | 120 | PutPropertySlot slot(cell, shouldThrow); |
utatane.tea@gmail.com | 78b50c6 | 2016-03-11 17:28:46 +0000 | [diff] [blame] | 121 | return JSValue(cell).putToPrimitive(exec, Identifier::from(exec, identifier), value, slot); |
barraclough@apple.com | b1db28d8 | 2012-03-06 07:23:21 +0000 | [diff] [blame] | 122 | } |
mhahnenberg@apple.com | 3951278 | 2011-10-26 00:56:55 +0000 | [diff] [blame] | 123 | JSObject* thisObject = cell->toObject(exec, exec->lexicalGlobalObject()); |
utatane.tea@gmail.com | 78b50c6 | 2016-03-11 17:28:46 +0000 | [diff] [blame] | 124 | return thisObject->methodTable(exec->vm())->putByIndex(thisObject, exec, identifier, value, shouldThrow); |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 125 | } |
| 126 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 127 | bool JSCell::deleteProperty(JSCell* cell, ExecState* exec, PropertyName identifier) |
mhahnenberg@apple.com | 914c3ee | 2011-10-08 06:37:45 +0000 | [diff] [blame] | 128 | { |
mhahnenberg@apple.com | c0f87c1 | 2011-10-26 01:49:00 +0000 | [diff] [blame] | 129 | JSObject* thisObject = cell->toObject(exec, exec->lexicalGlobalObject()); |
mhahnenberg@apple.com | b6f8519 | 2014-02-27 01:27:18 +0000 | [diff] [blame] | 130 | return thisObject->methodTable(exec->vm())->deleteProperty(thisObject, exec, identifier); |
mhahnenberg@apple.com | 914c3ee | 2011-10-08 06:37:45 +0000 | [diff] [blame] | 131 | } |
| 132 | |
mhahnenberg@apple.com | 8a10db9 | 2011-10-20 18:14:50 +0000 | [diff] [blame] | 133 | bool JSCell::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned identifier) |
mhahnenberg@apple.com | 914c3ee | 2011-10-08 06:37:45 +0000 | [diff] [blame] | 134 | { |
mhahnenberg@apple.com | c0f87c1 | 2011-10-26 01:49:00 +0000 | [diff] [blame] | 135 | JSObject* thisObject = cell->toObject(exec, exec->lexicalGlobalObject()); |
mhahnenberg@apple.com | b6f8519 | 2014-02-27 01:27:18 +0000 | [diff] [blame] | 136 | return thisObject->methodTable(exec->vm())->deletePropertyByIndex(thisObject, exec, identifier); |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 137 | } |
| 138 | |
oliver@apple.com | e2fe4ce | 2013-07-25 03:59:41 +0000 | [diff] [blame] | 139 | JSValue JSCell::toThis(JSCell* cell, ExecState* exec, ECMAMode ecmaMode) |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 140 | { |
oliver@apple.com | e2fe4ce | 2013-07-25 03:59:41 +0000 | [diff] [blame] | 141 | if (ecmaMode == StrictMode) |
| 142 | return cell; |
mhahnenberg@apple.com | c93887c | 2011-10-27 17:01:38 +0000 | [diff] [blame] | 143 | return cell->toObject(exec, exec->lexicalGlobalObject()); |
weinig@apple.com | 6a03b4c | 2008-07-01 17:32:44 +0000 | [diff] [blame] | 144 | } |
| 145 | |
mhahnenberg@apple.com | 02a74ea | 2011-09-20 04:33:10 +0000 | [diff] [blame] | 146 | JSValue JSCell::toPrimitive(ExecState* exec, PreferredPrimitiveType preferredType) const |
commit-queue@webkit.org | a7d0ea5 | 2011-09-19 21:28:06 +0000 | [diff] [blame] | 147 | { |
mhahnenberg@apple.com | 02a74ea | 2011-09-20 04:33:10 +0000 | [diff] [blame] | 148 | if (isString()) |
| 149 | return static_cast<const JSString*>(this)->toPrimitive(exec, preferredType); |
utatane.tea@gmail.com | 947fa4e | 2015-01-31 01:23:56 +0000 | [diff] [blame] | 150 | if (isSymbol()) |
| 151 | return static_cast<const Symbol*>(this)->toPrimitive(exec, preferredType); |
mhahnenberg@apple.com | 02a74ea | 2011-09-20 04:33:10 +0000 | [diff] [blame] | 152 | return static_cast<const JSObject*>(this)->toPrimitive(exec, preferredType); |
commit-queue@webkit.org | a7d0ea5 | 2011-09-19 21:28:06 +0000 | [diff] [blame] | 153 | } |
| 154 | |
mhahnenberg@apple.com | 061133e | 2011-09-27 19:53:49 +0000 | [diff] [blame] | 155 | bool JSCell::getPrimitiveNumber(ExecState* exec, double& number, JSValue& value) const |
ggaren@apple.com | cece756 | 2009-08-26 23:00:39 +0000 | [diff] [blame] | 156 | { |
mhahnenberg@apple.com | 061133e | 2011-09-27 19:53:49 +0000 | [diff] [blame] | 157 | if (isString()) |
| 158 | return static_cast<const JSString*>(this)->getPrimitiveNumber(exec, number, value); |
utatane.tea@gmail.com | 947fa4e | 2015-01-31 01:23:56 +0000 | [diff] [blame] | 159 | if (isSymbol()) |
| 160 | return static_cast<const Symbol*>(this)->getPrimitiveNumber(exec, number, value); |
mhahnenberg@apple.com | 061133e | 2011-09-27 19:53:49 +0000 | [diff] [blame] | 161 | return static_cast<const JSObject*>(this)->getPrimitiveNumber(exec, number, value); |
ggaren@apple.com | cece756 | 2009-08-26 23:00:39 +0000 | [diff] [blame] | 162 | } |
| 163 | |
mhahnenberg@apple.com | 8d0ab17 | 2011-10-13 19:24:53 +0000 | [diff] [blame] | 164 | double JSCell::toNumber(ExecState* exec) const |
mark.lam@apple.com | d42b3b8 | 2016-11-22 03:35:25 +0000 | [diff] [blame] | 165 | { |
mhahnenberg@apple.com | 8d0ab17 | 2011-10-13 19:24:53 +0000 | [diff] [blame] | 166 | if (isString()) |
| 167 | return static_cast<const JSString*>(this)->toNumber(exec); |
utatane.tea@gmail.com | 947fa4e | 2015-01-31 01:23:56 +0000 | [diff] [blame] | 168 | if (isSymbol()) |
| 169 | return static_cast<const Symbol*>(this)->toNumber(exec); |
mhahnenberg@apple.com | 8d0ab17 | 2011-10-13 19:24:53 +0000 | [diff] [blame] | 170 | return static_cast<const JSObject*>(this)->toNumber(exec); |
ggaren@apple.com | cece756 | 2009-08-26 23:00:39 +0000 | [diff] [blame] | 171 | } |
| 172 | |
cdumez@apple.com | ff56ee1 | 2016-12-09 23:37:00 +0000 | [diff] [blame] | 173 | JSObject* JSCell::toObjectSlow(ExecState* exec, JSGlobalObject* globalObject) const |
ggaren@apple.com | cece756 | 2009-08-26 23:00:39 +0000 | [diff] [blame] | 174 | { |
cdumez@apple.com | ff56ee1 | 2016-12-09 23:37:00 +0000 | [diff] [blame] | 175 | ASSERT(!isObject()); |
mhahnenberg@apple.com | b6e2ac6 | 2011-09-30 02:09:16 +0000 | [diff] [blame] | 176 | if (isString()) |
| 177 | return static_cast<const JSString*>(this)->toObject(exec, globalObject); |
cdumez@apple.com | ff56ee1 | 2016-12-09 23:37:00 +0000 | [diff] [blame] | 178 | ASSERT(isSymbol()); |
| 179 | return static_cast<const Symbol*>(this)->toObject(exec, globalObject); |
ggaren@apple.com | cece756 | 2009-08-26 23:00:39 +0000 | [diff] [blame] | 180 | } |
| 181 | |
oliver@apple.com | 4103716 | 2011-05-14 22:10:01 +0000 | [diff] [blame] | 182 | void slowValidateCell(JSCell* cell) |
| 183 | { |
| 184 | ASSERT_GC_OBJECT_LOOKS_VALID(cell); |
| 185 | } |
| 186 | |
mhahnenberg@apple.com | 6e506e6 | 2011-11-01 01:15:06 +0000 | [diff] [blame] | 187 | JSValue JSCell::defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType) |
| 188 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 189 | RELEASE_ASSERT_NOT_REACHED(); |
mhahnenberg@apple.com | 6e506e6 | 2011-11-01 01:15:06 +0000 | [diff] [blame] | 190 | return jsUndefined(); |
| 191 | } |
| 192 | |
barraclough@apple.com | ab7b609 | 2013-07-31 19:03:05 +0000 | [diff] [blame] | 193 | bool JSCell::getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&) |
| 194 | { |
| 195 | RELEASE_ASSERT_NOT_REACHED(); |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | bool JSCell::getOwnPropertySlotByIndex(JSObject*, ExecState*, unsigned, PropertySlot&) |
| 200 | { |
| 201 | RELEASE_ASSERT_NOT_REACHED(); |
| 202 | return false; |
| 203 | } |
| 204 | |
mhahnenberg@apple.com | 5726238 | 2011-11-03 00:25:45 +0000 | [diff] [blame] | 205 | void JSCell::getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) |
| 206 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 207 | RELEASE_ASSERT_NOT_REACHED(); |
mhahnenberg@apple.com | 5726238 | 2011-11-03 00:25:45 +0000 | [diff] [blame] | 208 | } |
| 209 | |
fpizlo@apple.com | d8dd053 | 2012-09-13 04:18:52 +0000 | [diff] [blame] | 210 | void JSCell::getOwnNonIndexPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) |
| 211 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 212 | RELEASE_ASSERT_NOT_REACHED(); |
fpizlo@apple.com | d8dd053 | 2012-09-13 04:18:52 +0000 | [diff] [blame] | 213 | } |
| 214 | |
benjamin@webkit.org | cff06e4 | 2012-08-30 21:23:51 +0000 | [diff] [blame] | 215 | String JSCell::className(const JSObject*) |
mhahnenberg@apple.com | b039de0 | 2011-11-03 18:20:08 +0000 | [diff] [blame] | 216 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 217 | RELEASE_ASSERT_NOT_REACHED(); |
benjamin@webkit.org | cff06e4 | 2012-08-30 21:23:51 +0000 | [diff] [blame] | 218 | return String(); |
mhahnenberg@apple.com | b039de0 | 2011-11-03 18:20:08 +0000 | [diff] [blame] | 219 | } |
| 220 | |
keith_miller@apple.com | 398a66a | 2016-08-29 18:50:44 +0000 | [diff] [blame] | 221 | String JSCell::toStringName(const JSObject*, ExecState*) |
keith_miller@apple.com | ecc04d1 | 2016-08-26 17:05:21 +0000 | [diff] [blame] | 222 | { |
| 223 | RELEASE_ASSERT_NOT_REACHED(); |
| 224 | return String(); |
| 225 | } |
| 226 | |
keith_miller@apple.com | 45da760 | 2017-01-27 01:47:52 +0000 | [diff] [blame] | 227 | const char* JSCell::className(VM& vm) const |
msaboff@apple.com | 9d9eab6 | 2012-06-06 23:11:09 +0000 | [diff] [blame] | 228 | { |
keith_miller@apple.com | 45da760 | 2017-01-27 01:47:52 +0000 | [diff] [blame] | 229 | return classInfo(vm)->className; |
msaboff@apple.com | 9d9eab6 | 2012-06-06 23:11:09 +0000 | [diff] [blame] | 230 | } |
| 231 | |
mhahnenberg@apple.com | 2358ae1 | 2011-11-04 01:32:18 +0000 | [diff] [blame] | 232 | void JSCell::getPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) |
| 233 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 234 | RELEASE_ASSERT_NOT_REACHED(); |
mhahnenberg@apple.com | 2358ae1 | 2011-11-04 01:32:18 +0000 | [diff] [blame] | 235 | } |
| 236 | |
barraclough@apple.com | b46d57b4 | 2012-09-22 00:43:03 +0000 | [diff] [blame] | 237 | bool JSCell::customHasInstance(JSObject*, ExecState*, JSValue) |
mhahnenberg@apple.com | 069ad17 | 2011-11-04 20:37:32 +0000 | [diff] [blame] | 238 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 239 | RELEASE_ASSERT_NOT_REACHED(); |
mhahnenberg@apple.com | 069ad17 | 2011-11-04 20:37:32 +0000 | [diff] [blame] | 240 | return false; |
| 241 | } |
| 242 | |
barraclough@apple.com | 61ff98c | 2013-08-21 22:32:10 +0000 | [diff] [blame] | 243 | bool JSCell::defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool) |
mhahnenberg@apple.com | 8c9572d | 2011-11-09 10:18:04 +0000 | [diff] [blame] | 244 | { |
oliver@apple.com | 5598c18 | 2013-01-23 22:25:07 +0000 | [diff] [blame] | 245 | RELEASE_ASSERT_NOT_REACHED(); |
mhahnenberg@apple.com | 8c9572d | 2011-11-09 10:18:04 +0000 | [diff] [blame] | 246 | return false; |
| 247 | } |
| 248 | |
fpizlo@apple.com | cd07b47 | 2013-08-21 20:53:57 +0000 | [diff] [blame] | 249 | ArrayBuffer* JSCell::slowDownAndWasteMemory(JSArrayBufferView*) |
fpizlo@apple.com | 0e0d931 | 2013-08-15 20:43:06 +0000 | [diff] [blame] | 250 | { |
| 251 | RELEASE_ASSERT_NOT_REACHED(); |
utatane.tea@gmail.com | 473448d | 2017-02-17 06:04:16 +0000 | [diff] [blame] | 252 | return nullptr; |
fpizlo@apple.com | 0e0d931 | 2013-08-15 20:43:06 +0000 | [diff] [blame] | 253 | } |
| 254 | |
utatane.tea@gmail.com | 473448d | 2017-02-17 06:04:16 +0000 | [diff] [blame] | 255 | RefPtr<ArrayBufferView> JSCell::getTypedArrayImpl(JSArrayBufferView*) |
fpizlo@apple.com | 0e0d931 | 2013-08-15 20:43:06 +0000 | [diff] [blame] | 256 | { |
| 257 | RELEASE_ASSERT_NOT_REACHED(); |
utatane.tea@gmail.com | 473448d | 2017-02-17 06:04:16 +0000 | [diff] [blame] | 258 | return nullptr; |
fpizlo@apple.com | 0e0d931 | 2013-08-15 20:43:06 +0000 | [diff] [blame] | 259 | } |
| 260 | |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 261 | uint32_t JSCell::getEnumerableLength(ExecState*, JSObject*) |
| 262 | { |
| 263 | RELEASE_ASSERT_NOT_REACHED(); |
mark.lam@apple.com | 6663ef3 | 2014-08-07 00:48:01 +0000 | [diff] [blame] | 264 | return 0; |
fpizlo@apple.com | a398a56 | 2014-08-06 21:32:55 +0000 | [diff] [blame] | 265 | } |
| 266 | |
| 267 | void JSCell::getStructurePropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) |
| 268 | { |
| 269 | RELEASE_ASSERT_NOT_REACHED(); |
| 270 | } |
| 271 | |
| 272 | void JSCell::getGenericPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) |
| 273 | { |
| 274 | RELEASE_ASSERT_NOT_REACHED(); |
| 275 | } |
| 276 | |
sbarati@apple.com | 7800702 | 2016-03-01 08:11:20 +0000 | [diff] [blame] | 277 | bool JSCell::preventExtensions(JSObject*, ExecState*) |
| 278 | { |
| 279 | RELEASE_ASSERT_NOT_REACHED(); |
| 280 | } |
| 281 | |
sbarati@apple.com | 5fd2ac8 | 2016-03-01 21:45:16 +0000 | [diff] [blame] | 282 | bool JSCell::isExtensible(JSObject*, ExecState*) |
| 283 | { |
| 284 | RELEASE_ASSERT_NOT_REACHED(); |
| 285 | } |
| 286 | |
sbarati@apple.com | f3cac47 | 2016-03-03 19:18:35 +0000 | [diff] [blame] | 287 | bool JSCell::setPrototype(JSObject*, ExecState*, JSValue, bool) |
sbarati@apple.com | 48c57df | 2016-03-02 22:39:02 +0000 | [diff] [blame] | 288 | { |
| 289 | RELEASE_ASSERT_NOT_REACHED(); |
| 290 | } |
| 291 | |
sbarati@apple.com | fa85752 | 2016-03-07 01:00:33 +0000 | [diff] [blame] | 292 | JSValue JSCell::getPrototype(JSObject*, ExecState*) |
| 293 | { |
| 294 | RELEASE_ASSERT_NOT_REACHED(); |
| 295 | } |
| 296 | |
cwzwarich@webkit.org | 3f782f6 | 2008-09-08 01:28:33 +0000 | [diff] [blame] | 297 | } // namespace JSC |