Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js

Issue 2040563002: Remove FileError interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fe-dep
Patch Set: handleEvent -> invoke and other review nits Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
index c3983ea4d269ff4848ec841f70ef86d88cf7a7bf..53330eaf1b6d70613d5325fc1ae61ec413b39a65 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
@@ -96,7 +96,7 @@ WebInspector.IsolatedFileSystem.create = function(manager, path, embedderPath, n
}
/**
- * @param {!FileError} error
+ * @param {!DOMException} error
* @return {string}
*/
WebInspector.IsolatedFileSystem.errorMessage = function(error)
@@ -216,7 +216,7 @@ WebInspector.IsolatedFileSystem.prototype = {
*/
function fileCreationError(error)
{
- if (error.code === FileError.INVALID_MODIFICATION_ERR) {
+ if (error.name === 'InvalidModificationError') {
dirEntryLoaded.call(this, dirEntry);
return;
}
@@ -264,6 +264,8 @@ WebInspector.IsolatedFileSystem.prototype = {
/**
* @param {!FileError} error
* @this {WebInspector.IsolatedFileSystem}
+ * @suppress {checkTypes}
+ * TODO(jsbell): Update externs replacing FileError with DOMException. https://crbug.com/496901
*/
function errorHandler(error)
{
@@ -322,7 +324,7 @@ WebInspector.IsolatedFileSystem.prototype = {
*/
function errorHandler(error)
{
- if (error.code === FileError.NOT_FOUND_ERR) {
+ if (error.name === 'NotFoundError') {
callback(null);
return;
}
@@ -436,7 +438,7 @@ WebInspector.IsolatedFileSystem.prototype = {
*/
function newFileEntryLoadErrorHandler(error)
{
- if (error.code !== FileError.NOT_FOUND_ERR) {
+ if (error.name !== 'NotFoundError') {
callback(false);
return;
}

Powered by Google App Engine
This is Rietveld 408576698