GNOME Bugzilla – Bug 720726
'ReferenceError: Can't find variable: update_diff' rised by WebView
Last modified: 2014-07-10 18:35:04 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'.
Created attachment 264516 [details] Screenshot of the error in javascript console
Created attachment 264517 [details] [review] Clean up the code a bit
Created attachment 264518 [details] [review] Rename 's_diffmap' to 's_diff_map' Keep naming consistency.
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.
Created attachment 264520 [details] [review] Document why we call 'update_diff()' here
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.
Please review these patches, if they are okay, I will push them onto the master.
Review of attachment 264517 [details] [review]: ok... I do not see much of a cleanup here. but go ahead...
Review of attachment 264518 [details] [review]: ok
Review of attachment 264519 [details] [review]: ok
Review of attachment 264520 [details] [review]: ok
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.
Review of attachment 264521 [details] [review]: Looks good. Thanks for the patches.
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.
(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.
(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.
See branch wip/techlivezh/fix-720726
(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.
Review of attachment 264521 [details] [review]: The error still occurs, will keep investigating.
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.