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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerError.cpp

Issue 546353003: ServiceWorker: Change worker script fetch error code(1/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | public/platform/WebServiceWorkerError.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return DOMException::create(AbortError, "The Service Worker operation wa s aborted."); 48 return DOMException::create(AbortError, "The Service Worker operation wa s aborted.");
49 case WebServiceWorkerError::ErrorTypeSecurity: 49 case WebServiceWorkerError::ErrorTypeSecurity:
50 return DOMException::create(SecurityError, "The Service Worker security policy prevented an action."); 50 return DOMException::create(SecurityError, "The Service Worker security policy prevented an action.");
51 case WebServiceWorkerError::ErrorTypeInstall: 51 case WebServiceWorkerError::ErrorTypeInstall:
52 // FIXME: Introduce new InstallError type to ExceptionCodes? 52 // FIXME: Introduce new InstallError type to ExceptionCodes?
53 return DOMException::create(AbortError, "The Service Worker installation failed."); 53 return DOMException::create(AbortError, "The Service Worker installation failed.");
54 case WebServiceWorkerError::ErrorTypeActivate: 54 case WebServiceWorkerError::ErrorTypeActivate:
55 // Not currently returned as a promise rejection. 55 // Not currently returned as a promise rejection.
56 // FIXME: Introduce new ActivateError type to ExceptionCodes? 56 // FIXME: Introduce new ActivateError type to ExceptionCodes?
57 return DOMException::create(AbortError, "The Service Worker activation f ailed."); 57 return DOMException::create(AbortError, "The Service Worker activation f ailed.");
58 case WebServiceWorkerError::ErrorTypeNetwork:
59 return DOMException::create(NetworkError, "The Service Worker failed by network.");
58 case WebServiceWorkerError::ErrorTypeNotFound: 60 case WebServiceWorkerError::ErrorTypeNotFound:
59 return DOMException::create(NotFoundError, "The specified Service Worker resource was not found."); 61 return DOMException::create(NotFoundError, "The specified Service Worker resource was not found.");
60 case WebServiceWorkerError::ErrorTypeUnknown: 62 case WebServiceWorkerError::ErrorTypeUnknown:
61 return DOMException::create(UnknownError, "An unknown error occurred wit hin Service Worker."); 63 return DOMException::create(UnknownError, "An unknown error occurred wit hin Service Worker.");
62 } 64 }
63 ASSERT_NOT_REACHED(); 65 ASSERT_NOT_REACHED();
64 return DOMException::create(UnknownError); 66 return DOMException::create(UnknownError);
65 } 67 }
66 68
67 // static 69 // static
68 void ServiceWorkerError::dispose(WebType* webErrorRaw) 70 void ServiceWorkerError::dispose(WebType* webErrorRaw)
69 { 71 {
70 delete webErrorRaw; 72 delete webErrorRaw;
71 } 73 }
72 74
73 } // namespace blink 75 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | public/platform/WebServiceWorkerError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698