Changeset 243265 in webkit
- Timestamp:
- Mar 20, 2019, 5:27:58 PM (7 years ago)
- Location:
- trunk/JSTests
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
stress/create-error-out-of-memory-rope-string.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r243246 r243265 1 2019-03-20 Yusuke Suzuki <ysuzuki@apple.com> 2 3 Update the test to ensure OutOfMemoryError is thrown as intended 4 https://bugs.webkit.org/show_bug.cgi?id=196032 5 <rdar://problem/46842740> 6 7 Rubber stamped by Saam Barati. 8 9 * stress/create-error-out-of-memory-rope-string.js: 10 (assert): 11 (catch): 12 1 13 2019-03-20 Tadeu Zagallo <tzagallo@apple.com> 2 14 -
trunk/JSTests/stress/create-error-out-of-memory-rope-string.js
r243246 r243265 1 var foo = 'yy?x\uFFFD$w 5?\uFFFDo\uFFFD?\uFFFD\'i?\uFFFDE-N\uFFFD\uFFFD6_\uFFFD\\ d'; 2 foo = foo.padEnd(2147483644, 1); 3 eval('foo()'); 1 function assert(a, message) { 2 if (!a) 3 throw new Error(message); 4 } 5 6 try { 7 var foo = 'yy?x\uFFFD$w 5?\uFFFDo\uFFFD?\uFFFD\'i?\uFFFDE-N\uFFFD\uFFFD6_\uFFFD\\ d'; 8 foo = foo.padEnd(2147483644, 1); 9 eval('foo()'); 10 assert(false, `Should throw OOM error`); 11 } catch (error) { 12 assert(error.message == "Out of memory", "Expected OutOfMemoryError, but got: " + error); 13 }
Note:
See TracChangeset
for help on using the changeset viewer.