Chromium Code Reviews| Index: components/neterror/resources/offline.js |
| diff --git a/components/neterror/resources/offline.js b/components/neterror/resources/offline.js |
| index 005f4f3ae20dc570369df092d783a9e5bfec0e13..a1a3cd3c8b28c59eedf34003ab5eae56e957f31d 100644 |
| --- a/components/neterror/resources/offline.js |
| +++ b/components/neterror/resources/offline.js |
| @@ -292,7 +292,16 @@ Runner.prototype = { |
| this.spriteDef = Runner.spriteDefinition.LDPI; |
| } |
| - this.init(); |
| + if(!Runner.imageSprite.complete) { |
|
Eugene But (OOO till 7-30)
2016/07/13 05:28:57
Space after |if|
kkhorimoto
2016/07/13 17:54:53
Done.
|
| + // If the images are not yet loaded, add a listener. |
| + Runner.imageSprite.runner = this; |
| + |
| + Runner.imageSprite.onload = function() { |
| + this.runner.init(); |
| + } |
| + } else { |
| + this.init(); |
| + } |
| }, |
| /** |
| @@ -660,7 +669,9 @@ Runner.prototype = { |
| if (!this.activated) { |
| this.loadSounds(); |
| this.activated = true; |
| - errorPageController.trackEasterEgg(); |
| + if (window.errorPageController) { |
|
Eugene But (OOO till 7-30)
2016/07/13 05:28:57
Optional NIT: Maybe s/window.errorPageController/e
kkhorimoto
2016/07/13 17:54:53
Done.
|
| + errorPageController.trackEasterEgg(); |
| + } |
| } |
| if (!this.tRex.jumping && !this.tRex.ducking) { |