WebKit Bugzilla
Attachment 372364 Details for
Bug 105282
: Date.prototype.toJSON does not execute steps 1-2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-105282-20190618225352.patch (text/plain), 2.89 KB, created by
Alexey Shvayka
on 2019-06-18 12:53:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alexey Shvayka
Created:
2019-06-18 12:53:53 PDT
Size:
2.89 KB
patch
obsolete
>Index: JSTests/ChangeLog >=================================================================== >--- JSTests/ChangeLog (revision 246560) >+++ JSTests/ChangeLog (working copy) >@@ -1,3 +1,12 @@ >+2019-06-18 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Date.prototype.toJSON does not execute steps 1-2 >+ https://bugs.webkit.org/show_bug.cgi?id=105282 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * test262/expectations.yaml: Mark 2 test cases as passing. >+ > 2019-06-18 Tadeu Zagallo <tzagallo@apple.com> > > DFG code should not reify the names of builtin functions with private names >Index: JSTests/test262/expectations.yaml >=================================================================== >--- JSTests/test262/expectations.yaml (revision 246558) >+++ JSTests/test262/expectations.yaml (working copy) >@@ -873,9 +873,6 @@ test/built-ins/Date/prototype/toDateStri > test/built-ins/Date/prototype/toJSON/invoke-result.js: > default: 'TypeError: toISOString did not return a primitive value' > strict mode: 'TypeError: toISOString did not return a primitive value' >-test/built-ins/Date/prototype/toJSON/to-object.js: >- default: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all' >- strict mode: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all' > test/built-ins/Date/prototype/toJSON/to-primitive-symbol.js: > default: 'TypeError: toISOString did not return a primitive value' > strict mode: 'TypeError: toISOString did not return a primitive value' >Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 246558) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2019-06-18 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ Date.prototype.toJSON does not execute steps 1-2 >+ https://bugs.webkit.org/show_bug.cgi?id=105282 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Resolve `this` value using strict mode semantics. >+ >+ * runtime/DatePrototype.cpp: >+ (JSC::dateProtoFuncToJSON): Remove toThis call. >+ > 2019-06-18 Tadeu Zagallo <tzagallo@apple.com> > > DFG code should not reify the names of builtin functions with private names >Index: Source/JavaScriptCore/runtime/DatePrototype.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/DatePrototype.cpp (revision 246558) >+++ Source/JavaScriptCore/runtime/DatePrototype.cpp (working copy) >@@ -1145,7 +1145,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFu > VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); >- JSObject* object = jsCast<JSObject*>(thisValue.toThis(exec, NotStrictMode)); >+ JSObject* object = thisValue.toObject(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > > JSValue timeValue = object->toPrimitive(exec, PreferNumber);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 105282
:
371320
|
372364
|
378688
|
378761