OLD | NEW |
---|---|
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 return createException(NotSupportedError, "Service Worker support is dis abled.", webError->message); | 58 return createException(NotSupportedError, "Service Worker support is dis abled.", webError->message); |
59 case WebServiceWorkerError::ErrorTypeInstall: | 59 case WebServiceWorkerError::ErrorTypeInstall: |
60 // FIXME: Introduce new InstallError type to ExceptionCodes? | 60 // FIXME: Introduce new InstallError type to ExceptionCodes? |
61 return createException(AbortError, "The Service Worker installation fail ed.", webError->message); | 61 return createException(AbortError, "The Service Worker installation fail ed.", webError->message); |
62 case WebServiceWorkerError::ErrorTypeNetwork: | 62 case WebServiceWorkerError::ErrorTypeNetwork: |
63 return createException(NetworkError, "The Service Worker failed by netwo rk.", webError->message); | 63 return createException(NetworkError, "The Service Worker failed by netwo rk.", webError->message); |
64 case WebServiceWorkerError::ErrorTypeNotFound: | 64 case WebServiceWorkerError::ErrorTypeNotFound: |
65 return createException(NotFoundError, "The specified Service Worker reso urce was not found.", webError->message); | 65 return createException(NotFoundError, "The specified Service Worker reso urce was not found.", webError->message); |
66 case WebServiceWorkerError::ErrorTypeSecurity: | 66 case WebServiceWorkerError::ErrorTypeSecurity: |
67 return createException(SecurityError, "The Service Worker security polic y prevented an action.", webError->message); | 67 return createException(SecurityError, "The Service Worker security polic y prevented an action.", webError->message); |
68 case WebServiceWorkerError::ErrorTypeState: | |
69 return createException(InvalidStateError, "The Service Worker operation failed by invalid state.", webError->message); | |
mlamouri (slow - plz ping)
2015/01/23 10:08:08
nit: the error message doesn't sound correct but I
jsbell
2015/01/24 00:42:16
+1
Given the text in the specification leading to
jsbell
2015/01/24 01:15:01
Ah, since this is just the default message, and th
falken
2015/01/26 04:55:11
Right, jsbell's message is good. We've actually hi
xiang
2015/01/26 06:47:54
Done.
| |
68 case WebServiceWorkerError::ErrorTypeUnknown: | 70 case WebServiceWorkerError::ErrorTypeUnknown: |
69 return createException(UnknownError, "An unknown error occurred within S ervice Worker.", webError->message); | 71 return createException(UnknownError, "An unknown error occurred within S ervice Worker.", webError->message); |
70 } | 72 } |
71 ASSERT_NOT_REACHED(); | 73 ASSERT_NOT_REACHED(); |
72 return DOMException::create(UnknownError); | 74 return DOMException::create(UnknownError); |
73 } | 75 } |
74 | 76 |
75 // static | 77 // static |
76 void ServiceWorkerError::dispose(WebType* webErrorRaw) | 78 void ServiceWorkerError::dispose(WebType* webErrorRaw) |
77 { | 79 { |
78 delete webErrorRaw; | 80 delete webErrorRaw; |
79 } | 81 } |
80 | 82 |
81 } // namespace blink | 83 } // namespace blink |
OLD | NEW |