WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
28460
Need to update JS bindings and IDL files to support multiple message ports in postMessage()
https://bugs.webkit.org/show_bug.cgi?id=28460
Summary
Need to update JS bindings and IDL files to support multiple message ports in...
Andrew Wilson
Reported
2009-08-19 09:54:08 PDT
We're updating the internal WebCore APIs to support passing multiple MessagePorts to postMessage() as part of
bug 26902
. Once that's in, we need to update the JS bindings and IDL files to reflect the new APIs.
Attachments
proposed patch
(79.91 KB, patch)
2009-08-29 09:12 PDT
,
Andrew Wilson
no flags
Details
Formatted Diff
Diff
Patch addressing Levin's comments
(79.92 KB, patch)
2009-09-01 16:35 PDT
,
Andrew Wilson
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andrew Wilson
Comment 1
2009-08-29 09:12:00 PDT
Created
attachment 38775
[details]
proposed patch This is the patch for the IDL files and JS bindings - I'm making another patch for the V8 bindings.
David Levin
Comment 2
2009-09-01 12:26:46 PDT
Comment on
attachment 38775
[details]
proposed patch r+ from me with some minor changes except for WebCore/bindings/js/*. It would be great if you got someone to look over those changes. I tried but my naive eyes probably missed things. If this totally clogs up, I'll be willing to give this one last on those as well as I can to finish this off.
> diff --git a/LayoutTests/fast/events/message-port-multi.html b/LayoutTests/fast/events/message-port-multi.html > \ No newline at end of file
Please fix. >
> diff --git a/LayoutTests/fast/workers/resources/worker-context-multi-port.js b/LayoutTests/fast/workers/resources/worker-context-multi-port.js
> + } else if (event.data.indexOf("PASS") >= 0)
Why is this >= 0 instead of == 0?
> + testPassed(event.data.substring(4)); > + else > + testFailed(event.data.substring(4));
Why is this substring(4) when the event.data wasn't "PASS"? I think you are expecting FAIL. It may be good to check that it is fail and if not print the whole message.
> diff --git a/LayoutTests/fast/workers/resources/worker-multi-port.js b/LayoutTests/fast/workers/resources/worker-multi-port.js
> + else if (event.data.indexOf("PASS") >= 0) > + testPassed(event.data.substring(4));
Why is this >= 0 instead of == 0?
> + else > + testFailed(event.data.substring(4));
Why is this substring(4) when the event.data wasn't "PASS"? I think you are expecting FAIL. It may be good to check that it is fail and if not print the whole message.
> diff --git a/LayoutTests/fast/workers/worker-context-multi-port.html b/LayoutTests/fast/workers/worker-context-multi-port.html > \ No newline at end of file
Please fix.
> diff --git a/LayoutTests/fast/workers/worker-multi-port.html b/LayoutTests/fast/workers/worker-multi-port.html > \ No newline at end of file
Please fix.
> diff --git a/WebCore/bindings/js/JSMessageEventCustom.cpp b/WebCore/bindings/js/JSMessageEventCustom.cpp > + > + MessageEvent* impl = static_cast<MessageEvent*>(this->impl());
Prefer whole words: "impl" Perhaps "messageEvent" or just "event".
> diff --git a/WebCore/bindings/js/JSMessagePortCustom.cpp b/WebCore/bindings/js/JSMessagePortCustom.cpp > +JSC::JSValue JSMessagePort::postMessage(JSC::ExecState* exec, const JSC::ArgList& args) > +{ > + const UString& message = args.at(0).toString(exec); > + MessagePortArray portArray; > + fillMessagePortArray(exec, args.at(1), portArray); > + if (exec->hadException()) > + return jsUndefined(); > + > + ExceptionCode ec = 0; > + impl()->postMessage(message, &portArray, ec); > + setDOMException(exec, ec); > + return jsUndefined(); > +}
I think I saw two copies of this code. Is it possible to consolidate them?
Andrew Wilson
Comment 3
2009-09-01 16:35:37 PDT
Created
attachment 38896
[details]
Patch addressing Levin's comments Sam, can you take a look at the JS bindings changes? dave_levin already looked at the rest of the patch.
Andrew Wilson
Comment 4
2009-09-03 11:37:34 PDT
Committed as
r48025
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug