Changeset 54070 in webkit


Ignore:
Timestamp:
Jan 29, 2010 10:13:10 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-29 Drew Wilson <atwilson@chromium.org>

Reviewed by Adam Barth.

V8 implementation of MessageEvent.initMessageEvent() does not set source correctly.
https://bugs.webkit.org/show_bug.cgi?id=34292

Test: fast/events/init-events.html will pass in Chrome now.

  • bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::initMessageEventCallback): Now properly extracts the reference to the DOMWindow object from the passed-in window parameter.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54069 r54070  
     12010-01-29  Drew Wilson  <atwilson@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        V8 implementation of MessageEvent.initMessageEvent() does not set source correctly.
     6        https://bugs.webkit.org/show_bug.cgi?id=34292
     7
     8        Test: fast/events/init-events.html will pass in Chrome now.
     9
     10        * bindings/v8/custom/V8MessageEventCustom.cpp:
     11        (WebCore::V8MessageEvent::initMessageEventCallback):
     12        Now properly extracts the reference to the DOMWindow object from the passed-in window parameter.
     13
    1142010-01-29  Ben Murdoch  <benm@google.com>
    215
  • trunk/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp

    r53586 r54070  
    6969    String originArg = v8ValueToWebCoreString(args[4]);
    7070    String lastEventIdArg = v8ValueToWebCoreString(args[5]);
    71     DOMWindow* sourceArg = V8DOMWindow::HasInstance(args[6]) ? V8DOMWindow::toNative(v8::Handle<v8::Object>::Cast(args[6])) : 0;
     71
     72    DOMWindow* sourceArg = 0;
     73    if (args[6]->IsObject()) {
     74        v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(args[6]);
     75        v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, wrapper);
     76        if (!window.IsEmpty())
     77            sourceArg = V8DOMWindow::toNative(window);
     78    }
    7279    OwnPtr<MessagePortArray> portArray;
    7380
Note: See TracChangeset for help on using the changeset viewer.