Closed Bug 840873 Opened 13 years ago Closed 13 years ago

Opening a chat window from the sidebar resolves the chat URL twice.

Categories

(Firefox Graveyard :: SocialAPI, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: markh, Assigned: markh)

Details

Attachments

(1 file)

The "openChat" function we expose on the mozSocial object has the following code: value: function(toURL, callback) { let url = targetWindow.document.documentURIObject.resolve(toURL); openChatWindow(getChromeWindow(targetWindow), provider, url, callback); } and openChatWindow has: let fullURI = provider.resolveUri(url); if (!provider.isSameOrigin(fullURI)) return; It seems that when the chat URL is requested by the sidebar etc, it will be resolved against the sidebar URL, but when opened by the worker it will be resolved against the provider's origin. There is no good reason for this inconsistency - the resolution against the "targetWindow" should probably be dropped so the same rules apply regardless of how it is opened.
trivial patch but requires a couple of changes to the tests. If we are going to make this change, the sooner the better, or providers may start relying on the existing behaviour. Fortunately, Facebook doesn't...
Assignee: nobody → mhammond
Attachment #724760 - Flags: review?(mixedpuppy)
Comment on attachment 724760 [details] [diff] [review] Only resolve chat urls against the provider origin Patch is fine, but I want to keep relative url support in anything that is not part of the manifest. We can fix worker api to relativize off the worker url.
Attachment #724760 - Flags: review?(mixedpuppy)
Apparently this is a feature!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: