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:
@@ -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)");
|
||||
|
||||
Reference in New Issue
Block a user