Changeset 41028 in webkit
- Timestamp:
- Feb 16, 2009 4:40:39 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r41023 r41028 1 2009-02-16 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Fix for <rdar://problem/6468156> 6 REGRESSION (r36779): Adding link, images, flash in TinyMCE blocks entire page (21382) 7 8 No performance regression. 9 10 * runtime/Arguments.cpp: 11 (JSC::Arguments::fillArgList): Add codepath for when the "length" property has been 12 overridden. 13 1 14 2009-02-16 Mark Rowe <mrowe@apple.com> 2 15 -
trunk/JavaScriptCore/runtime/Arguments.cpp
r39670 r41028 72 72 void Arguments::fillArgList(ExecState* exec, ArgList& args) 73 73 { 74 if (UNLIKELY(d->overrodeLength)) { 75 unsigned length = get(exec, exec->propertyNames().length).toUInt32(exec); 76 for (unsigned i = 0; i < length; i++) 77 args.append(get(exec, i)); 78 return; 79 } 80 74 81 if (LIKELY(!d->deletedArguments)) { 75 82 if (LIKELY(!d->numParameters)) { -
trunk/LayoutTests/ChangeLog
r41027 r41028 1 2009-02-16 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Add tests for <rdar://problem/6468156> 6 REGRESSION (r36779): Adding link, images, flash in TinyMCE blocks entire page (21382) 7 8 * fast/js/function-apply-expected.txt: 9 * fast/js/resources/function-apply.js: Add cases covering setting arugments.length and 10 Array.length explicitly or implicitly using Array.prototype.unshift. 11 1 12 2009-02-16 Dan Bernstein <mitz@apple.com> 2 13 -
trunk/LayoutTests/fast/js/function-apply-expected.txt
r36779 r41028 20 20 PASS arrayApplyDelete3([1, 2, 3]) is 3 21 21 PASS arrayApplyDeleteLength([1, 2, 3]) is 3 22 PASS argumentsApplyChangeLength1(1) is 2 23 PASS argumentsApplyChangeLength2(1) is 2 24 PASS argumentsApplyChangeLength3(1) is 2 25 PASS argumentsApplyChangeLength4(1) is 0 26 PASS argumentsApplyChangeLength5(1) is 0 27 PASS arrayApplyChangeLength1() is 2 28 PASS arrayApplyChangeLength2() is 2 29 PASS arrayApplyChangeLength3() is 2 30 PASS arrayApplyChangeLength4() is 0 22 31 PASS successfullyParsed is true 23 32 -
trunk/LayoutTests/fast/js/resources/function-apply.js
r36779 r41028 175 175 shouldBe("arrayApplyDeleteLength([1, 2, 3])", "3"); 176 176 177 178 function argumentsApplyChangeLength1() 179 { 180 function f() { 181 return arguments.length; 182 }; 183 arguments.length = 2; 184 return f.apply(null, arguments); 185 } 186 187 188 function argumentsApplyChangeLength2() 189 { 190 function f(a) { 191 return arguments.length; 192 }; 193 arguments.length = 2; 194 return f.apply(null, arguments); 195 } 196 197 198 function argumentsApplyChangeLength3() 199 { 200 function f(a, b, c) { 201 return arguments.length; 202 }; 203 arguments.length = 2; 204 return f.apply(null, arguments); 205 }; 206 207 function argumentsApplyChangeLength4() 208 { 209 function f() { 210 return arguments.length; 211 }; 212 arguments.length = 0; 213 return f.apply(null, arguments); 214 }; 215 216 function argumentsApplyChangeLength5() 217 { 218 function f() { 219 return arguments.length; 220 }; 221 arguments.length = "Not A Number"; 222 return f.apply(null, arguments); 223 } 224 225 shouldBe("argumentsApplyChangeLength1(1)", "2"); 226 shouldBe("argumentsApplyChangeLength2(1)", "2"); 227 shouldBe("argumentsApplyChangeLength3(1)", "2"); 228 shouldBe("argumentsApplyChangeLength4(1)", "0"); 229 shouldBe("argumentsApplyChangeLength5(1)", "0"); 230 231 function arrayApplyChangeLength1() 232 { 233 function f() { 234 return arguments.length; 235 }; 236 var array = []; 237 array.length = 2; 238 return f.apply(null, array); 239 } 240 241 function arrayApplyChangeLength2() 242 { 243 function f(a) { 244 return arguments.length; 245 }; 246 var array = []; 247 array.length = 2; 248 return f.apply(null, array); 249 } 250 251 function arrayApplyChangeLength3() 252 { 253 function f(a, b, c) { 254 return arguments.length; 255 }; 256 var array = []; 257 array.length = 2; 258 return f.apply(null, array); 259 } 260 261 function arrayApplyChangeLength4() 262 { 263 function f() { 264 return arguments.length; 265 }; 266 var array = [1]; 267 array.length = 0; 268 return f.apply(null, array); 269 }; 270 271 shouldBe("arrayApplyChangeLength1()", "2"); 272 shouldBe("arrayApplyChangeLength2()", "2"); 273 shouldBe("arrayApplyChangeLength3()", "2"); 274 shouldBe("arrayApplyChangeLength4()", "0"); 275 177 276 var successfullyParsed = true;
Note: See TracChangeset
for help on using the changeset viewer.