Skip to content

Commit

Permalink
Bug 1432949 - Return error if channel cannot be opened. Expand downlo…
Browse files Browse the repository at this point in the history
…ad blob test case r=geckoview-reviewers,snorp

Differential Revision: https://phabricator.services.mozilla.com/D75687
  • Loading branch information
owlishDeveloper committed Mar 9, 2021
1 parent 8a6e6ca commit 5f323ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<script>
const blob = new Blob(["Downloaded Data"], {type: "text/plain"});
const element = document.createElement("a");
element.href = URL.createObjectURL(blob);
const uri = URL.createObjectURL(blob);
element.href = uri;
element.download = "download.txt";
element.style.display = "none";
document.body.appendChild(element);
element.click();
URL.revokeObjectURL(uri);
</script>
</body>
</html>
4 changes: 1 addition & 3 deletions widget/android/WebExecutorSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ nsresult WebExecutorSupport::CreateStreamLoader(
NS_ENSURE_SUCCESS(rv, rv);

// Finally, open the channel
rv = channel->AsyncOpen(listener);

return NS_OK;
return channel->AsyncOpen(listener);
}

void WebExecutorSupport::Fetch(jni::Object::Param aRequest, int32_t aFlags,
Expand Down

0 comments on commit 5f323ed

Please sign in to comment.