Changeset 202752 in webkit
- Timestamp:
- Jul 1, 2016 1:49:31 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202750 r202752 1 2016-07-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] Date.toGMTString should be the Date.toUTCString function 4 https://bugs.webkit.org/show_bug.cgi?id=159318 5 6 Reviewed by Mark Lam. 7 8 * js/date-prototype-expected.txt: Added. 9 * js/date-prototype.html: Added. 10 * js/script-tests/date-prototype.js: Added. 11 1 12 2016-07-01 Frederic Wang <fwang@igalia.com> 2 13 -
trunk/LayoutTests/js/kde/inbuilt_function_tostring-expected.txt
r12913 r202752 98 98 PASS StripSpaces(Date.prototype.getFullYear.toString()) is "functiongetFullYear(){[nativecode]}" 99 99 PASS StripSpaces(Date.prototype.getUTCFullYear.toString()) is "functiongetUTCFullYear(){[nativecode]}" 100 PASS StripSpaces(Date.prototype.toGMTString.toString()) is "functionto GMTString(){[nativecode]}"100 PASS StripSpaces(Date.prototype.toGMTString.toString()) is "functiontoUTCString(){[nativecode]}" 101 101 PASS StripSpaces(Date.prototype.getMonth.toString()) is "functiongetMonth(){[nativecode]}" 102 102 PASS StripSpaces(Date.prototype.getUTCMonth.toString()) is "functiongetUTCMonth(){[nativecode]}" … … 131 131 PASS StripSpaces(Date.prototype.setYear.toString()) is "functionsetYear(){[nativecode]}" 132 132 PASS StripSpaces(Date.prototype.getYear.toString()) is "functiongetYear(){[nativecode]}" 133 PASS StripSpaces(Date.prototype.toGMTString.toString()) is "functionto GMTString(){[nativecode]}"133 PASS StripSpaces(Date.prototype.toGMTString.toString()) is "functiontoUTCString(){[nativecode]}" 134 134 PASS StripSpaces(RegExp.prototype.exec.toString()) is "functionexec(){[nativecode]}" 135 135 PASS StripSpaces(RegExp.prototype.test.toString()) is "functiontest(){[nativecode]}" -
trunk/LayoutTests/js/kde/script-tests/inbuilt_function_tostring.js
r98407 r202752 130 130 shouldBe("StripSpaces(Date.prototype.getFullYear.toString())","\"functiongetFullYear(){[nativecode]}\""); 131 131 shouldBe("StripSpaces(Date.prototype.getUTCFullYear.toString())","\"functiongetUTCFullYear(){[nativecode]}\""); 132 shouldBe("StripSpaces(Date.prototype.toGMTString.toString())","\"functionto GMTString(){[nativecode]}\"");132 shouldBe("StripSpaces(Date.prototype.toGMTString.toString())","\"functiontoUTCString(){[nativecode]}\""); 133 133 shouldBe("StripSpaces(Date.prototype.getMonth.toString())","\"functiongetMonth(){[nativecode]}\""); 134 134 shouldBe("StripSpaces(Date.prototype.getUTCMonth.toString())","\"functiongetUTCMonth(){[nativecode]}\""); … … 163 163 shouldBe("StripSpaces(Date.prototype.setYear.toString())","\"functionsetYear(){[nativecode]}\""); 164 164 shouldBe("StripSpaces(Date.prototype.getYear.toString())","\"functiongetYear(){[nativecode]}\""); 165 shouldBe("StripSpaces(Date.prototype.toGMTString.toString())","\"functionto GMTString(){[nativecode]}\"");165 shouldBe("StripSpaces(Date.prototype.toGMTString.toString())","\"functiontoUTCString(){[nativecode]}\""); 166 166 167 167 shouldBe("StripSpaces(RegExp.prototype.exec.toString())","\"functionexec(){[nativecode]}\""); -
trunk/Source/JavaScriptCore/ChangeLog
r202737 r202752 1 2016-07-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] Date.toGMTString should be the Date.toUTCString function 4 https://bugs.webkit.org/show_bug.cgi?id=159318 5 6 Reviewed by Mark Lam. 7 8 See https://tc39.github.io/ecma262/#sec-date.prototype.togmtstring 9 10 * runtime/DatePrototype.cpp: 11 (JSC::DatePrototype::finishCreation): 12 (JSC::dateProtoFuncToGMTString): Deleted. 13 1 14 2016-07-01 Mark Lam <mark.lam@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r202683 r202752 108 108 EncodedJSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState*); 109 109 EncodedJSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState*); 110 EncodedJSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState*);111 110 EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState*); 112 111 EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState*); … … 434 433 toString dateProtoFuncToString DontEnum|Function 0 435 434 toISOString dateProtoFuncToISOString DontEnum|Function 0 436 toUTCString dateProtoFuncToUTCString DontEnum|Function 0437 435 toDateString dateProtoFuncToDateString DontEnum|Function 0 438 436 toTimeString dateProtoFuncToTimeString DontEnum|Function 0 … … 444 442 getFullYear dateProtoFuncGetFullYear DontEnum|Function 0 445 443 getUTCFullYear dateProtoFuncGetUTCFullYear DontEnum|Function 0 446 toGMTString dateProtoFuncToGMTString DontEnum|Function 0447 444 getMonth dateProtoFuncGetMonth DontEnum|Function 0 448 445 getUTCMonth dateProtoFuncGetUTCMonth DontEnum|Function 0 … … 493 490 ASSERT(inherits(info())); 494 491 492 Identifier toUTCStringName = Identifier::fromString(&vm, ASCIILiteral("toUTCString")); 493 JSFunction* toUTCStringFunction = JSFunction::create(vm, globalObject, 0, toUTCStringName.string(), dateProtoFuncToUTCString); 494 putDirectWithoutTransition(vm, toUTCStringName, toUTCStringFunction, DontEnum); 495 putDirectWithoutTransition(vm, Identifier::fromString(&vm, ASCIILiteral("toGMTString")), toUTCStringFunction, DontEnum); 496 495 497 #if ENABLE(INTL) 496 498 JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleString", datePrototypeToLocaleStringCodeGenerator, DontEnum); … … 651 653 return JSValue::encode(jsNaN()); 652 654 return JSValue::encode(jsNumber(gregorianDateTime->year())); 653 }654 655 EncodedJSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec)656 {657 const bool asUTCVariant = true;658 return formateDateInstance(exec, DateTimeFormatDateAndTime, asUTCVariant);659 655 } 660 656
Note: See TracChangeset
for help on using the changeset viewer.