Bug 59164

Summary: Object.create creates uncachable objects
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, ggaren, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on: 59173    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch ggaren: review+

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]
Patch
Comment 2 Geoffrey Garen 2011-04-21 18:24:59 PDT
Comment on attachment 90645 [details]
Patch

r=me
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:
fast/js/Object-create.html
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]
Patch
Comment 8 Geoffrey Garen 2011-04-22 14:08:08 PDT
Comment on attachment 90757 [details]
Patch

r=me
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>