Commit 4759dfe7 authored by msaboff@apple.com's avatar msaboff@apple.com

https://bugs.webkit.org/show_bug.cgi?id=120075

REGRESSION (r128400): BBC4 website not displaying pictures

Reviewed by Oliver Hunt.

Source/JavaScriptCore: 

* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::createStructure): Changed the array IndexingType to be ArrayWithSlowPutArrayStorage
so that the match results will be reified before any other modification to the results array.

LayoutTests: 

Added regression tests for fix.

* fast/js/regress/regexp-match-reify-before-putbyval-expected.txt: Added.
* fast/js/regress/regexp-match-reify-before-putbyval.html: Added.
* fast/js/regress/script-tests/regexp-match-reify-before-putbyval.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4f5721d8
2013-08-20 Michael Saboff <msaboff@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120075
REGRESSION (r128400): BBC4 website not displaying pictures
Reviewed by Oliver Hunt.
Added regression tests for fix.
* fast/js/regress/regexp-match-reify-before-putbyval-expected.txt: Added.
* fast/js/regress/regexp-match-reify-before-putbyval.html: Added.
* fast/js/regress/script-tests/regexp-match-reify-before-putbyval.js: Added.
2013-08-19 Filip Pizlo <fpizlo@apple.com>
Incorrect behavior on emscripten-compiled cube2hash
JSRegress/regexp-match-reify-before-putbyval
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS matches is ['http://www.dummy.com/images/123x456/image.jpg','http://www.dummy.com/images/',111,'x',222,'/image.jpg']
PASS no exception thrown
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script src="resources/regress-pre.js"></script>
<script src="script-tests/regexp-match-reify-before-putbyval.js"></script>
<script src="resources/regress-post.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
var src = 'http://www.dummy.com/images/123x456/image.jpg';
var matches = src.match("^(.*/)([0-9]+)(x)([0-9]+)(/.*)$");
matches[2] = 111;
matches[4] = 222;
shouldBe("matches", "['http://www.dummy.com/images/123x456/image.jpg','http://www.dummy.com/images/',111,'x',222,'/image.jpg']");
2013-08-20 Michael Saboff <msaboff@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=120075
REGRESSION (r128400): BBC4 website not displaying pictures
Reviewed by Oliver Hunt.
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::createStructure): Changed the array IndexingType to be ArrayWithSlowPutArrayStorage
so that the match results will be reified before any other modification to the results array.
2013-08-19 Filip Pizlo <fpizlo@apple.com>
Incorrect behavior on emscripten-compiled cube2hash
......
......@@ -44,7 +44,7 @@ namespace JSC {
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info(), ArrayWithArrayStorage);
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info(), ArrayWithSlowPutArrayStorage);
}
static void visitChildren(JSCell*, SlotVisitor&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment