Git development
 help / color / mirror / Atom feed
From: Stephen Boyd <bebarino@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb.js: Harden setting blamed commit info in incremental blame
Date: Sun, 06 Dec 2009 17:04:20 -0800	[thread overview]
Message-ID: <1260147860.1579.47.camel@swboyd-laptop> (raw)
In-Reply-To: <200911251536.08993.jnareb@gmail.com>

On Wed, 2009-11-25 at 15:36 +0100, Jakub Narebski wrote:
> Well, the one time I was able to run debugger (F12, select 'Script', select
> 'gitweb.js') with error occurring and without IE hanging (for README file)
> it did show an error for the following line:
> 
>   if (xhr.readyState === 3 && xhr.status !== 200) {
> 
> When I checked 'xhr' object, it has "Unknown error" as contents of 
> xhr.statusText field and as contents of xhr.status (sic!), which should
> be a number: HTTP status code.
> 
> Unfortunately I had to take a break... and I was not able to reproduce this
> (without hanging web browser: "program not responding") since then...
> 

Ok. It's December and I've had some more time to look into this.
Initializing 'xhr' to null seems to get rid of the "Unknown error"
problem (see patch below).

The responsiveness on IE8 is pretty poor. I load the page and then after
some waiting (usually 20-30 seconds including IE becoming a "Not
Responding" program) the whole page will load. There is nothing
incremental about it. I'm trying to figure out why it's slow now.

--->8----

Subject: [PATCH] gitweb.js: workaround IE8 "Unknown error"

Internet Explorer 8 complains about an "Unknown error on line 782, char 2".
That line is a reference to xhr and the status code. By initializing xhr
to null this error goes away.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 gitweb/gitweb.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.js b/gitweb/gitweb.js
index 2a25b7c..b936635 100644
--- a/gitweb/gitweb.js
+++ b/gitweb/gitweb.js
@@ -126,7 +126,7 @@ function createRequestObject() {
 /* ============================================================ */
 /* utility/helper functions (and variables) */

-var xhr;        // XMLHttpRequest object
+var xhr = null;        // XMLHttpRequest object
 var projectUrl; // partial query + separator ('?' or ';')

 // 'commits' is an associative map. It maps SHA1s to Commit objects.
-- 
1.6.6.rc1.39.g9a42

  parent reply	other threads:[~2009-12-07  1:04 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 19:44 [PATCH 0/2] jn/gitweb-blame fixes Stephen Boyd
2009-11-19 19:44 ` [PATCH 1/2] gitweb.js: fix null object exception in initials calculation Stephen Boyd
2009-11-19 21:40   ` Jakub Narebski
2009-11-19 22:48     ` Stephen Boyd
2009-11-19 19:44 ` [PATCH 2/2] gitweb.js: use unicode encoding for nbsp instead of html entity Stephen Boyd
2009-11-19 23:00   ` Jakub Narebski
2009-11-20  1:00     ` Stephen Boyd
2009-11-25  3:51   ` [PATCHv2 2/2] gitweb.js: fix padLeftStr() and its usage Stephen Boyd
2009-11-19 23:05 ` [PATCH 0/2] jn/gitweb-blame fixes Jakub Narebski
2009-11-20  1:00   ` Stephen Boyd
2009-11-20  4:05     ` Stephen Boyd
2009-11-21  0:32       ` Jakub Narebski
2009-11-21 14:56         ` Jakub Narebski
2009-11-25  0:45           ` [PATCH] gitweb.js: Harden setting blamed commit info in incremental blame Jakub Narebski
2009-11-25  1:01             ` Nanako Shiraishi
2009-11-25  1:13               ` Jakub Narebski
2009-11-25  4:01             ` Stephen Boyd
2009-11-25 14:36               ` Jakub Narebski
2009-11-25 20:55                 ` Jakub Narebski
2009-11-25 21:39                   ` Junio C Hamano
2009-11-25 23:28                     ` Jakub Narebski
2009-11-26  0:34                       ` Junio C Hamano
2009-11-26  0:59                         ` Jakub Narebski
2009-11-26 20:12                           ` [RFC/PATCH] gitweb: Make linking to actions requiring JavaScript a feature Jakub Narebski
2009-11-26 20:34                             ` Junio C Hamano
2009-11-26 21:24                               ` Jakub Narebski
2009-11-27  2:39                                 ` Junio C Hamano
2009-11-27 15:41                                   ` Jakub Narebski
2009-11-27 18:29                                     ` Junio C Hamano
2009-12-01  1:18                                       ` Junio C Hamano
2009-12-01 16:51                                         ` Jakub Narebski
2009-12-01 16:52                                           ` [PATCH 1/2] " Jakub Narebski
2009-12-01 16:54                                           ` [PATCH 2/2] gitweb: Add link to other blame implementation in blame views Jakub Narebski
2009-12-07  1:04                 ` Stephen Boyd [this message]
2009-12-07  1:19                   ` [PATCH] gitweb.js: Harden setting blamed commit info in incremental blame Stephen Boyd
2009-12-08 16:29                     ` PATCH/RFC] gitweb.js: Workaround for IE8 bug Jakub Narebski
2009-12-08 21:56                       ` Stephen Boyd
2009-12-08 22:24                         ` Jakub Narebski
2009-12-08 22:32                         ` Jakub Narebski
2009-12-09  0:08                           ` Stephen Boyd
2009-11-23  4:52         ` [PATCH 0/2] jn/gitweb-blame fixes Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1260147860.1579.47.camel@swboyd-laptop \
    --to=bebarino@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox