Bug 127523 - Generic JSObject::put should handle static properties in the classinfo hierarchy
Summary: Generic JSObject::put should handle static properties in the classinfo hierarchy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on: 127593
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-23 17:06 PST by Oliver Hunt
Modified: 2014-01-24 16:59 PST (History)
18 users (show)

See Also:


Attachments
Patch (48.66 KB, patch)
2014-01-23 17:25 PST, Oliver Hunt
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (629.92 KB, application/zip)
2014-01-23 18:41 PST, Build Bot
no flags Details
Patch (95.20 KB, patch)
2014-01-24 11:33 PST, Oliver Hunt
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2014-01-23 17:06:16 PST
Generic JSObject::put should handle static properties in the classinfo hierarchy
Comment 1 Oliver Hunt 2014-01-23 17:25:36 PST
Created attachment 222050 [details]
Patch
Comment 2 Build Bot 2014-01-23 18:41:06 PST
Comment on attachment 222050 [details]
Patch

Attachment 222050 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4899138265153536

New failing tests:
media/network-no-source-const-shadow.html
fast/canvas/webgl/oes-texture-half-float-with-canvas.html
fast/canvas/webgl/oes-texture-half-float-with-image.html
fast/canvas/webgl/oes-texture-half-float-linear.html
fast/canvas/webgl/oes-texture-half-float-with-video.html
Comment 3 Build Bot 2014-01-23 18:41:08 PST
Created attachment 222068 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Geoffrey Garen 2014-01-23 19:08:10 PST
Comment on attachment 222050 [details]
Patch

Looks like you need to update bindings test expectations and fix some WebGL tests.
Comment 5 Geoffrey Garen 2014-01-23 19:14:09 PST
Comment on attachment 222050 [details]
Patch

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

Please add a regression test for a host object in the prototype chain with a setter -- for example, RegExp.input.

Your ChangeLog should specify how you tested performance. I suggest Dromaeo.

The rest of the patch looks good, with some comments below.

> Source/JavaScriptCore/create_hash_table:99
> +            if (!($att =~ m/ReadOnly/)) {
> +                $put = "set" . jsc_ucfirst($val);
> +            }
> +            $hasSetter = "true";

Why is $hasSetter true even if the property is ReadOnly? Is this because strict mode will need to throw an exception when setting a ReadOnly property? If so, I think you should call this variable "$hasSetterOrReadOnlyProperty".

> Source/JavaScriptCore/runtime/JSObject.cpp:398
> +        if (info->hasStaticSetterProperties(vm)) {

Same rename here.

> Source/JavaScriptCore/runtime/Lookup.h:113
> +        bool hasSetterProperties;

Same rename here.
Comment 6 Oliver Hunt 2014-01-23 23:48:05 PST
(In reply to comment #4)
> (From update of attachment 222050 [details])
> Looks like you need to update bindings test expectations and fix some WebGL tests.

Yeah, but i wanted to make the EWS bots try it out, to see how badly it horks everything.  Alas they have fallen over again.

Happily this is performance neutral (and actually a win on some tests!)

I agree with the rename.
Comment 7 Oliver Hunt 2014-01-24 11:33:26 PST
Created attachment 222127 [details]
Patch
Comment 8 Geoffrey Garen 2014-01-24 11:38:58 PST
Comment on attachment 222127 [details]
Patch

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

> Source/WebCore/ChangeLog:56
> +        * html/canvas/WebGLRenderingContext.idl:
> +          Remove bogus attribute

You should explain how you know this is bogus, so poor Dean Jackson doesn't have to wonder.

In person, you explained that this attribute never existed in the spec, and never should have been in WebKit.
Comment 9 Geoffrey Garen 2014-01-24 11:39:55 PST
Comment on attachment 222127 [details]
Patch

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

r=me

> Source/JavaScriptCore/ChangeLog:12
> +        To make this not clobber performance, the ClassInfo HashTable
> +        now includes a flag to indicate that it contains setters. This

You should specify the performance tests you ran: Dromaeo, and run-jsc-benchmarks.
Comment 10 Oliver Hunt 2014-01-24 11:59:37 PST
Committed r162713: <http://trac.webkit.org/changeset/162713>
Comment 11 WebKit Commit Bot 2014-01-24 16:45:02 PST
Re-opened since this is blocked by bug 127593
Comment 12 Oliver Hunt 2014-01-24 16:59:20 PST
Committed r162740: <http://trac.webkit.org/changeset/162740>