The message passing interface only supports sending the JSON-subset of
JavaScript types. (numeric & string literals, booleans, arrays, objects,
null) The documentation on message passing[1] mentions this limitation.
[1]: http://code.google.com/chrome/extensions/messaging.html
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
I really need to use connections here since I need a list of ports in the background page to post announcements to the content scripts.
If I have both content scripts & the background page with listeners for sendRequest(), memory leaks occur because onRequest event handlers are being triggered from sendRequest() calls in non-content-script pages, such as the options page or other scripts in the background page.
If there is a way I can do a port.postMessage() and optionally specify a closure to receive the event response (instead of the port.onMessage handler), that would allow me to essentially do the same thing that sendRequest() is doing.
If the above hasn't answered your question, maybe tell us a bit more about what you're trying to accomplish.