Set identity instead of crash in opt build (flutter/engine#9262)

According to https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#expectations-around-potential-crashes-in-the-engine

This should address https://github.com/flutter/flutter/issues/31650#issuecomment-494935507

We'll instead use `FML_LOG(ERROR)` to report errors to our CI tests. See https://github.com/flutter/flutter/issues/34194
This commit is contained in:
liyuqian
2019-06-13 09:35:54 -07:00
committed by GitHub
parent 30d1f5574e
commit 4b958d852b

View File

@@ -17,7 +17,11 @@ TransformLayer::TransformLayer(const SkMatrix& transform)
//
// We have to write this flaky test because there is no reliable way to test
// whether a variable is initialized or not in C++.
FML_CHECK(transform_.isFinite());
FML_DCHECK(transform_.isFinite());
if (!transform_.isFinite()) {
FML_LOG(ERROR) << "TransformLayer is constructed with an invalid matrix.";
transform_.setIdentity();
}
}
TransformLayer::~TransformLayer() = default;