Closed
Bug 1156065
Opened 9 years ago
Closed 9 years ago
"Sending message that cannot be cloned"-warning in SiteSpecificUserAgent.js
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 41
People
(Reporter: elbart, Assigned: ttaubert)
References
Details
Attachments
(3 files, 1 obsolete file)
When visiting a site like mozilla.org, this message pops up in the Console: Sending message that cannot be cloned. Are you trying to send an XPCOM object? SiteSpecificUserAgent.js:50:0 https://hg.mozilla.org/mozilla-central/annotate/a32e3b93c8d8/dom/base/SiteSpecificUserAgent.js#l50 (Message coming from bug 1139718)
Comment 1•9 years ago
|
||
> When visiting a site like mozilla.org, this message pops up in the Console: Which console? Browser console? Web console? Something else? I can't reproduce this in a clean profile with a current-ish nightly (and in particular, the code from bug 1139718 is not getting hit at all). Are you seeing this in a clean profile?
Flags: needinfo?(elbart)
(In reply to Not doing reviews right now from comment #1) > Which console? Browser console? Web console? Something else? Browser console. > I can't reproduce this in a clean profile with a current-ish nightly (and in > particular, the code from bug 1139718 is not getting hit at all). Are you > seeing this in a clean profile? Yes. Screenshot made with 2015-04-20 with no pre-existing profile, so it's the very first start where it's loading the firstrun-page.
Flags: needinfo?(elbart)
(Please delete the previous attachment #8595288 [details] if possible, thanks.)
Comment 5•9 years ago
|
||
Comment on attachment 8595288 [details]
sitespecificuseragent.png
I can't delete this, but I can hide it from non-security-group members...
Thank you for following up!
Comment 6•9 years ago
|
||
I am also seeing this. These messages appear hundreds of times during browsing sessions. There seem to be 3 different files triggering this: parent.js:279:0 SiteSpecificUserAgent.js:50:0 <unknown>
Comment 7•9 years ago
|
||
Ah, now I managed to reproduce this. This is happening in e10s only, in the child process only, and only on hostnames that have not been visited so far, basically. So the SiteSpecificUserAgent bit is due to this code in getUserAgentForURIAndWindow: let data = { uri: aURI }; let result = cpmm.sendRpcMessage("Useragent:GetOverride", data)[0] where aURI is an nsIURI. So yeah, that will fail to clone correctly.... Bill, what should this code be doing instead?
Status: UNCONFIRMED → NEW
Component: DOM → General
Ever confirmed: true
Flags: needinfo?(wmccloskey)
Product: Core → Firefox
It looks like the only property we use on the URI is asciiHost. So we could just send that: let data = { uri: { asciiHost: aURI.asciiHost } }; We don't have a generic way to send URIs over IPC. We usually just send the spec and make a new one on the other side.
Flags: needinfo?(wmccloskey)
Updated•9 years ago
|
Flags: needinfo?(gavin.sharp)
Comment 9•9 years ago
|
||
Not clear what the needinfo is for. Sounds like a bug for the e10s backlog.
tracking-e10s:
--- → ?
Flags: needinfo?(gavin.sharp)
Comment 10•9 years ago
|
||
Needinfo was for who gets to own this.
Updated•9 years ago
|
Updated•9 years ago
|
Assignee | ||
Comment 11•9 years ago
|
||
Looks like we have no tests for this... I'd prefer to file a follow-up and leave this to :mchang.
Comment 12•9 years ago
|
||
Huh? I haven't dealt with any of this code before, what did you need?
Flags: needinfo?(ttaubert)
Assignee | ||
Comment 13•9 years ago
|
||
Hmmm. I thought blame said you wrote this... Let me check again.
Flags: needinfo?(ttaubert)
Assignee | ||
Comment 14•9 years ago
|
||
Looks like you did in bug 927633?
Comment 15•9 years ago
|
||
(In reply to Tim Taubert [:ttaubert] from comment #14) > Looks like you did in bug 927633? Ahh I see, thanks for finding that. Been a long time since I've seen this code.
Comment on attachment 8610228 [details] [diff] [review] 0001-Bug-1156065-Send-cloneable-messages-from-SiteSpecifi.patch Review of attachment 8610228 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for doing this.
Attachment #8610228 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 18•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/e15b0c115585 Had to backout because of failures like this: http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/fx-team-linux/1432808854/fx-team_ubuntu32_vm_test-mochitest-5-bm06-tests1-linux32-build95.txt.gz TEST-UNEXPECTED-FAIL | netwerk/test/mochitests/test_user_agent_overrides.html | Navigator UA not overridden at step 1 - got Mozilla/5.0 (X11; Linux i686; rv:41.0) Gecko/20100101 Firefox/41.0, expected DummyUserAgent TEST-UNEXPECTED-FAIL | netwerk/test/mochitests/test_user_agent_overrides.html | Navigator UA not overridden at step 5 - got Mozilla/5.0 (X11; Linux i686; rv:41.0) Gecko/20100101 Firefox/41.0, expected DummyUserAgent/5.0 (X11; Linux i686; rv:41.0) Gecko/20100101 Firefox/41.0 TEST-UNEXPECTED-FAIL | netwerk/test/mochitests/test_user_agent_updates.html | Test timed out. - expected PASS There is a ton of these in the log too: JavaScript error: resource://gre/modules/UserAgentOverrides.jsm, line 92: TypeError: searchHost.indexOf is not a function Someone should take a look at this as well... Not sure I can find time to do that in the near future, sorry.
Assignee: ttaubert → nobody
Status: ASSIGNED → NEW
Assignee | ||
Comment 19•9 years ago
|
||
Turns out the API is used directly when loaded in the parent (boo) and also by Fennec. I think we should leave the API intact and just re-create the URI on the other side.
Assignee: nobody → ttaubert
Attachment #8610228 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8613212 -
Flags: review?(wmccloskey)
Attachment #8613212 -
Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/0b26d1be9caa
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
You need to log in
before you can comment on or make changes to this bug.
Description
•