Changeset 249164 in webkit
- Timestamp:
- Aug 27, 2019 1:10:40 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r249117 r249164 1 2019-08-27 Mark Lam <mark.lam@apple.com> 2 3 constructFunctionSkippingEvalEnabledCheck() should use tryMakeString() and check for OOM. 4 https://bugs.webkit.org/show_bug.cgi?id=201196 5 <rdar://problem/54703775> 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/constructFunctionSkippingEvalEnabledCheck-should-throw-out-of-memory-error.js: Added. 10 1 11 2019-08-26 Ross Kirsling <ross.kirsling@sony.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r249159 r249164 1 2019-08-27 Mark Lam <mark.lam@apple.com> 2 3 constructFunctionSkippingEvalEnabledCheck() should use tryMakeString() and check for OOM. 4 https://bugs.webkit.org/show_bug.cgi?id=201196 5 <rdar://problem/54703775> 6 7 Reviewed by Yusuke Suzuki. 8 9 * runtime/FunctionConstructor.cpp: 10 (JSC::constructFunctionSkippingEvalEnabledCheck): 11 1 12 2019-08-27 Keith Miller <keith_miller@apple.com> 2 13 -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r249013 r249164 110 110 auto body = args.at(0).toWTFString(exec); 111 111 RETURN_IF_EXCEPTION(scope, nullptr); 112 program = makeString(prefix, functionName.string(), "() {\n", body, "\n}"); 112 program = tryMakeString(prefix, functionName.string(), "() {\n", body, "\n}"); 113 if (UNLIKELY(!program)) { 114 throwOutOfMemoryError(exec, scope); 115 return nullptr; 116 } 113 117 } else { 114 118 StringBuilder builder(StringBuilder::OverflowHandler::RecordOverflow); … … 123 127 builder.append(", ", viewWithString.view); 124 128 } 125 if ( builder.hasOverflowed()) {129 if (UNLIKELY(builder.hasOverflowed())) { 126 130 throwOutOfMemoryError(exec, scope); 127 131 return nullptr; … … 133 137 RETURN_IF_EXCEPTION(scope, nullptr); 134 138 builder.append(") {\n", body.view, "\n}"); 135 if ( builder.hasOverflowed()) {139 if (UNLIKELY(builder.hasOverflowed())) { 136 140 throwOutOfMemoryError(exec, scope); 137 141 return nullptr;
Note: See TracChangeset
for help on using the changeset viewer.