Changeset 91344 in webkit
- Timestamp:
- Jul 20, 2011 12:50:57 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91343 r91344 1 2011-07-19 Gavin Barraclough <barraclough@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=64678 4 Fix bugs in Object.prototype this handling. 5 6 Reviewed by Darin Adler. 7 8 * fast/js/object-prototype-properties-expected.txt: 9 * fast/js/script-tests/object-prototype-properties.js: 10 - Fix these tests to check Object.prototype explicitly, not the Global Object, and expect ES5.1 correct results. 11 * sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.1_The_this_Keyword/S11.1.1_A2-expected.txt: 12 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt: 13 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt: 14 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt: 15 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A1_T3-expected.txt: 16 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt: 17 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A1_T3-expected.txt: 18 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.4_String.prototype.charAt/S15.5.4.4_A1_T3-expected.txt: 19 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.5_String.prototype.charCodeAt/S15.5.4.5_A1_T3-expected.txt: 20 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.6_String.prototype.concat/S15.5.4.6_A1_T3-expected.txt: 21 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A1_T3-expected.txt: 22 * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T3-expected.txt: 23 - Slight change in expected results, these tests are all incorrect, were all FAILing, and are still all FAILing. 24 1 25 2011-07-20 Hayato Ito <hayato@chromium.org> 2 26 -
trunk/LayoutTests/fast/js/object-prototype-properties-expected.txt
r91224 r91344 4 4 5 5 6 PASS toString() threw exception TypeError: 'undefined' is not an object (evaluating 'toString()'). 7 PASS toLocaleString() threw exception TypeError: 'undefined' is not an object (evaluating 'toLocaleString()'). 8 PASS valueOf() threw exception TypeError: 'undefined' is not an object (evaluating 'valueOf()'). 9 PASS hasProperty('hasProperty') threw exception ReferenceError: Can't find variable: hasProperty. 10 PASS propertyIsEnumerable('hasProperty') threw exception TypeError: 'undefined' is not an object (evaluating 'propertyIsEnumerable('hasProperty')'). 11 PASS isPrototypeOf(this) threw exception TypeError: 'undefined' is not an object (evaluating 'isPrototypeOf(this)'). 6 PASS Object.prototype.toString.call(undefined) is "[object Undefined]" 7 PASS Object.prototype.toString.call(null) is "[object Null]" 8 PASS Object.prototype.toLocaleString.call(undefined) threw exception TypeError: 'undefined' is not an object (evaluating 'Object.prototype.toLocaleString.call(undefined)'). 9 PASS Object.prototype.valueOf.call(undefined) threw exception TypeError: 'undefined' is not an object (evaluating 'Object.prototype.valueOf.call(undefined)'). 10 PASS Object.prototype.hasOwnProperty.call(undefined, 'hasOwnProperty') threw exception TypeError: 'undefined' is not an object (evaluating 'Object.prototype.hasOwnProperty.call(undefined, 'hasOwnProperty')'). 11 PASS Object.prototype.propertyIsEnumerable.call(undefined, 'propertyIsEnumerable') threw exception TypeError: 'undefined' is not an object (evaluating 'Object.prototype.propertyIsEnumerable.call(undefined, 'propertyIsEnumerable')'). 12 PASS Object.prototype.isPrototypeOf.call(undefined, this) threw exception TypeError: 'undefined' is not an object (evaluating 'Object.prototype.isPrototypeOf.call(undefined, this)'). 12 13 PASS successfullyParsed is true 13 14 -
trunk/LayoutTests/fast/js/script-tests/object-prototype-properties.js
r91224 r91344 3 3 ); 4 4 5 // These call pass undefined as this value, and as such should show in toObject. 6 shouldThrow("toString()"); 7 shouldThrow("toLocaleString()"); 8 shouldThrow("valueOf()"); 9 shouldThrow("hasProperty('hasProperty')"); 10 shouldThrow("propertyIsEnumerable('hasProperty')"); 11 shouldThrow("isPrototypeOf(this)"); 5 //ES 5.1 allows for Object.prototype.toString being called with undefined/null. 6 shouldBe("Object.prototype.toString.call(undefined)", '"[object Undefined]"'); 7 shouldBe("Object.prototype.toString.call(null)", '"[object Null]"'); 8 9 // These calls pass undefined as this value, and as such should throw in toObject. 10 shouldThrow("Object.prototype.toLocaleString.call(undefined)"); 11 shouldThrow("Object.prototype.valueOf.call(undefined)"); 12 shouldThrow("Object.prototype.hasOwnProperty.call(undefined, 'hasOwnProperty')"); 13 shouldThrow("Object.prototype.propertyIsEnumerable.call(undefined, 'propertyIsEnumerable')"); 14 shouldThrow("Object.prototype.isPrototypeOf.call(undefined, this)"); 12 15 13 16 var successfullyParsed = true; -
trunk/LayoutTests/sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.1_The_this_Keyword/S11.1.1_A2-expected.txt
r91234 r91344 1 1 S11.1.1_A2 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL SputnikError: #1: this.toString() === toString(). Actual: [object DOMWindow] 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.10_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.11_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.12_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.13_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.14_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.15_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.4_String.prototype.charAt/S15.5.4.4_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.4_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.5_String.prototype.charCodeAt/S15.5.4.5_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.5_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.6_String.prototype.concat/S15.5.4.6_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.6_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.7_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T3-expected.txt
r91234 r91344 1 1 S15.5.4.8_A1_T3 2 2 3 FAIL TypeError: 'undefined' is not an object (evaluating 'toString()')3 FAIL TypeError: Type error 4 4 5 5 TEST COMPLETE -
trunk/Source/JavaScriptCore/ChangeLog
r91290 r91344 1 2011-07-19 Gavin Barraclough <barraclough@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=64678 4 Fix bugs in Object.prototype this handling. 5 6 Reviewed by Darin Adler. 7 8 Fix ES5.1 correctness issues identified by Mads Ager. 9 10 * runtime/ObjectPrototype.cpp: 11 (JSC::objectProtoFuncToString): 12 - ES5.1 expects toString of undefined/null to produce "[object Undefined]"/"[object Null]". 13 1 14 2011-07-19 Mark Hahnenberg <mhahnenberg@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r91224 r91344 195 195 { 196 196 JSValue thisValue = exec->hostThisValue(); 197 if (thisValue.isUndefinedOrNull()) 198 return jsNontrivialString(exec, thisValue.isUndefined() ? "[object Undefined]" : "[object Null]"); 197 199 return JSValue::encode(jsMakeNontrivialString(exec, "[object ", thisValue.toObject(exec)->className(), "]")); 198 200 }
Note: See TracChangeset
for help on using the changeset viewer.