Changeset 148130 in webkit
- Timestamp:
- Apr 10, 2013 1:01:14 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148121 r148130 1 2013-04-10 Michael Saboff <msaboff@apple.com> 2 3 DFG: Negative size for new Array() interpreted as large unsigned int 4 https://bugs.webkit.org/show_bug.cgi?id=114366 5 6 Reviewed by Oliver Hunt. 7 8 New test to make sure DFG generated code for new Array() with a 9 computed negative size throws an exception. 10 11 * fast/js/dfg-negative-array-size-expected.txt: Added. 12 * fast/js/dfg-negative-array-size.html: Added. 13 * fast/js/script-tests/dfg-negative-array-size.js: Added. 14 1 15 2013-04-10 Robert Hogan <robert@webkit.org> 2 16 -
trunk/Source/JavaScriptCore/ChangeLog
r148127 r148130 1 2013-04-10 Michael Saboff <msaboff@apple.com> 2 3 DFG: Negative size for new Array() interpreted as large unsigned int 4 https://bugs.webkit.org/show_bug.cgi?id=114366 5 6 Reviewed by Oliver Hunt. 7 8 Added new check in operationNewArrayWithSize() for a negative 9 size. If size is negative throw a "RangeError: Array size is not a 10 small enough positive integer" exception. 11 12 * dfg/DFGOperations.cpp: 13 1 14 2013-04-10 peavo@outlook.com <peavo@outlook.com> 2 15 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r147985 r148130 1292 1292 JSGlobalData* globalData = &exec->globalData(); 1293 1293 NativeCallFrameTracer tracer(globalData, exec); 1294 1294 1295 if (size < 0) 1296 return bitwise_cast<char*>(throwError(exec, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer.")))); 1297 1295 1298 return bitwise_cast<char*>(JSArray::create(*globalData, arrayStructure, size)); 1296 1299 }
Note: See TracChangeset
for help on using the changeset viewer.