[Native File System] Improve error reporting.
Don't try to force every error into a base::File::Error, instead have our own
enum and a custom error message. This should make it easier for web developers
to debug what is going on.
Also switches some DOMException constructor usage to using V8ThrowDOMException
which results in the exception messages actually being shown in dev-tools.
Bug: 971268, 991544
Change-Id: Id5128363bf5410ed08c1f4e65ebbe4b4bee93d7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1738654
Commit-Queue: Marijn Kruisselbrink <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688278}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 24cd1b19..53597e4 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1243,6 +1243,8 @@
"native_file_system/fixed_native_file_system_permission_grant.h",
"native_file_system/native_file_system_directory_handle_impl.cc",
"native_file_system/native_file_system_directory_handle_impl.h",
+ "native_file_system/native_file_system_error.cc",
+ "native_file_system/native_file_system_error.h",
"native_file_system/native_file_system_file_handle_impl.cc",
"native_file_system/native_file_system_file_handle_impl.h",
"native_file_system/native_file_system_file_writer_impl.cc",