зеркало из https://github.com/mozilla/pjs.git
Bug 599966: Null check argument of window.createBlobURL to avoid crashing. r=sicking a=blocking-beta-8
--HG-- rename : content/base/test/test_bug543870.html => content/base/test/test_mozfiledataurl.html extra : rebase_source : 43ce51487370b415340cb18de74e5bf0e718067f
This commit is contained in:
Родитель
9691d05f38
Коммит
31138ce8d1
|
@ -21,6 +21,10 @@
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script class="testbody" type="application/javascript;version=1.8">
|
<script class="testbody" type="application/javascript;version=1.8">
|
||||||
|
|
||||||
|
try {
|
||||||
|
createBlobURL(undefined);
|
||||||
|
} catch(e) { }
|
||||||
|
|
||||||
window.addEventListener("message", function(e) {
|
window.addEventListener("message", function(e) {
|
||||||
gen.send(JSON.parse(e.data));
|
gen.send(JSON.parse(e.data));
|
||||||
}, false);
|
}, false);
|
||||||
|
|
|
@ -3068,6 +3068,8 @@ nsGlobalWindow::CreateBlobURL(nsIDOMFile* aFile, nsAString& aURL)
|
||||||
|
|
||||||
NS_ENSURE_STATE(mDoc);
|
NS_ENSURE_STATE(mDoc);
|
||||||
|
|
||||||
|
NS_ENSURE_ARG_POINTER(aFile);
|
||||||
|
|
||||||
nsresult rv = aFile->GetInternalUrl(mDoc->NodePrincipal(), aURL);
|
nsresult rv = aFile->GetInternalUrl(mDoc->NodePrincipal(), aURL);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче