Changeset 56142 in webkit
- Timestamp:
- Mar 17, 2010 7:25:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r56135 r56142 1 2010-03-17 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 undefined, NaN, and Infinity should be ReadOnly 6 https://bugs.webkit.org/show_bug.cgi?id=36263 7 8 Simply add the ReadOnly flag to these properties. 9 10 * runtime/JSGlobalObject.cpp: 11 (JSC::JSGlobalObject::reset): 12 1 13 2010-03-17 Darin Adler <darin@apple.com> 2 14 -
trunk/JavaScriptCore/runtime/JSGlobalObject.cpp
r56085 r56142 320 320 GlobalPropertyInfo staticGlobals[] = { 321 321 GlobalPropertyInfo(Identifier(exec, "Math"), new (exec) MathObject(exec, MathObject::createStructure(d()->objectPrototype)), DontEnum | DontDelete), 322 GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(exec), DontEnum | DontDelete ),323 GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(exec, Inf), DontEnum | DontDelete ),324 GlobalPropertyInfo(Identifier(exec, "undefined"), jsUndefined(), DontEnum | DontDelete ),322 GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(exec), DontEnum | DontDelete | ReadOnly), 323 GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(exec, Inf), DontEnum | DontDelete | ReadOnly), 324 GlobalPropertyInfo(Identifier(exec, "undefined"), jsUndefined(), DontEnum | DontDelete | ReadOnly), 325 325 GlobalPropertyInfo(Identifier(exec, "JSON"), new (exec) JSONObject(JSONObject::createStructure(d()->objectPrototype)), DontEnum | DontDelete) 326 326 }; -
trunk/LayoutTests/ChangeLog
r56140 r56142 1 2010-03-17 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 undefined, NaN, and Infinity should be ReadOnly 6 https://bugs.webkit.org/show_bug.cgi?id=36263 7 8 Add tests for the attributes of undefined, NaN and Infinity on the 9 global object 10 11 * fast/js/getOwnPropertyDescriptor-expected.txt: 12 * fast/js/resources/getOwnPropertyDescriptor.js: 13 1 14 2010-03-17 Chang Shu <chang.shu@nokia.com> 2 15 -
trunk/LayoutTests/fast/js/getOwnPropertyDescriptor-expected.txt
r47780 r56142 105 105 PASS Object.getOwnPropertyDescriptor(global, 'global').enumerable is true 106 106 PASS Object.getOwnPropertyDescriptor(global, 'global').configurable is false 107 PASS Object.getOwnPropertyDescriptor(global, 'undefined').value is undefined 108 PASS Object.getOwnPropertyDescriptor(global, 'undefined').hasOwnProperty('get') is false 109 PASS Object.getOwnPropertyDescriptor(global, 'undefined').hasOwnProperty('set') is false 110 PASS Object.getOwnPropertyDescriptor(global, 'undefined').enumerable is false 111 PASS Object.getOwnPropertyDescriptor(global, 'undefined').configurable is false 112 PASS Object.getOwnPropertyDescriptor(global, 'NaN').value is NaN 113 PASS Object.getOwnPropertyDescriptor(global, 'NaN').hasOwnProperty('get') is false 114 PASS Object.getOwnPropertyDescriptor(global, 'NaN').hasOwnProperty('set') is false 115 PASS Object.getOwnPropertyDescriptor(global, 'NaN').enumerable is false 116 PASS Object.getOwnPropertyDescriptor(global, 'NaN').configurable is false 117 PASS Object.getOwnPropertyDescriptor(global, 'Infinity').value is Infinity 118 PASS Object.getOwnPropertyDescriptor(global, 'Infinity').hasOwnProperty('get') is false 119 PASS Object.getOwnPropertyDescriptor(global, 'Infinity').hasOwnProperty('set') is false 120 PASS Object.getOwnPropertyDescriptor(global, 'Infinity').enumerable is false 121 PASS Object.getOwnPropertyDescriptor(global, 'Infinity').configurable is false 107 122 PASS Object.getOwnPropertyDescriptor(global, 'window').value is global 108 123 PASS Object.getOwnPropertyDescriptor(global, 'window').hasOwnProperty('get') is false -
trunk/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js
r47780 r56142 40 40 var global = this; 41 41 descriptorShouldBe("global", "'global'", {writable: true, enumerable: true, configurable: false, value:"global"}); 42 descriptorShouldBe("global", "'undefined'", {writable: false, enumerable: false, configurable: false, value:"undefined"}); 43 descriptorShouldBe("global", "'NaN'", {writable: false, enumerable: false, configurable: false, value:"NaN"}); 44 descriptorShouldBe("global", "'Infinity'", {writable: false, enumerable: false, configurable: false, value:"Infinity"}); 42 45 descriptorShouldBe("global", "'window'", {writable: false, enumerable: true, configurable: false, value:"global"}); 43 46 descriptorShouldBe("global", "'XMLHttpRequest'", {writable: true, enumerable: true, configurable: false, value:"XMLHttpRequest"});
Note: See TracChangeset
for help on using the changeset viewer.