[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:13:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit dd53031205f431afcc6c7f8e40577bbd471fcc41
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 18 05:40:43 2003 +0000
Patch from Harri, reviewed by me.
- fixed 3487375 - backwards array slice causes infinite loop
* kjs/array_object.cpp:
(ArrayProtoFuncImp::call):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 96a1b10..c19093c 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,14 @@
2003-11-17 Maciej Stachowiak <mjs at apple.com>
+ Patch from Harri, reviewed by me.
+
+ - fixed 3487375 - backwards array slice causes infinite loop
+
+ * kjs/array_object.cpp:
+ (ArrayProtoFuncImp::call):
+
+2003-11-17 Maciej Stachowiak <mjs at apple.com>
+
Patch from Harri Porten reviewed by me.
- fixed 3487371 - operator precedence for bitwise or, xor and and is wrong
diff --git a/JavaScriptCore/kjs/array_object.cpp b/JavaScriptCore/kjs/array_object.cpp
index 61fe2ff..c4a0bae 100644
--- a/JavaScriptCore/kjs/array_object.cpp
+++ b/JavaScriptCore/kjs/array_object.cpp
@@ -578,7 +578,7 @@ Value ArrayProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args
// We return a new array
Object resObj = Object::dynamicCast(exec->interpreter()->builtinArray().construct(exec,List::empty()));
result = resObj;
- int begin = args[0].toUInt32(exec);
+ int begin = args[0].toInteger(exec);
if ( begin < 0 )
begin = maxInt( begin + length, 0 );
else
@@ -586,7 +586,7 @@ Value ArrayProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args
int end = length;
if (args[1].type() != UndefinedType)
{
- end = args[1].toUInt32(exec);
+ end = args[1].toInteger(exec);
if ( end < 0 )
end = maxInt( end + length, 0 );
else
@@ -594,13 +594,14 @@ Value ArrayProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args
}
//printf( "Slicing from %d to %d \n", begin, end );
- for(unsigned int k = 0; k < (unsigned int) end-begin; k++) {
- if (thisObj.hasProperty(exec,k+begin)) {
- Value obj = thisObj.get(exec, k+begin);
- resObj.put(exec, k, obj);
+ int n = 0;
+ for(int k = begin; k < end; k++, n++) {
+ if (thisObj.hasProperty(exec, k)) {
+ Value obj = thisObj.get(exec, k);
+ resObj.put(exec, n, obj);
}
}
- resObj.put(exec, lengthPropertyName, Number(end - begin), DontEnum | DontDelete);
+ resObj.put(exec, lengthPropertyName, Number(n), DontEnum | DontDelete);
break;
}
case Sort:{
diff --git a/JavaScriptCore/kjs/grammar.cpp b/JavaScriptCore/kjs/grammar.cpp
index 97353c5..3583b66 100644
--- a/JavaScriptCore/kjs/grammar.cpp
+++ b/JavaScriptCore/kjs/grammar.cpp
@@ -274,8 +274,8 @@ static const short yyrhs[] = { 3,
0, 104, 25, 103, 0, 104, 24, 103, 0, 104,
0, 105, 34, 104, 0, 105, 35, 104, 0, 105,
36, 104, 0, 105, 37, 104, 0, 105, 0, 106,
- 79, 105, 0, 106, 0, 107, 80, 105, 0, 107,
- 0, 108, 81, 105, 0, 108, 0, 109, 41, 108,
+ 79, 105, 0, 106, 0, 107, 80, 106, 0, 107,
+ 0, 108, 81, 107, 0, 108, 0, 109, 41, 108,
0, 109, 0, 110, 40, 109, 0, 110, 0, 110,
82, 112, 69, 112, 0, 111, 0, 98, 113, 112,
0, 83, 0, 47, 0, 48, 0, 49, 0, 50,
@@ -475,39 +475,39 @@ static const short yypact[] = { 779,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 779,-32768,-32768,
7,-32768, 964, 161,-32768, 45, 42,-32768, 136, 17,
--32768,-32768, 8,-32768, 192, 24,-32768,-32768, 18, 90,
+-32768,-32768, 8,-32768, 198, 24,-32768,-32768, 18, 90,
-32768,-32768, 1252, 236, 1252,-32768, 1252, 1252, -45, 483,
- 231,-32768,-32768, 853,-32768,-32768, 59, 191, 196, -21,
- 935, 123, 208, 557,-32768, 200, 1036, 203,-32768,-32768,
--32768,-32768, 1108, 1252, 222,-32768, 1252, 224,-32768,-32768,
+ 219,-32768,-32768, 853,-32768,-32768, 59, 202, 204, -21,
+ 935, 123, 205, 557,-32768, 186, 1036, 197,-32768,-32768,
+-32768,-32768, 1108, 1252, 217,-32768, 1252, 218,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768, 1252, 1252, 1252, 1252, 1252, 1252, 1252,
1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252,
1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252,-32768, 1252,
--32768,-32768,-32768,-32768, 226, 87, 217, 204,-32768,-32768,
+-32768,-32768,-32768,-32768, 222, 87, 209, 203,-32768,-32768,
-32768,-32768,-32768, 1252,-32768,-32768, -30,-32768,-32768,-32768,
- 105,-32768, 223, 103,-32768,-32768, 113, 227, 115, 116,
- 117,-32768,-32768, 228, -20, 253,-32768,-32768,-32768,-32768,
+ 105,-32768, 220, 103,-32768,-32768, 113, 223, 115, 116,
+ 117,-32768,-32768, 224, -20, 249,-32768,-32768,-32768,-32768,
35, 1252,-32768,-32768, -1,-32768,-32768,-32768,-32768, 119,
--32768, 202,-32768, 206,-32768,-32768,-32768,-32768,-32768, -14,
+-32768, 196,-32768, 200,-32768,-32768,-32768,-32768,-32768, -14,
-14, 12, 12, 12, 195, 195, 195, 195, 195, 195,
- 82, 82, 82, 82, 118, 118, 118, 93, 151, 225,
--32768, -3, -44, 1252, 1252,-32768,-32768, 223, 126, 631,
--32768, 223, 233, 853, 1252, 853, 229, 853, 234,-32768,
--32768, 232,-32768, 1180,-32768, 1252,-32768,-32768, 1252, 1252,
- 271, 1252, 127, 212,-32768, 223,-32768, 705,-32768,-32768,
- 274, 157,-32768, 289,-32768,-32768, 237, 1252,-32768,-32768,
--32768,-32768, 174, 1252, 218, 853, 1252,-32768,-32768, 853,
--32768, 1252, 23, 289,-32768, -20,-32768, 853, 175, 1252,
--32768, 243,-32768, 207, 238,-32768, 289,-32768,-32768,-32768,
- 853, 246, 853, 853, 853, 245,-32768, 853,-32768,-32768,
- 853, 853,-32768,-32768,-32768, 312, 314,-32768
+ 82, 82, 82, 82, 118, 72, 85, 93, 151, 221,
+-32768, -3, -44, 1252, 1252,-32768,-32768, 220, 126, 631,
+-32768, 220, 230, 853, 1252, 853, 225, 853, 233,-32768,
+-32768, 226,-32768, 1180,-32768, 1252,-32768,-32768, 1252, 1252,
+ 268, 1252, 127, 210,-32768, 220,-32768, 705,-32768,-32768,
+ 270, 157,-32768, 287,-32768,-32768, 234, 1252,-32768,-32768,
+-32768,-32768, 174, 1252, 214, 853, 1252,-32768,-32768, 853,
+-32768, 1252, 23, 287,-32768, -20,-32768, 853, 175, 1252,
+-32768, 237,-32768, 201, 232,-32768, 287,-32768,-32768,-32768,
+ 853, 239, 853, 853, 853, 241,-32768, 853,-32768,-32768,
+ 853, 853,-32768,-32768,-32768, 307, 309,-32768
};
static const short yypgoto[] = {-32768,
--32768,-32768,-32768, 91,-32768,-32768, 94, 309, 310,-32768,
- -34,-32768, 41,-32768, 1, 120, 88, -18, 75, 78,
--32768,-32768, 143, 145,-32768,-32768, -122,-32768, -9, -17,
+-32768,-32768,-32768, 89,-32768,-32768, 91, 302, 308,-32768,
+ -34,-32768, 41,-32768, 1, 120, 88, -18, 75, 142,
+ 143, 144, 146, 141,-32768,-32768, -122,-32768, -9, -17,
-22, -25,-32768, 138, 128, 67,-32768,-32768,-32768,-32768,
-249,-32768,-32768,-32768,-32768,-32768,-32768, -7,-32768, 13,
-32768,-32768,-32768,-32768,-32768, 129,-32768,-32768, 131, -223,
@@ -544,14 +544,14 @@ static const short yytable[] = { 104,
140, 141, 96, 182, 180, 142, 143, 144, 145, 146,
147, 148, 149, 150, 151, 152, 328, 341, 160, 161,
162, 180, 180, 251, 252, 253, 254, 242, 243, 244,
- 255, 256, 257, 201, 293, 187, 301, 208, 303, -27,
- 306, 153, 214, 215, -28, 302, 224, 225, 287, 180,
- 228, 298, 288, 180, 180, 344, 222, 240, 241, 233,
- 313, 235, 187, 262, 180, 215, 270, 265, 275, 279,
- 300, 307, 304, 289, 314, 317, 320, 322, 331, 326,
- 308, 330, 333, 339, 329, 343, 345, 187, 348, 353,
- 340, 357, 334, 358, 282, 284, 87, 88, 258, 352,
- 187, 259, 263, 347, 267, 349, 350, 350, 291, 346,
+ 214, 215, 224, 225, 293, 187, 301, 208, 303, 201,
+ 306, 153, 287, 180, 228, 302, 288, 180, 180, 344,
+ -27, 298, -28, 222, 233, 235, 180, 240, 241, 262,
+ 313, 215, 187, 270, 275, 279, 265, 300, 304, 289,
+ 307, 314, 320, 317, 308, 322, 326, 330, 331, 343,
+ 345, 348, 333, 339, 329, 353, 357, 187, 358, 87,
+ 340, 282, 334, 284, 255, 88, 256, 259, 257, 352,
+ 187, 258, 263, 347, 267, 349, 350, 350, 291, 346,
354, 269, 0, 355, 355, 97, 338, 1, 2, 3,
4, 5, 0, 0, 281, 0, 8, 0, 0, 84,
0, 13, 14, 0, 16, 0, 0, 0, 0, 0,
@@ -680,14 +680,14 @@ static const short yycheck[] = { 17,
42, 43, 62, 298, 68, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 63, 63, 44, 45,
46, 68, 68, 169, 170, 171, 172, 160, 161, 162,
- 173, 174, 175, 62, 264, 265, 274, 22, 276, 69,
- 278, 83, 32, 33, 69, 275, 67, 68, 67, 68,
- 68, 270, 67, 68, 68, 69, 69, 158, 159, 58,
- 290, 58, 292, 58, 68, 33, 64, 84, 62, 62,
- 58, 58, 64, 69, 24, 84, 23, 9, 316, 63,
- 69, 84, 320, 326, 314, 63, 69, 317, 63, 65,
- 328, 0, 322, 0, 221, 225, 8, 8, 176, 345,
- 330, 177, 185, 341, 197, 343, 344, 345, 262, 337,
+ 32, 33, 67, 68, 264, 265, 274, 22, 276, 62,
+ 278, 83, 67, 68, 68, 275, 67, 68, 68, 69,
+ 69, 270, 69, 69, 58, 58, 68, 158, 159, 58,
+ 290, 33, 292, 64, 62, 62, 84, 58, 64, 69,
+ 58, 24, 23, 84, 69, 9, 63, 84, 316, 63,
+ 69, 63, 320, 326, 314, 65, 0, 317, 0, 8,
+ 328, 221, 322, 225, 173, 8, 174, 177, 175, 345,
+ 330, 176, 185, 341, 197, 343, 344, 345, 262, 337,
348, 201, -1, 351, 352, 1, 324, 3, 4, 5,
6, 7, -1, -1, 216, -1, 12, -1, -1, 15,
-1, 17, 18, -1, 20, -1, -1, -1, -1, -1,
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list