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

Unified Diff: pkg/analysis_server/lib/plugin/protocol/protocol.dart

Issue 1511833004: Validate that root paths are absolute and normalized. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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: pkg/analysis_server/lib/plugin/protocol/protocol.dart
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol.dart b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
index 5617efc873f260fdab4d0c44d70b4b6f96af1df8..9daa9f05583ecf684d85ab7c79e9439e69c606f0 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
@@ -441,6 +441,15 @@ class Response {
"Invalid execution context: $contextId"));
/**
+ * Initialize a newly created instance to represent the
+ * INVALID_FILE_PATH_FORMAT error condition.
+ */
+ Response.invalidFilePathFormat(Request request, path)
+ : this(request.id,
+ error: new RequestError(RequestErrorCode.INVALID_FILE_PATH_FORMAT,
+ 'Invalid file path format: $path'));
+
+ /**
* Initialize a newly created instance to represent an error condition caused
* by a [request] that had invalid parameter. [path] is the path to the
* invalid parameter, in Javascript notation (e.g. "foo.bar" means that the
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | pkg/analyzer/lib/src/util/absolute_path.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698