Bug 152574 - [ES6] Date.prototype should be a plain object
Summary: [ES6] Date.prototype should be a plain object
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy VanWagoner
URL:
Keywords:
Depends on: 152762
Blocks: 141610
  Show dependency treegraph
 
Reported: 2015-12-28 07:16 PST by Andy VanWagoner
Modified: 2016-01-06 04:17 PST (History)
8 users (show)

See Also:


Attachments
Patch (8.67 KB, patch)
2015-12-28 07:19 PST, Andy VanWagoner
no flags Details | Formatted Diff | Diff
Patch (8.87 KB, patch)
2016-01-04 20:12 PST, Andy VanWagoner
no flags Details | Formatted Diff | Diff
Patch (9.78 KB, patch)
2016-01-05 18:55 PST, Andy VanWagoner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy VanWagoner 2015-12-28 07:16:00 PST
[ES6] Date.prototype should be a plain object
Comment 1 Andy VanWagoner 2015-12-28 07:19:25 PST
Created attachment 267952 [details]
Patch
Comment 2 Geoffrey Garen 2016-01-04 15:14:06 PST
Comment on attachment 267952 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=267952&action=review

You should also test Date instanceof Date.

> Source/JavaScriptCore/runtime/DatePrototype.h:32
> +// ES6 20.3.4
> +// http://www.ecma-international.org/ecma-262/6.0/index.html#sec-properties-of-the-date-prototype-object
> +// The Date prototype object is itself an ordinary object. It is not a Date instance and does not have a [[DateValue]] internal slot.

You can leave this comment out. svn and bugzilla and test cases should suffice. We used to have a spec link for every function in the project. It was unwieldy.
Comment 3 Andy VanWagoner 2016-01-04 20:12:41 PST
Created attachment 268257 [details]
Patch
Comment 4 WebKit Commit Bot 2016-01-05 13:19:40 PST
Comment on attachment 268257 [details]
Patch

Clearing flags on attachment: 268257

Committed r194603: <http://trac.webkit.org/changeset/194603>
Comment 5 WebKit Commit Bot 2016-01-05 13:19:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Csaba Osztrogonác 2016-01-05 13:39:48 PST
(In reply to comment #4)
> Comment on attachment 268257 [details]
> Patch
> 
> Clearing flags on attachment: 268257
> 
> Committed r194603: <http://trac.webkit.org/changeset/194603>

It broke the cloop build, please fix it ASAP.
Comment 7 Csaba Osztrogonác 2016-01-05 13:41:18 PST
(In reply to comment #6)
> (In reply to comment #4)
> > Comment on attachment 268257 [details]
> > Patch
> > 
> > Clearing flags on attachment: 268257
> > 
> > Committed r194603: <http://trac.webkit.org/changeset/194603>
> 
> It broke the cloop build, please fix it ASAP.

Ah, not build failure, but test faiure.
Comment 8 Ryan Haddad 2016-01-05 13:46:49 PST
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #4)
> > > Comment on attachment 268257 [details]
> > > Patch
> > > 
> > > Clearing flags on attachment: 268257
> > > 
> > > Committed r194603: <http://trac.webkit.org/changeset/194603>
> > 
> > It broke the cloop build, please fix it ASAP.
> 
> Ah, not build failure, but test faiure.

** The following JSC stress test failures have been introduced:
	mozilla-tests.yaml/ecma/Date/15.9.5.js.mozilla
	mozilla-tests.yaml/ecma/Date/15.9.5.js.mozilla-baseline
	mozilla-tests.yaml/ecma/Date/15.9.5.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.js.mozilla-ftl
	mozilla-tests.yaml/ecma/Date/15.9.5.js.mozilla-ftl-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma/Date/15.9.5.js.mozilla-llint
Comment 9 WebKit Commit Bot 2016-01-05 15:40:43 PST
Re-opened since this is blocked by bug 152762
Comment 11 Andy VanWagoner 2016-01-05 17:23:43 PST
The failed test is explicitly testing for the old behavior, where Date.prototype is a Date instance. Either the expectation should change, or the tests should be skipped.
Comment 12 Keith Miller 2016-01-05 17:35:22 PST
I believe if you put "//@ skip" at the top of the test file it should be skipped. I'm not positive for the mozilla tests, however. If you do so you should put a comment linking to this bugzilla so others know why it's skipped. If adding "//@ skip" doesn't work let me know.
Comment 13 Andy VanWagoner 2016-01-05 18:36:23 PST
(In reply to comment #12)
> I believe if you put "//@ skip" at the top of the test file it should be
> skipped. I'm not positive for the mozilla tests, however. If you do so you
> should put a comment linking to this bugzilla so others know why it's
> skipped. If adding "//@ skip" doesn't work let me know.

"//@ skip" doesn't seem to work in this case. It looks like mozilla-tests.yaml can specify that it should be skipped, though. :negative, :fail, and :skip all look like valid options. Which is the most appropriate for this case?
Comment 14 Keith Miller 2016-01-05 18:44:41 PST
(In reply to comment #13)
> (In reply to comment #12)
> > I believe if you put "//@ skip" at the top of the test file it should be
> > skipped. I'm not positive for the mozilla tests, however. If you do so you
> > should put a comment linking to this bugzilla so others know why it's
> > skipped. If adding "//@ skip" doesn't work let me know.
> 
> "//@ skip" doesn't seem to work in this case. It looks like
> mozilla-tests.yaml can specify that it should be skipped, though. :negative,
> :fail, and :skip all look like valid options. Which is the most appropriate
> for this case?

Ah, I see. Looking at the run-jsc-stress-tests script, negative appears to mean there was an exit code 3 (uncaught exception) and failed means the test return the string "failed!". Based on the test logs from the bots I think you want negative.
Comment 15 Andy VanWagoner 2016-01-05 18:55:59 PST
Created attachment 268347 [details]
Patch
Comment 16 Benjamin Poulain 2016-01-06 03:32:11 PST
Comment on attachment 268347 [details]
Patch

Let's try again!
Comment 17 Benjamin Poulain 2016-01-06 03:34:17 PST
Thanks for the help everyone.
Comment 18 WebKit Commit Bot 2016-01-06 04:17:23 PST
Comment on attachment 268347 [details]
Patch

Clearing flags on attachment: 268347

Committed r194636: <http://trac.webkit.org/changeset/194636>
Comment 19 WebKit Commit Bot 2016-01-06 04:17:29 PST
All reviewed patches have been landed.  Closing bug.