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

Unified Diff: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h

Issue 2812513004: service worker: Clarify the navigation preload network error message. (Closed)
Patch Set: linebreak Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h
index ea19852d422082ff46be886ff6e8f9baccd4aa19..5f976c80abbf57f1be9938c404e3de37f3fbcb13 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerError.h
@@ -54,10 +54,22 @@ struct WebServiceWorkerError {
};
WebServiceWorkerError(ErrorType error_type, const WebString& message)
- : error_type(error_type), message(message) {}
+ : WebServiceWorkerError(error_type, message, WebString()) {}
+
+ WebServiceWorkerError(ErrorType error_type,
+ const WebString& message,
+ const WebString& unsanitized_message)
+ : error_type(error_type),
+ message(message),
+ unsanitized_message(unsanitized_message) {}
ErrorType error_type;
+ // |message| can be used to populate an error that's exposed to JavaScript.
+ // For service worker APIs, typically a promise will reject with this error.
WebString message;
+ // |unsanitized_message| can be used to add a more detailed error to
+ // console or other logging that shouldn't be exposed to JavaScript.
+ WebString unsanitized_message;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698