After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720726 - 'ReferenceError: Can't find variable: update_diff' rised by WebView
'ReferenceError: Can't find variable: update_diff' rised by WebView
Status: RESOLVED FIXED
Product: gitg
Classification: Applications
Component: gitg
git master
Other Linux
: Normal trivial
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-19 09:53 UTC by Techlive Zheng
Modified: 2014-07-10 18:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the error in javascript console (20.33 KB, image/png)
2013-12-19 09:54 UTC, Techlive Zheng
  Details
Clean up the code a bit (1.26 KB, patch)
2013-12-19 10:03 UTC, Techlive Zheng
rejected Details | Review
Rename 's_diffmap' to 's_diff_map' (1.59 KB, patch)
2013-12-19 10:03 UTC, Techlive Zheng
accepted-commit_now Details | Review
Don't open WebKit inspector at the start (911 bytes, patch)
2013-12-19 10:03 UTC, Techlive Zheng
accepted-commit_now Details | Review
Document why we call 'update_diff()' here (780 bytes, patch)
2013-12-19 10:04 UTC, Techlive Zheng
accepted-commit_now Details | Review
Run update in the right 'WebView' context (803 bytes, patch)
2013-12-19 10:04 UTC, Techlive Zheng
needs-work Details | Review

Description Techlive Zheng 2013-12-19 09:53:56 UTC
Everytime Gitg starts with 'GITG_GTK_DIFF_VIEW_DEBUG' set, there is a bizzard error shown up in the javascript console: 'ReferenceError: Can't find variable: update_diff'.
Comment 1 Techlive Zheng 2013-12-19 09:54:53 UTC
Created attachment 264516 [details]
Screenshot of the error in javascript console
Comment 2 Techlive Zheng 2013-12-19 10:03:45 UTC
Created attachment 264517 [details] [review]
Clean up the code a bit
Comment 3 Techlive Zheng 2013-12-19 10:03:51 UTC
Created attachment 264518 [details] [review]
Rename 's_diffmap' to 's_diff_map'

Keep naming consistency.
Comment 4 Techlive Zheng 2013-12-19 10:03:57 UTC
Created attachment 264519 [details] [review]
Don't open WebKit inspector at the start

As we are using WebView in both history and commit activties, it is
annoying to see two WebKit inspector windows open when Gitg starts.
Comment 5 Techlive Zheng 2013-12-19 10:04:02 UTC
Created attachment 264520 [details] [review]
Document why we call 'update_diff()' here
Comment 6 Techlive Zheng 2013-12-19 10:04:07 UTC
Created attachment 264521 [details] [review]
Run update in the right 'WebView' context

Fix the bizzard error 'ReferenceError: Can't find variable: update_diff'
rised by WebView.
Comment 7 Techlive Zheng 2013-12-19 10:06:02 UTC
Please review these patches, if they are okay, I will push them onto the master.
Comment 8 Ignacio Casal Quinteiro (nacho) 2013-12-19 10:11:36 UTC
Review of attachment 264517 [details] [review]:

ok... I do not see much of a cleanup here. but go ahead...
Comment 9 Ignacio Casal Quinteiro (nacho) 2013-12-19 10:11:57 UTC
Review of attachment 264518 [details] [review]:

ok
Comment 10 Ignacio Casal Quinteiro (nacho) 2013-12-19 10:12:59 UTC
Review of attachment 264519 [details] [review]:

ok
Comment 11 Ignacio Casal Quinteiro (nacho) 2013-12-19 10:13:33 UTC
Review of attachment 264520 [details] [review]:

ok
Comment 12 jessevdk@gmail.com 2013-12-19 10:13:56 UTC
Review of attachment 264521 [details] [review]:

This doesn't really make sense. If this fixes the problem, then there must be something else underlying it with further implications. I don't see how the loaded signal could be emitted for a different instance of the view.
Comment 13 Ignacio Casal Quinteiro (nacho) 2013-12-19 10:14:26 UTC
Review of attachment 264521 [details] [review]:

Looks good. Thanks for the patches.
Comment 14 jessevdk@gmail.com 2013-12-19 10:17:57 UTC
Review of attachment 264517 [details] [review]:

This doesn't clean up anything, and moreover introduces trailing whitespaces. I think we can just drop this one.
Comment 15 Techlive Zheng 2013-12-19 10:39:46 UTC
(In reply to comment #14)
> Review of attachment 264517 [details] [review]:
> 
> This doesn't clean up anything, and moreover introduces trailing whitespaces. I
> think we can just drop this one.

Just trying to put related code together, so they look better, it is actually irrelevant.
Comment 16 Techlive Zheng 2013-12-19 10:40:54 UTC
(In reply to comment #12)
> Review of attachment 264521 [details] [review]:
> 
> This doesn't really make sense. If this fixes the problem, then there must be
> something else underlying it with further implications. I don't see how the
> loaded signal could be emitted for a different instance of the view.

This do fix the problem on my side, but I didn't dig deepr though.
Comment 17 Techlive Zheng 2013-12-21 17:06:42 UTC
See branch wip/techlivezh/fix-720726
Comment 18 Techlive Zheng 2013-12-23 12:25:11 UTC
(In reply to comment #16)
> (In reply to comment #12)
> > Review of attachment 264521 [details] [review] [details]:
> > 
> > This doesn't really make sense. If this fixes the problem, then there must be
> > something else underlying it with further implications. I don't see how the
> > loaded signal could be emitted for a different instance of the view.
> 
> This do fix the problem on my side, but I didn't dig deepr though.

The error still occurs, will keep investigating.
Comment 19 Techlive Zheng 2013-12-23 15:05:19 UTC
Review of attachment 264521 [details] [review]:

The error still occurs, will keep investigating.
Comment 20 jessevdk@gmail.com 2014-07-10 18:35:04 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.