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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 | 116 |
117 class UndefinedValue { | 117 class UndefinedValue { |
118 public: | 118 public: |
119 typedef WebServiceWorker WebType; | 119 typedef WebServiceWorker WebType; |
120 static V8UndefinedType from(ScriptPromiseResolver* resolver, WebServiceWorke
r* worker) | 120 static V8UndefinedType from(ScriptPromiseResolver* resolver, WebServiceWorke
r* worker) |
121 { | 121 { |
122 ASSERT(!worker); // Anything passed here will be leaked. | 122 ASSERT(!worker); // Anything passed here will be leaked. |
123 return V8UndefinedType(); | 123 return V8UndefinedType(); |
124 } | 124 } |
| 125 static void dispose(WebServiceWorker* worker) |
| 126 { |
| 127 ASSERT(!worker); // Anything passed here will be leaked. |
| 128 } |
125 | 129 |
126 private: | 130 private: |
127 UndefinedValue(); | 131 UndefinedValue(); |
128 }; | 132 }; |
129 | 133 |
130 ScriptPromise ServiceWorkerContainer::unregisterServiceWorker(ScriptState* scrip
tState, const String& pattern) | 134 ScriptPromise ServiceWorkerContainer::unregisterServiceWorker(ScriptState* scrip
tState, const String& pattern) |
131 { | 135 { |
132 ASSERT(RuntimeEnabledFeatures::serviceWorkerEnabled()); | 136 ASSERT(RuntimeEnabledFeatures::serviceWorkerEnabled()); |
133 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | 137 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); |
134 ScriptPromise promise = resolver->promise(); | 138 ScriptPromise promise = resolver->promise(); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 m_ready = createReadyProperty(); | 259 m_ready = createReadyProperty(); |
256 | 260 |
257 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro
m(executionContext)) { | 261 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro
m(executionContext)) { |
258 m_provider = client->provider(); | 262 m_provider = client->provider(); |
259 if (m_provider) | 263 if (m_provider) |
260 m_provider->setClient(this); | 264 m_provider->setClient(this); |
261 } | 265 } |
262 } | 266 } |
263 | 267 |
264 } // namespace WebCore | 268 } // namespace WebCore |
OLD | NEW |