Ignore:
Timestamp:
Mar 19, 2009, 5:52:04 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-03-19 Cameron Zwarich <[email protected]>

Reviewed by Geoff Garen.

Bug 23771: REGRESSION (r36016): JSObjectHasProperty freezes on global class without kJSClassAttributeNoAutomaticPrototype
<https://bugs.webkit.org/show_bug.cgi?id=23771>
<rdar://problem/6561016>

  • API/tests/testapi.c: (main): Add a test for this bug.
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::resetPrototype): Don't set the prototype of the last object in the prototype chain to the object prototype when the object prototype is already the last object in the prototype chain.

LayoutTests:

2009-03-19 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.


Fixed <rdar://problem/6279213> Regular expression run-time complexity
limit too low for long inputs (21485)


Added a test for a complex regexp match that should succeed, and one
that should fail.

  • fast/js/regexp-overflow-expected.txt:
  • fast/js/resources/regexp-overflow.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/fast/js/resources/regexp-overflow.js

    r41842 r41849  
    2121shouldBe('/|[x\\B-\\u00b5]/i.exec("").toString()', '""');
    2222
     23var complexPattern = "";
     24for (var i = 0; i < 18; ++i)
     25    complexPattern += "a?";
     26for (var i = 0; i < 18; ++i)
     27    complexPattern += "a";
     28complexPattern = "(" + complexPattern + ")";
     29
     30var complexInput = "";
     31for (var i = 0; i < 18; ++i)
     32    complexInput += "a";
     33
     34shouldBe('new RegExp(complexPattern).exec(complexInput)[0]', 'complexInput'); // Big but OK
     35shouldBe('new RegExp(complexPattern + complexPattern).exec(complexInput + complexInput)', 'null'); // Too big
     36
    2337var s = "a";
    2438for (var i = 0; i < 21; i++)
Note: See TracChangeset for help on using the changeset viewer.