Closed Bug 593142 Opened 14 years ago Closed 14 years ago

Remove DOM window check code from netwerk

Categories

(Core :: Networking, defect)

x86
Windows CE
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: romaxa, Assigned: mjarvin)

References

Details

Attachments

(1 file)

We need to remove this code and fix it properly: > >+ > >+ //Check that there is atleast one XUL window. If there isn't just return > >+ //without establishing connectivity > >+ nsresult rv; > >+ nsCOMPtr <nsIWindowMediator> windowMediator = > >+ do_GetService(NS_WINDOWMEDIATOR_CONTRACTID, &rv); > >+ > >+ NS_ENSURE_SUCCESS(rv,PR_FALSE); > >+ > >+ nsCOMPtr <nsISimpleEnumerator> windowEnumerator; > >+ > >+ rv = windowMediator->GetXULWindowEnumerator(nsnull, > >+ getter_AddRefs(windowEnumerator)); > >+ > >+ NS_ENSURE_SUCCESS(rv,PR_FALSE); > >+ > >+ PRBool moreElements = PR_FALSE; > >+ windowEnumerator->HasMoreElements(&moreElements); > >+ if (!moreElements) { > >+ return PR_FALSE; > >+ } > > > Why this check? remove it. Having a window should not be a requirement of > setting up a network connection. > >>It is important for Meego Prestart / Faststart. Without it we request >>connection during startup of the device which we are not allowed to do. >>That is also a issue on libconic and this part is a plain copy - the patch for >>that seems to be nowhere in BMO. I wonder actually why and need to check. >>But it is important. I will add a comment. This was not fixed in review process of bug 586836
Blocks: 586836
Browser is started on device startup, and faststart component is used to prevent initial window from opening and to keep libraries loaded. This is fix for case when browser is closed, and connection dialog was popping up. This was caused by update checks, which tried to connect to Internet. If this code needs to be removed, how should this be handled?
Assignee: nobody → mjarvin
Status: NEW → ASSIGNED
That is besides the point. the network code should not be looking for windows. please review this code as soon as possible (so that we don't forget) and begin an investigation as to what is making a network connection at startup (during faststart). That is the bug.
OS: Linux → Windows CE
Added patch, which removes code to check whether window is visible, when connection is made. I'll do more inspections regarding this tomorrow.
Attachment #472359 - Flags: review?(romaxa)
Attachment #472359 - Flags: review?(romaxa) → review+
this is npodb change, we can safely checking this
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: