Bug 1214054 - Don't fire DECODE_COMPLETE in VectorImage::OnSVGDocumentError(). r=dholbert
authorSeth Fowler <mark.seth.fowler@gmail.com>
Thu, 22 Oct 2015 23:29:38 -0700
changeset 269159 1c37c41d2efe2c9dedebd8055975385fcaa140d4
parent 269158 c3b7298d5ecab980e404d1e485ea4f45ed630afd
child 269160 154fa450fb1fa963799038c1e27794a002870ec2
push id67023
push usermfowler@mozilla.com
push dateFri, 23 Oct 2015 06:29:57 +0000
treeherdermozilla-inbound@154fa450fb1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1214054
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1214054 - Don't fire DECODE_COMPLETE in VectorImage::OnSVGDocumentError(). r=dholbert
image/ProgressTracker.h
image/VectorImage.cpp
--- a/image/ProgressTracker.h
+++ b/image/ProgressTracker.h
@@ -22,17 +22,22 @@ class nsIRunnable;
 
 namespace mozilla {
 namespace image {
 
 class AsyncNotifyRunnable;
 class AsyncNotifyCurrentStateRunnable;
 class Image;
 
-// Image progress bitflags.
+/**
+ * Image progress bitflags.
+ *
+ * See CheckProgressConsistency() for the invariants we enforce about the
+ * ordering dependencies betweeen these flags.
+ */
 enum {
   FLAG_SIZE_AVAILABLE     = 1u << 0,  // STATUS_SIZE_AVAILABLE
   FLAG_DECODE_COMPLETE    = 1u << 1,  // STATUS_DECODE_COMPLETE
   FLAG_FRAME_COMPLETE     = 1u << 2,  // STATUS_FRAME_COMPLETE
   FLAG_LOAD_COMPLETE      = 1u << 3,  // STATUS_LOAD_COMPLETE
   FLAG_ONLOAD_BLOCKED     = 1u << 4,
   FLAG_ONLOAD_UNBLOCKED   = 1u << 5,
   FLAG_IS_ANIMATED        = 1u << 6,  // STATUS_IS_ANIMATED
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -1220,19 +1220,17 @@ void
 VectorImage::OnSVGDocumentError()
 {
   CancelAllListeners();
 
   mError = true;
 
   if (mProgressTracker) {
     // Notify observers about the error and unblock page load.
-    Progress progress = FLAG_DECODE_COMPLETE |
-                        FLAG_ONLOAD_UNBLOCKED |
-                        FLAG_HAS_ERROR;
+    Progress progress = FLAG_ONLOAD_UNBLOCKED | FLAG_HAS_ERROR;
 
     // Merge in any saved progress from OnImageDataComplete.
     if (mLoadProgress) {
       progress |= *mLoadProgress;
       mLoadProgress = Nothing();
     }
 
     mProgressTracker->SyncNotifyProgress(progress);