mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Fix 2 crashers found by Hixie's fuzzer.
The first one is that we weren't setting up a FontCachePurgePreventer during drawText. It's not clear that this is the correct fix, since Blink doesn't have this FontCachePurgePreventer here either, but it's also possible that they would hit this same ASSERT and just not care (since ASSERTs are disabled on clusterfuzz). The second fix is making ExceptionState actually track whether it has thrown an exception or not. The c++ code was depending on this working in order to return early from dom functions and not crash! R=abarth@google.com
This commit is contained in:
parent
9da399b0e1
commit
8f85f34d27
|
@ -48,9 +48,12 @@ void doFrame(double timeStamp) {
|
|||
node = root;
|
||||
} else if (node != root && other != null && pickThis(0.1)) {
|
||||
report("insertBefore()");
|
||||
node.insertBefore([other]);
|
||||
try {
|
||||
node.insertBefore([other]);
|
||||
} catch (_) {
|
||||
}
|
||||
break;
|
||||
} else if (pickThis(0.001)) {
|
||||
} else if (node != root && pickThis(0.001)) {
|
||||
report("remove()");
|
||||
node.remove();
|
||||
} else if (node is sky.Element) {
|
||||
|
@ -148,7 +151,7 @@ void doFrame(double timeStamp) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
assert(node is sky.Text); //
|
||||
assert(node is sky.Text);
|
||||
final sky.Text text = node;
|
||||
if (pickThis(0.1)) {
|
||||
report("appending a new text node (ASCII)");
|
||||
|
|
Loading…
Reference in a new issue