Trevor Parscal has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/59973


Change subject: Frame initialization exceptions
......................................................................

Frame initialization exceptions

Don't call initialize inside the try-catch, it ends up sending exceptions 
thrown inside that method to /dev/null.

Change-Id: I8e0945f35c639ec156ee9a163b86fddfaed0ea7b
---
M modules/ve/ui/ve.ui.Frame.js
1 file changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/73/59973/1

diff --git a/modules/ve/ui/ve.ui.Frame.js b/modules/ve/ui/ve.ui.Frame.js
index ae1f806..3a11e4e 100644
--- a/modules/ve/ui/ve.ui.Frame.js
+++ b/modules/ve/ui/ve.ui.Frame.js
@@ -95,13 +95,16 @@
                try {
                        // MAGIC: only accessible when the stylesheet is loaded
                        rules = style.sheet.cssRules;
-                       // If that didn't throw an exception, we're done loading
-                       clearInterval( interval );
-                       // Protect against IE running interval one extra time 
after clearing
-                       if ( !this.initialized ) {
-                               initialize();
-                       }
-               } catch ( e ) { }
+               } catch ( e ) {
+                       // Try again in 10ms
+                       return;
+               }
+               // If that didn't throw an exception, we're done loading
+               clearInterval( interval );
+               // Protect against IE running interval one extra time after 
clearing
+               if ( !this.initialized ) {
+                       initialize();
+               }
        }, this ), 10 );
 
        // Properties

-- 
To view, visit https://gerrit.wikimedia.org/r/59973
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e0945f35c639ec156ee9a163b86fddfaed0ea7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to