Changeset 206386 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Sep 26, 2016, 12:11:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r206379 r206386 1 2016-09-26 Mark Lam <[email protected]> 2 3 Added RETURN_IF_EXCEPTION() macro and use it for exception checks. 4 https://bugs.webkit.org/show_bug.cgi?id=162521 5 6 Reviewed by Saam Barati. 7 8 Also, where possible, if the return type is JSValue, changed the returned value 9 (on exception) to the empty JSValue (instead of sometimes jsUndefined, jsNull, 10 or the thrown exception value). 11 12 There are a few places where I had to continue to return the previously returned 13 value (instead of the empty JSValue) in order for tests to pass. This is needed 14 because there are missing exception checks that will need to be added before I 15 can change those to return the empty JSValue too. Identifying all the places 16 where those checks need to be added is beyond the scope of this patch. I will 17 work on adding missing exception checks in a subsequent patch. 18 19 In this patch, there is one missing exception check in replaceUsingRegExpSearch() 20 that was easily identified, and is necessary so that Interpreter::execute() 21 functions can return JSValue. I've added this missing check. 22 23 This patch has passed the JSC and layout tests. 24 25 * dfg/DFGOperations.cpp: 26 (JSC::DFG::operationPutByValInternal): 27 * inspector/JSInjectedScriptHost.cpp: 28 (Inspector::JSInjectedScriptHost::evaluateWithScopeExtension): 29 (Inspector::JSInjectedScriptHost::getInternalProperties): 30 (Inspector::JSInjectedScriptHost::weakMapEntries): 31 (Inspector::JSInjectedScriptHost::weakSetEntries): 32 (Inspector::JSInjectedScriptHost::iteratorEntries): 33 * inspector/JSJavaScriptCallFrame.cpp: 34 (Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension): 35 * interpreter/Interpreter.cpp: 36 (JSC::eval): 37 (JSC::sizeOfVarargs): 38 (JSC::Interpreter::execute): 39 (JSC::Interpreter::executeCall): 40 (JSC::Interpreter::executeConstruct): 41 * interpreter/ShadowChicken.cpp: 42 (JSC::ShadowChicken::functionsOnStack): 43 * jit/JITOperations.cpp: 44 (JSC::getByVal): 45 * jsc.cpp: 46 (WTF::ImpureGetter::getOwnPropertySlot): 47 (functionRun): 48 (functionRunString): 49 (functionLoad): 50 (functionLoadString): 51 (functionReadFile): 52 (functionCheckSyntax): 53 (functionSetRandomSeed): 54 (functionLoadModule): 55 (functionCreateBuiltin): 56 (functionCheckModuleSyntax): 57 * llint/LLIntSlowPaths.cpp: 58 (JSC::LLInt::getByVal): 59 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 60 * profiler/ProfilerBytecodeSequence.cpp: 61 (JSC::Profiler::BytecodeSequence::addSequenceProperties): 62 * profiler/ProfilerCompilation.cpp: 63 (JSC::Profiler::Compilation::toJS): 64 * profiler/ProfilerDatabase.cpp: 65 (JSC::Profiler::Database::toJS): 66 * profiler/ProfilerOSRExitSite.cpp: 67 (JSC::Profiler::OSRExitSite::toJS): 68 * profiler/ProfilerOriginStack.cpp: 69 (JSC::Profiler::OriginStack::toJS): 70 * runtime/ArrayPrototype.cpp: 71 (JSC::speciesConstructArray): 72 (JSC::shift): 73 (JSC::unshift): 74 (JSC::arrayProtoFuncToString): 75 (JSC::arrayProtoFuncToLocaleString): 76 (JSC::slowJoin): 77 (JSC::fastJoin): 78 (JSC::arrayProtoFuncJoin): 79 (JSC::arrayProtoFuncPop): 80 (JSC::arrayProtoFuncPush): 81 (JSC::arrayProtoFuncReverse): 82 (JSC::arrayProtoFuncShift): 83 (JSC::arrayProtoFuncSlice): 84 (JSC::arrayProtoFuncSplice): 85 (JSC::arrayProtoFuncUnShift): 86 (JSC::arrayProtoFuncIndexOf): 87 (JSC::arrayProtoFuncLastIndexOf): 88 (JSC::moveElements): 89 (JSC::arrayProtoPrivateFuncConcatMemcpy): 90 * runtime/BooleanConstructor.cpp: 91 (JSC::constructWithBooleanConstructor): 92 * runtime/CommonSlowPaths.h: 93 (JSC::CommonSlowPaths::opIn): 94 * runtime/Completion.cpp: 95 (JSC::loadAndEvaluateModule): 96 (JSC::loadModule): 97 * runtime/ConsoleObject.cpp: 98 (JSC::consoleProtoFuncAssert): 99 (JSC::consoleProtoFuncProfile): 100 (JSC::consoleProtoFuncProfileEnd): 101 (JSC::consoleProtoFuncTakeHeapSnapshot): 102 (JSC::consoleProtoFuncTime): 103 (JSC::consoleProtoFuncTimeEnd): 104 * runtime/DateConstructor.cpp: 105 (JSC::constructDate): 106 (JSC::dateParse): 107 * runtime/DatePrototype.cpp: 108 (JSC::dateProtoFuncToPrimitiveSymbol): 109 (JSC::dateProtoFuncToJSON): 110 * runtime/ErrorConstructor.cpp: 111 (JSC::Interpreter::constructWithErrorConstructor): 112 * runtime/ErrorInstance.cpp: 113 (JSC::ErrorInstance::sanitizedToString): 114 * runtime/ErrorPrototype.cpp: 115 (JSC::errorProtoFuncToString): 116 * runtime/ExceptionScope.h: 117 * runtime/FunctionConstructor.cpp: 118 (JSC::constructFunctionSkippingEvalEnabledCheck): 119 * runtime/GenericArgumentsInlines.h: 120 (JSC::GenericArguments<Type>::copyToArguments): 121 * runtime/GetterSetter.cpp: 122 (JSC::callGetter): 123 * runtime/HashMapImpl.h: 124 (JSC::jsMapHash): 125 (JSC::HashMapImpl::finishCreation): 126 (JSC::HashMapImpl::findBucket): 127 (JSC::HashMapImpl::add): 128 (JSC::HashMapImpl::rehash): 129 * runtime/InspectorInstrumentationObject.cpp: 130 (JSC::inspectorInstrumentationObjectLog): 131 * runtime/InternalFunction.cpp: 132 (JSC::InternalFunction::createSubclassStructure): 133 * runtime/IntlCollator.cpp: 134 (JSC::IntlCollator::initializeCollator): 135 * runtime/IntlCollatorConstructor.cpp: 136 (JSC::constructIntlCollator): 137 (JSC::IntlCollatorConstructorFuncSupportedLocalesOf): 138 * runtime/IntlCollatorPrototype.cpp: 139 (JSC::IntlCollatorFuncCompare): 140 (JSC::IntlCollatorPrototypeGetterCompare): 141 * runtime/IntlDateTimeFormat.cpp: 142 (JSC::toDateTimeOptionsAnyDate): 143 (JSC::IntlDateTimeFormat::initializeDateTimeFormat): 144 * runtime/IntlDateTimeFormatConstructor.cpp: 145 (JSC::constructIntlDateTimeFormat): 146 (JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf): 147 * runtime/IntlDateTimeFormatPrototype.cpp: 148 (JSC::IntlDateTimeFormatFuncFormatDateTime): 149 (JSC::IntlDateTimeFormatPrototypeGetterFormat): 150 * runtime/IntlNumberFormat.cpp: 151 (JSC::IntlNumberFormat::initializeNumberFormat): 152 * runtime/IntlNumberFormatConstructor.cpp: 153 (JSC::constructIntlNumberFormat): 154 (JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf): 155 * runtime/IntlNumberFormatPrototype.cpp: 156 (JSC::IntlNumberFormatFuncFormatNumber): 157 (JSC::IntlNumberFormatPrototypeGetterFormat): 158 * runtime/IntlObject.cpp: 159 (JSC::intlBooleanOption): 160 (JSC::intlStringOption): 161 (JSC::intlNumberOption): 162 (JSC::canonicalizeLocaleList): 163 (JSC::supportedLocales): 164 * runtime/IntlObjectInlines.h: 165 (JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor): 166 * runtime/IteratorOperations.cpp: 167 (JSC::iteratorNext): 168 (JSC::iteratorStep): 169 (JSC::iteratorClose): 170 (JSC::iteratorForIterable): 171 * runtime/IteratorOperations.h: 172 (JSC::forEachInIterable): 173 * runtime/JSArray.cpp: 174 (JSC::JSArray::pop): 175 (JSC::JSArray::copyToArguments): 176 * runtime/JSArrayBufferConstructor.cpp: 177 (JSC::constructArrayBuffer): 178 * runtime/JSArrayBufferPrototype.cpp: 179 (JSC::arrayBufferProtoFuncSlice): 180 * runtime/JSArrayInlines.h: 181 (JSC::getLength): 182 (JSC::toLength): 183 * runtime/JSBoundFunction.cpp: 184 (JSC::getBoundFunctionStructure): 185 (JSC::JSBoundFunction::create): 186 * runtime/JSCJSValue.cpp: 187 (JSC::JSValue::putToPrimitive): 188 (JSC::JSValue::toStringSlowCase): 189 * runtime/JSCJSValueInlines.h: 190 (JSC::toPreferredPrimitiveType): 191 (JSC::JSValue::getPropertySlot): 192 (JSC::JSValue::equalSlowCaseInline): 193 * runtime/JSDataViewPrototype.cpp: 194 (JSC::getData): 195 (JSC::setData): 196 * runtime/JSFunction.cpp: 197 (JSC::JSFunction::setFunctionName): 198 * runtime/JSGenericTypedArrayView.h: 199 (JSC::JSGenericTypedArrayView::setIndex): 200 * runtime/JSGenericTypedArrayViewConstructorInlines.h: 201 (JSC::constructGenericTypedArrayViewFromIterator): 202 (JSC::constructGenericTypedArrayViewWithArguments): 203 (JSC::constructGenericTypedArrayView): 204 * runtime/JSGenericTypedArrayViewPrototypeFunctions.h: 205 (JSC::speciesConstruct): 206 (JSC::genericTypedArrayViewProtoFuncSet): 207 (JSC::genericTypedArrayViewProtoFuncCopyWithin): 208 (JSC::genericTypedArrayViewProtoFuncIncludes): 209 (JSC::genericTypedArrayViewProtoFuncIndexOf): 210 (JSC::genericTypedArrayViewProtoFuncJoin): 211 (JSC::genericTypedArrayViewProtoFuncLastIndexOf): 212 (JSC::genericTypedArrayViewProtoFuncSlice): 213 (JSC::genericTypedArrayViewPrivateFuncSubarrayCreate): 214 * runtime/JSGlobalObject.h: 215 (JSC::constructEmptyArray): 216 (JSC::constructArray): 217 (JSC::constructArrayNegativeIndexed): 218 * runtime/JSGlobalObjectFunctions.cpp: 219 (JSC::globalFuncEval): 220 * runtime/JSModuleRecord.cpp: 221 (JSC::JSModuleRecord::instantiateDeclarations): 222 * runtime/JSONObject.cpp: 223 (JSC::Stringifier::stringify): 224 (JSC::Stringifier::toJSON): 225 (JSC::Stringifier::appendStringifiedValue): 226 (JSC::Stringifier::Holder::appendNextProperty): 227 (JSC::Walker::walk): 228 (JSC::JSONProtoFuncParse): 229 * runtime/JSObject.cpp: 230 (JSC::ordinarySetSlow): 231 (JSC::JSObject::setPrototypeWithCycleCheck): 232 (JSC::callToPrimitiveFunction): 233 (JSC::JSObject::defaultHasInstance): 234 (JSC::JSObject::getPropertyNames): 235 (JSC::JSObject::toNumber): 236 (JSC::JSObject::toString): 237 (JSC::JSObject::defineOwnNonIndexProperty): 238 (JSC::JSObject::getGenericPropertyNames): 239 (JSC::JSObject::getMethod): 240 * runtime/JSObjectInlines.h: 241 (JSC::createListFromArrayLike): 242 (JSC::JSObject::getPropertySlot): 243 (JSC::JSObject::getNonIndexPropertySlot): 244 * runtime/JSPromiseConstructor.cpp: 245 (JSC::constructPromise): 246 * runtime/JSPromiseDeferred.cpp: 247 (JSC::JSPromiseDeferred::create): 248 * runtime/JSPropertyNameEnumerator.h: 249 (JSC::propertyNameEnumerator): 250 * runtime/JSPropertyNameIterator.cpp: 251 (JSC::JSPropertyNameIterator::create): 252 * runtime/JSScope.cpp: 253 (JSC::isUnscopable): 254 * runtime/JSString.cpp: 255 (JSC::JSString::equalSlowCase): 256 * runtime/JSStringJoiner.cpp: 257 (JSC::JSStringJoiner::join): 258 * runtime/LiteralParser.cpp: 259 (JSC::LiteralParser<CharType>::parse): 260 * runtime/MapBase.h: 261 (JSC::MapBase::finishCreation): 262 * runtime/MapConstructor.cpp: 263 (JSC::constructMap): 264 * runtime/MathObject.cpp: 265 (JSC::mathProtoFuncClz32): 266 (JSC::mathProtoFuncHypot): 267 (JSC::mathProtoFuncIMul): 268 * runtime/ModuleLoaderPrototype.cpp: 269 (JSC::moduleLoaderPrototypeParseModule): 270 (JSC::moduleLoaderPrototypeRequestedModules): 271 (JSC::moduleLoaderPrototypeModuleDeclarationInstantiation): 272 * runtime/NativeErrorConstructor.cpp: 273 (JSC::Interpreter::constructWithNativeErrorConstructor): 274 * runtime/NumberConstructor.cpp: 275 (JSC::constructWithNumberConstructor): 276 * runtime/ObjectConstructor.cpp: 277 (JSC::constructObject): 278 (JSC::objectConstructorGetPrototypeOf): 279 (JSC::objectConstructorSetPrototypeOf): 280 (JSC::objectConstructorGetOwnPropertyDescriptor): 281 (JSC::objectConstructorGetOwnPropertyDescriptors): 282 (JSC::objectConstructorGetOwnPropertyNames): 283 (JSC::objectConstructorGetOwnPropertySymbols): 284 (JSC::objectConstructorKeys): 285 (JSC::ownEnumerablePropertyKeys): 286 (JSC::toPropertyDescriptor): 287 (JSC::objectConstructorDefineProperty): 288 (JSC::defineProperties): 289 (JSC::objectConstructorSeal): 290 (JSC::objectConstructorFreeze): 291 (JSC::objectConstructorIsSealed): 292 (JSC::objectConstructorIsFrozen): 293 (JSC::objectConstructorIsExtensible): 294 (JSC::ownPropertyKeys): 295 * runtime/ObjectConstructor.h: 296 (JSC::constructObjectFromPropertyDescriptor): 297 * runtime/ObjectPrototype.cpp: 298 (JSC::objectProtoFuncHasOwnProperty): 299 (JSC::objectProtoFuncIsPrototypeOf): 300 (JSC::objectProtoFuncDefineGetter): 301 (JSC::objectProtoFuncDefineSetter): 302 (JSC::objectProtoFuncLookupGetter): 303 (JSC::objectProtoFuncLookupSetter): 304 (JSC::objectProtoFuncPropertyIsEnumerable): 305 (JSC::objectProtoFuncToLocaleString): 306 (JSC::objectProtoFuncToString): 307 * runtime/Operations.cpp: 308 (JSC::jsAddSlowCase): 309 * runtime/PropertyDescriptor.cpp: 310 (JSC::PropertyDescriptor::slowGetterSetter): 311 * runtime/ProxyConstructor.cpp: 312 (JSC::makeRevocableProxy): 313 * runtime/ProxyObject.cpp: 314 (JSC::performProxyGet): 315 (JSC::ProxyObject::performGet): 316 (JSC::ProxyObject::performInternalMethodGetOwnProperty): 317 (JSC::ProxyObject::performHasProperty): 318 (JSC::ProxyObject::performPut): 319 (JSC::ProxyObject::putByIndexCommon): 320 (JSC::performProxyCall): 321 (JSC::performProxyConstruct): 322 (JSC::ProxyObject::performDelete): 323 (JSC::ProxyObject::performPreventExtensions): 324 (JSC::ProxyObject::performIsExtensible): 325 (JSC::ProxyObject::performDefineOwnProperty): 326 (JSC::ProxyObject::performGetOwnPropertyNames): 327 (JSC::ProxyObject::performSetPrototype): 328 (JSC::ProxyObject::performGetPrototype): 329 * runtime/ReflectObject.cpp: 330 (JSC::reflectObjectConstruct): 331 (JSC::reflectObjectDefineProperty): 332 (JSC::reflectObjectGet): 333 (JSC::reflectObjectGetOwnPropertyDescriptor): 334 (JSC::reflectObjectIsExtensible): 335 (JSC::reflectObjectPreventExtensions): 336 (JSC::reflectObjectSet): 337 (JSC::reflectObjectSetPrototypeOf): 338 * runtime/RegExpConstructor.cpp: 339 (JSC::toFlags): 340 (JSC::regExpCreate): 341 (JSC::constructRegExp): 342 * runtime/RegExpConstructor.h: 343 (JSC::isRegExp): 344 * runtime/RegExpObject.cpp: 345 (JSC::collectMatches): 346 (JSC::RegExpObject::matchGlobal): 347 * runtime/RegExpPrototype.cpp: 348 (JSC::regExpProtoFuncCompile): 349 (JSC::flagsString): 350 (JSC::regExpProtoFuncToString): 351 (JSC::regExpProtoGetterFlags): 352 (JSC::regExpProtoFuncSearchFast): 353 (JSC::regExpProtoFuncSplitFast): 354 * runtime/SetConstructor.cpp: 355 (JSC::constructSet): 356 * runtime/StringConstructor.cpp: 357 (JSC::stringFromCodePoint): 358 (JSC::constructWithStringConstructor): 359 * runtime/StringObject.cpp: 360 (JSC::StringObject::defineOwnProperty): 361 * runtime/StringPrototype.cpp: 362 (JSC::replaceUsingRegExpSearch): 363 (JSC::operationStringProtoFuncReplaceRegExpEmptyStr): 364 (JSC::replaceUsingStringSearch): 365 (JSC::replace): 366 (JSC::stringProtoFuncReplaceUsingRegExp): 367 (JSC::stringProtoFuncReplaceUsingStringSearch): 368 (JSC::stringProtoFuncCodePointAt): 369 (JSC::stringProtoFuncSlice): 370 (JSC::stringProtoFuncSplitFast): 371 (JSC::stringProtoFuncSubstr): 372 (JSC::stringProtoFuncSubstring): 373 (JSC::stringProtoFuncLocaleCompare): 374 (JSC::toLocaleCase): 375 (JSC::stringProtoFuncBig): 376 (JSC::stringProtoFuncSmall): 377 (JSC::stringProtoFuncBlink): 378 (JSC::stringProtoFuncBold): 379 (JSC::stringProtoFuncFixed): 380 (JSC::stringProtoFuncItalics): 381 (JSC::stringProtoFuncStrike): 382 (JSC::stringProtoFuncSub): 383 (JSC::stringProtoFuncSup): 384 (JSC::stringProtoFuncFontcolor): 385 (JSC::stringProtoFuncFontsize): 386 (JSC::stringProtoFuncAnchor): 387 (JSC::stringProtoFuncLink): 388 (JSC::trimString): 389 (JSC::stringProtoFuncStartsWith): 390 (JSC::stringProtoFuncEndsWith): 391 (JSC::stringIncludesImpl): 392 (JSC::stringProtoFuncIncludes): 393 (JSC::builtinStringIncludesInternal): 394 (JSC::stringProtoFuncNormalize): 395 * runtime/SymbolConstructor.cpp: 396 (JSC::symbolConstructorFor): 397 * runtime/TemplateRegistry.cpp: 398 (JSC::TemplateRegistry::getTemplateObject): 399 * runtime/WeakMapConstructor.cpp: 400 (JSC::constructWeakMap): 401 * runtime/WeakSetConstructor.cpp: 402 (JSC::constructWeakSet): 403 * tools/JSDollarVMPrototype.cpp: 404 (JSC::functionPrint): 405 1 406 2016-09-26 Don Olmstead <[email protected]> 2 407
Note:
See TracChangeset
for help on using the changeset viewer.