Bug 29742 - [Chromium] Change window.toString() callback to match JSC
Summary: [Chromium] Change window.toString() callback to match JSC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nate Chapin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-25 10:50 PDT by Nate Chapin
Modified: 2009-09-28 15:30 PDT (History)
4 users (show)

See Also:


Attachments
patch (1.58 KB, patch)
2009-09-25 10:51 PDT, Nate Chapin
abarth: review+
japhet: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Chapin 2009-09-25 10:50:18 PDT
The V8 bindings currently access the global object wrapper instead of the DOMWindow wrapper in the toString() callback.  We should be accessing the DOMWindow wrapper, since we currently output [object global] instead of the expected [object DOMWindow].
Comment 1 Nate Chapin 2009-09-25 10:51:26 PDT
Created attachment 40124 [details]
patch
Comment 2 Eric Seidel (no email) 2009-09-25 14:18:55 PDT
You should list what test this affects.  Assuming that it affects a test?  If it doesn't then we need to add a test.

Adam and Dimitri are probably your two best WebKit reviewers here.
Comment 3 Adam Barth 2009-09-25 14:25:38 PDT
Comment on attachment 40124 [details]
patch

This looks great, but please list which LayoutTests this fixes.
Comment 4 Nate Chapin 2009-09-25 14:27:35 PDT
I initially started looking at it for LayoutTests/fast/events/event-trace.html, and from a run of all layout tests, it appears it will fix 2 and allow us to use default
expectations on about a dozen others.  There are some others that we're also
failing for other reasons that will still fail, but will be closer to
expectations.

I'll see if I can assemble a full list.

I can try and compile a full list if that would be helpful.(In reply to comment #3)
> (From update of attachment 40124 [details])
> This looks great, but please list which LayoutTests this fixes.
Comment 5 Nate Chapin 2009-09-25 14:36:44 PDT
The complete list, to the best of my knowledge, is: LayoutTests/fast/dom/Window/atob-btoa.html
LayoutTests/fast/dom/Window/window-lookup-precedence.html
LayoutTests/fast/dom/Window/window-postmessage-args.html
LayoutTests/fast/dom/Window/window-properties.html
LayoutTests/fast/events/event-trace.html
LayoutTests/fast/events/event-view-toString.html
LayoutTests/fast/js/eval-cross-window.html
LayoutTests/fast/js/eval-keyword-vs-function.html
LayoutTests/fast/js/toString-and-valueOf-override.html
LayoutTests/http/tests/security/cross-frame-access-custom.html
LayoutTests/http/tests/security/cross-frame-access-put.html
Comment 6 Adam Barth 2009-09-25 14:52:23 PDT
Comment on attachment 40124 [details]
patch

Awesome!
Comment 7 Nate Chapin 2009-09-25 15:05:37 PDT
Comment on attachment 40124 [details]
patch

cq-

The Chromium WebKit canary is compile-broken at the moment, and I would like to verify precisely how the downstream expectations need to be changed before this gets integrated, so I want to wait on committing.
Comment 8 Nate Chapin 2009-09-28 15:30:30 PDT
Committed as r48841.