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

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

Issue 1194813003: Service Worker: Remove ServiceWorker.terminate() method (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (m_outerWorker->state() == WebServiceWorkerStateRedundant) { 56 if (m_outerWorker->state() == WebServiceWorkerStateRedundant) {
57 exceptionState.throwDOMException(InvalidStateError, "ServiceWorker is in redundant state."); 57 exceptionState.throwDOMException(InvalidStateError, "ServiceWorker is in redundant state.");
58 return; 58 return;
59 } 59 }
60 60
61 WebString messageString = message->toWireString(); 61 WebString messageString = message->toWireString();
62 OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePo rtChannelArray(channels.release()); 62 OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePo rtChannelArray(channels.release());
63 m_outerWorker->postMessage(messageString, webChannels.leakPtr()); 63 m_outerWorker->postMessage(messageString, webChannels.leakPtr());
64 } 64 }
65 65
66 void ServiceWorker::terminate(ExceptionState& exceptionState)
67 {
68 exceptionState.throwDOMException(InvalidAccessError, "Not supported.");
69 }
70
71 void ServiceWorker::internalsTerminate() 66 void ServiceWorker::internalsTerminate()
72 { 67 {
73 m_outerWorker->terminate(); 68 m_outerWorker->terminate();
74 } 69 }
75 70
76 void ServiceWorker::dispatchStateChangeEvent() 71 void ServiceWorker::dispatchStateChangeEvent()
77 { 72 {
78 this->dispatchEvent(Event::create(EventTypeNames::statechange)); 73 this->dispatchEvent(Event::create(EventTypeNames::statechange));
79 } 74 }
80 75
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 { 147 {
153 ASSERT(m_outerWorker); 148 ASSERT(m_outerWorker);
154 m_outerWorker->setProxy(this); 149 m_outerWorker->setProxy(this);
155 } 150 }
156 151
157 ServiceWorker::~ServiceWorker() 152 ServiceWorker::~ServiceWorker()
158 { 153 {
159 } 154 }
160 155
161 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.h ('k') | Source/modules/serviceworkers/ServiceWorker.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698