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

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

Issue 1979953002: Remove OwnPtr::release() calls in modules/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp » ('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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return; 63 return;
64 if (m_handle->serviceWorker()->state() == WebServiceWorkerStateRedundant) { 64 if (m_handle->serviceWorker()->state() == WebServiceWorkerStateRedundant) {
65 exceptionState.throwDOMException(InvalidStateError, "ServiceWorker is in redundant state."); 65 exceptionState.throwDOMException(InvalidStateError, "ServiceWorker is in redundant state.");
66 return; 66 return;
67 } 67 }
68 68
69 if (message->containsTransferableArrayBuffer()) 69 if (message->containsTransferableArrayBuffer())
70 context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, Warni ngMessageLevel, "ServiceWorker cannot send an ArrayBuffer as a transferable obje ct yet. See http://crbug.com/511119")); 70 context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, Warni ngMessageLevel, "ServiceWorker cannot send an ArrayBuffer as a transferable obje ct yet. See http://crbug.com/511119"));
71 71
72 WebString messageString = message->toWireString(); 72 WebString messageString = message->toWireString();
73 OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePo rtChannelArray(channels.release()); 73 OwnPtr<WebMessagePortChannelArray> webChannels = MessagePort::toWebMessagePo rtChannelArray(std::move(channels));
74 m_handle->serviceWorker()->postMessage(client->provider(), messageString, We bSecurityOrigin(getExecutionContext()->getSecurityOrigin()), webChannels.leakPtr ()); 74 m_handle->serviceWorker()->postMessage(client->provider(), messageString, We bSecurityOrigin(getExecutionContext()->getSecurityOrigin()), webChannels.leakPtr ());
75 } 75 }
76 76
77 void ServiceWorker::internalsTerminate() 77 void ServiceWorker::internalsTerminate()
78 { 78 {
79 m_handle->serviceWorker()->terminate(); 79 m_handle->serviceWorker()->terminate();
80 } 80 }
81 81
82 void ServiceWorker::dispatchStateChangeEvent() 82 void ServiceWorker::dispatchStateChangeEvent()
83 { 83 {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ServiceWorker::~ServiceWorker() 158 ServiceWorker::~ServiceWorker()
159 { 159 {
160 } 160 }
161 161
162 DEFINE_TRACE(ServiceWorker) 162 DEFINE_TRACE(ServiceWorker)
163 { 163 {
164 AbstractWorker::trace(visitor); 164 AbstractWorker::trace(visitor);
165 } 165 }
166 166
167 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698