⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243265 in webkit


Ignore:
Timestamp:
Mar 20, 2019, 5:27:58 PM (7 years ago)
Author:
ysuzuki@apple.com
Message:

Update the test to ensure OutOfMemoryError is thrown as intended
https://bugs.webkit.org/show_bug.cgi?id=196032
<rdar://problem/46842740>

Rubber stamped by Saam Barati.

  • stress/create-error-out-of-memory-rope-string.js:

(assert):
(catch):

Location:
trunk/JSTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r243246 r243265  
     12019-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
    1132019-03-20  Tadeu Zagallo  <tzagallo@apple.com>
    214
  • 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()');
     1function assert(a, message) {
     2    if (!a)
     3        throw new Error(message);
     4}
     5
     6try {
     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.