Bug 59164 - Object.create creates uncachable objects
Summary: Object.create creates uncachable objects
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
Depends on: 59173
  Show dependency treegraph
Reported: 2011-04-21 18:05 PDT by Oliver Hunt
Modified: 2011-04-22 18:16 PDT (History)
4 users (show)

See Also:

Patch (1.82 KB, patch)
2011-04-21 18:06 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (4.86 KB, patch)
2011-04-22 14:05 PDT, 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 2011-04-21 18:05:18 PDT
Object.create creates uncachable objects
Comment 1 Oliver Hunt 2011-04-21 18:06:45 PDT
Created attachment 90645 [details]
Comment 2 Geoffrey Garen 2011-04-21 18:24:59 PDT
Comment on attachment 90645 [details]

Comment 3 Oliver Hunt 2011-04-21 18:32:54 PDT
Committed r84583: <http://trac.webkit.org/changeset/84583>
Comment 4 WebKit Review Bot 2011-04-21 19:16:26 PDT
http://trac.webkit.org/changeset/84583 might have broken Qt Linux Release
The following tests are not passing:
Comment 5 Geoffrey Garen 2011-04-21 19:16:55 PDT
Broke a test: http://build.webkit.org/results/GTK%20Linux%2064-bit%20Debug/r84585%20(21737)/fast/js/Object-create-pretty-diff.html

FAIL Object.getPrototypeOf(Object.create(null)) should be null. Was [object Object].

You changed to unconditionally use an empty object prototype, even if null is passed in.
Comment 6 Geoffrey Garen 2011-04-22 11:05:13 PDT
BTW, I think the right way to fix this is to give JSGlobalObject (or maybe JSGlobalData) a nullPrototypeStructure, just like the emptyObjectStructure. That way, Object.create will be correct for null prototypes, and still efficient.
Comment 7 Oliver Hunt 2011-04-22 14:05:33 PDT
Created attachment 90757 [details]
Comment 8 Geoffrey Garen 2011-04-22 14:08:08 PDT
Comment on attachment 90757 [details]

Comment 9 WebKit Review Bot 2011-04-22 16:18:43 PDT
http://trac.webkit.org/changeset/84679 might have broken GTK Linux 64-bit Debug
Comment 10 Oliver Hunt 2011-04-22 18:16:40 PDT
Committed r84679: <http://trac.webkit.org/changeset/84679>