diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

BrowserChannel w/ opt_firstTestResults causes 2 second delay during buffered proxy detection on IE < 10 #533

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup a BrowserChannel client passing opt_firstTestResults
2. Connection using IE < 10
3. Note the 2 second delay during buffered proxy detection.

The cause of this issue is that in BrowserTestChannel#connect startTime_ is not 
initialized (when opt_firstTestResults is passed). This causes 
BrowserTestChannel#checkForEarlyNonBuffered_ to return false as ms > 
MIN_TIME_EXPECTED_BETWEEN_DATA_. (In JS a number minus null is just the 
original number.)

Additionally, I have included an unrealted one line change to call 
correctHostPrefix when initializing hostPrefix_ from firstTestResults. mdp@ 
seemed to think this was a reasonable thing to do in the thread below.

Patch: https://codereview.appspot.com/7235062/

What is the expected output? What do you see instead?

Expected: IE < 10 should attempt to shortcut buffered proxy detection instead 
of waiting for 2 seconds (when using opt_firstTestResults).

Instead: IE < 10 always waits the full 2 seconds.

What version of the product are you using? On what operating system?

closure-library HEAD (r2474) on Debian Squeeze Linux. Tested with IE8 on 
Windows XP and IE9 on Windows Vista.

Please provide any additional information below.

See closure-library-discuss thread for more info:

https://groups.google.com/d/topic/closure-library-discuss/0xy-2yPyUII/discussion

Note: we cannot accept patches without the contributor license agreement
being signed. See http://code.google.com/p/closure-library/wiki/Contributors 
for more info.

My company (SameGoal LLC) has previously signed the corporate CLA.

https://code.google.com/p/closure-library/source/browse/trunk/AUTHORS#9

Original issue reported on code.google.com by ahochh...@samegoal.com on 29 Jan 2013 at 11:42

GoogleCodeExporter commented 8 years ago
Thanks. This bug can be closed.

http://code.google.com/p/closure-library/source/detail?r=2489

Original comment by ahochh...@samegoal.com on 5 Feb 2013 at 2:19