Open Bug 1749037 Opened 4 years ago Updated 1 year ago

Structured clone support for JS-implemented interfaces used as dictionaries

Categories

(Core :: DOM: postMessage, defect)

defect

Tracking

()

People

(Reporter: sfink, Unassigned)

References

Details

(Keywords: leave-open)

Attachments

(1 file)

This is a bug version of the comment

  // Not clonable, try JSON
  // XXX This is ugly but currently structured cloning doesn't handle
  //    properly cases when interface is implemented in JS and used
  //    as a dictionary.

See also bug 759427 comment 40.

I don't really understand what that means, and the bug title might be wrong, but it seemed like it would be good to have a bug for this.

Keywords: leave-open
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Assignee: sphink → nobody
Status: ASSIGNED → NEW
Summary: Strucured clone support for JS-implemented interfaces used as dictionaries → Structured clone support for JS-implemented interfaces used as dictionaries
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7aeb860ceea1 Replace XXX comment with bug number r=smaug DONTBUILD
Assignee: sphink → nobody
Status: ASSIGNED → NEW

The leave-open keyword is there and there is no activity for 6 months.
:jstutte, maybe it's time to close this bug?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jstutte)
Flags: needinfo?(jstutte)

I was curious if we ever actually hit this. Looking at some logs I have for all plain and bc Mochitests on Linux debug, I see the message 3 times, in a single test, browser/components/extensions/test/browser/browser_ext_menus_events.js, for this specific send of ContextMenuChild, for the "contextmenu" message.

Here's what the non-serializable part of seems to be, using DumpValue():

{
  "type": "object",
  [...]
  "handler": "(js::CrossCompartmentWrapper*)0x11e6c9290",
  "private": "<MediaError @ (JSObject*)0x16e3b38e9e98>"
}

So this is like a CCW to a MediaError? Or just a MediaError?

I don't know why I didn't see any nsFrameMessageManager::GetParamsForMessage() logging, but the password manager autofill tests that use a shim seem to also require the JSON fallback.

In Mochitest-plain, these tests are affected:
toolkit/components/passwordmgr/test/mochitest/test_autofill_https_downgrade.html
toolkit/components/passwordmgr/test/mochitest/test_autofill_https_upgrade.html
toolkit/components/passwordmgr/test/mochitest/test_autofill_different_formActionOrigin.html
toolkit/components/passwordmgr/test/mochitest/test_autofill_different_subdomain.html
toolkit/components/passwordmgr/test/mochitest/test_autofill_tab_between_fields.htm

With DumpValue(), it appears to be a CCW. The resulting JSON is {"displayOrigin":"example.com","origin":"https://example.com","hostname":"https://example.com","formActionOrigin":"https://autofill","formSubmitURL":"https://autofill","httpRealm":null,"username":"user1","usernameField":"uname","password":"pass1","passwordField":"pword","unknownFields":null,"everSynced":false,"syncCounter":0,"guid":null,"timeCreated":0,"timeLastUsed":0,"timePasswordChanged":0,"timesUsed":0}

I'm not sure what is going on here, but LoginAutoComplete.sys.mjs is doing something with wrappedJSObject so maybe that is related.

Depends on: 1889810
Depends on: 1890021
See Also: → 1898068
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: