Changeset 242500 in webkit
- Timestamp:
- Mar 5, 2019 1:20:33 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r242399 r242500 1 2019-03-05 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Should check exception for JSString::toExistingAtomicString 4 https://bugs.webkit.org/show_bug.cgi?id=195337 5 6 Reviewed by Keith Miller, Saam Barati, and Mark Lam. 7 8 We missed the exception check for JSString::toExistingAtomicString while it can resolve 9 a rope and throw an OOM exception. This patch adds necessary exception checks. This patch 10 fixes test failures in debug build, reported in https://bugs.webkit.org/show_bug.cgi?id=194375#c93. 11 12 * dfg/DFGOperations.cpp: 13 * jit/JITOperations.cpp: 14 (JSC::getByVal): 15 * llint/LLIntSlowPaths.cpp: 16 (JSC::LLInt::getByVal): 17 * runtime/CommonSlowPaths.cpp: 18 (JSC::SLOW_PATH_DECL): 19 1 20 2019-03-04 Yusuke Suzuki <ysuzuki@apple.com> 2 21 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r242252 r242500 690 690 Structure& structure = *base->structure(vm); 691 691 if (JSCell::canUseFastGetOwnProperty(structure)) { 692 if (RefPtr<AtomicStringImpl> existingAtomicString = asString(property)->toExistingAtomicString(exec)) { 692 RefPtr<AtomicStringImpl> existingAtomicString = asString(property)->toExistingAtomicString(exec); 693 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 694 if (existingAtomicString) { 693 695 if (JSValue result = base->fastGetOwnProperty(vm, structure, existingAtomicString.get())) 694 696 return JSValue::encode(result); … … 725 727 Structure& structure = *base->structure(vm); 726 728 if (JSCell::canUseFastGetOwnProperty(structure)) { 727 if (RefPtr<AtomicStringImpl> existingAtomicString = asString(property)->toExistingAtomicString(exec)) { 729 RefPtr<AtomicStringImpl> existingAtomicString = asString(property)->toExistingAtomicString(exec); 730 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 731 if (existingAtomicString) { 728 732 if (JSValue result = base->fastGetOwnProperty(vm, structure, existingAtomicString.get())) 729 733 return JSValue::encode(result); … … 1446 1450 Structure& structure = *baseValue.asCell()->structure(vm); 1447 1451 if (JSCell::canUseFastGetOwnProperty(structure)) { 1448 if (RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec)) { 1452 RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec); 1453 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 1454 if (existingAtomicString) { 1449 1455 if (JSValue result = baseValue.asCell()->fastGetOwnProperty(vm, structure, existingAtomicString.get())) 1450 1456 return JSValue::encode(result); -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r242192 r242500 1807 1807 Structure& structure = *baseValue.asCell()->structure(vm); 1808 1808 if (JSCell::canUseFastGetOwnProperty(structure)) { 1809 if (RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec)) { 1809 RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec); 1810 RETURN_IF_EXCEPTION(scope, JSValue()); 1811 if (existingAtomicString) { 1810 1812 if (JSValue result = baseValue.asCell()->fastGetOwnProperty(vm, structure, existingAtomicString.get())) { 1811 1813 ASSERT(exec->bytecodeOffset()); -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r241582 r242500 943 943 Structure& structure = *baseValue.asCell()->structure(vm); 944 944 if (JSCell::canUseFastGetOwnProperty(structure)) { 945 if (RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec)) { 945 RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec); 946 RETURN_IF_EXCEPTION(scope, JSValue()); 947 if (existingAtomicString) { 946 948 if (JSValue result = baseValue.asCell()->fastGetOwnProperty(vm, structure, existingAtomicString.get())) 947 949 return result; -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r241493 r242500 1126 1126 Structure& structure = *baseValue.asCell()->structure(vm); 1127 1127 if (JSCell::canUseFastGetOwnProperty(structure)) { 1128 if (RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec)) { 1128 RefPtr<AtomicStringImpl> existingAtomicString = asString(subscript)->toExistingAtomicString(exec); 1129 CHECK_EXCEPTION(); 1130 if (existingAtomicString) { 1129 1131 if (JSValue result = baseValue.asCell()->fastGetOwnProperty(vm, structure, existingAtomicString.get())) 1130 1132 RETURN_PROFILED(result);
Note: See TracChangeset
for help on using the changeset viewer.