Closed Bug 822794 Opened 12 years ago Closed 11 years ago

"Problem Loading Page" error page appears in chat window

Categories

(Firefox Graveyard :: SocialAPI, defect)

19 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 832943

People

(Reporter: unique.ek, Assigned: markh)

Details

Attachments

(2 files)

Attached image fbchatbug.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20121217 Firefox/19.0
Build ID: 20121217042016

Steps to reproduce:

Was chatting with Facebook messenger for Firefox.


Actual results:

I have alt-tabbed to another window for a second (i got another message from another friend int aht time i think) then one of the caht windows(the old one) got the error on the image which was normally deisgned for no webpages.


Expected results:

There should be an error message specific to the Facebook messegner window.
Component: Untriaged → SocialAPI: Providers
Connection issues with Facebook aside, we shouldn't ever show that error page in chat windows. IIRC we should handle that already, but maybe something is wrong with that code.
Status: UNCONFIRMED → NEW
Component: SocialAPI: Providers → SocialAPI
Ever confirmed: true
Summary: Problem Loading Page error on facebook messenger → "Problem Loading Page" error page appears in chat window
Thank you for the bug report, unique.ek!
Blocks: 832943
WIP patch - depends on fix to bug 832943, and ideally one of these bugs needs tests ;)
Assignee: nobody → mhammond
(In reply to :Gavin Sharp (away Jan 16-23) from comment #2)
> Thank you for the bug report, unique.ek!

No prolem at all :)
No longer blocks: 832943
Depends on: 832943
Comment on attachment 704518 [details] [diff] [review]
Add social error pages to chat windows.

drive-by feedback.


+      let title = "oh noes!"; // XXX - new string, browserBundle dance...
+      document.title = title;
+

Dont error documents have a title?

 
+        case "social:chat":
+          if (data != "create")
+            return;
+          // Attach our error listener to the newly created chatbox.
+          let iframe = subject.iframe; // |subject| is a chatbox.
+          // this voodoo gets the top-level window from the chat iframe's window...
+          let chatTopWindow = iframe.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+                   .getInterface(Ci.nsIWebNavigation)
+                   .QueryInterface(Ci.nsIDocShellTreeItem)
+                   .rootTreeItem
+                   .QueryInterface(Ci.nsIInterfaceRequestor)
+                   .getInterface(Ci.nsIDOMWindow);
+          // we only handle chats inside our top-level window.
+          if (window != chatTopWindow)
+            return;
+          iframe.docShell.getInterface(Ci.nsIWebProgress)
+                         .addProgressListener(new SocialErrorListener("chat", subject),
+                                              Ci.nsIWebProgress.NOTIFY_STATE_REQUEST |
+                                              Ci.nsIWebProgress.NOTIFY_LOCATION);
+          break;
+

I'd rather see the listener hookup happen in socialchat.xml, if we move the listener class to social.jsm we should be able to just import it and use it.  I did a small refactoring in bug 832943 and asked for your feedback.
This is being fixed in bug 832943
Status: NEW → RESOLVED
Closed: 11 years ago
No longer depends on: 832943
Resolution: --- → DUPLICATE
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: