Commit 75bab15e authored by eric@webkit.org's avatar eric@webkit.org

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.

git-svn-id: svn://svn.chromium.org/blink/trunk@54070 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f157f0a0
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.
2010-01-29 Ben Murdoch <benm@google.com>
Reviewed by Dimitri Glazkov.
......@@ -68,7 +68,14 @@ v8::Handle<v8::Value> V8MessageEvent::initMessageEventCallback(const v8::Argumen
RefPtr<SerializedScriptValue> dataArg = SerializedScriptValue::create(args[3]);
String originArg = v8ValueToWebCoreString(args[4]);
String lastEventIdArg = v8ValueToWebCoreString(args[5]);
DOMWindow* sourceArg = V8DOMWindow::HasInstance(args[6]) ? V8DOMWindow::toNative(v8::Handle<v8::Object>::Cast(args[6])) : 0;
DOMWindow* sourceArg = 0;
if (args[6]->IsObject()) {
v8::Handle<v8::Object> wrapper = v8::Handle<v8::Object>::Cast(args[6]);
v8::Handle<v8::Object> window = V8DOMWrapper::lookupDOMWrapper(V8ClassIndex::DOMWINDOW, wrapper);
if (!window.IsEmpty())
sourceArg = V8DOMWindow::toNative(window);
}
OwnPtr<MessagePortArray> portArray;
if (!isUndefinedOrNull(args[7])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment