mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 706283. Handle null passed to requestAnimationFrame gracefully. r=roc
This commit is contained in:
parent
1ab024c7fb
commit
064f52583c
6
dom/base/crashtests/706283-1.html
Normal file
6
dom/base/crashtests/706283-1.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
|
||||
window.mozRequestAnimationFrame(null);
|
||||
|
||||
</script>
|
@ -32,3 +32,4 @@ load 675621-1.html
|
||||
load 693894.html
|
||||
load 695867.html
|
||||
load 697643.html
|
||||
load 706283-1.html
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user