Bug 706283. Handle null passed to requestAnimationFrame gracefully. r=roc

This commit is contained in:
Boris Zbarsky 2011-12-01 14:24:00 -05:00
parent 1ab024c7fb
commit 064f52583c
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<script>
window.mozRequestAnimationFrame(null);
</script>

View File

@ -32,3 +32,4 @@ load 675621-1.html
load 693894.html
load 695867.html
load 697643.html
load 706283-1.html

View File

@ -3883,6 +3883,10 @@ nsGlobalWindow::MozRequestAnimationFrame(nsIFrameRequestCallback* aCallback)
return NS_OK;
}
if (!aCallback) {
return NS_ERROR_XPC_BAD_CONVERT_JS;
}
mDoc->ScheduleFrameRequestCallback(aCallback);
return NS_OK;
}