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: third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 ServiceWorkerContainerClient* client = 56 ServiceWorkerContainerClient* client =
57 ServiceWorkerContainerClient::from(getExecutionContext()); 57 ServiceWorkerContainerClient::from(getExecutionContext());
58 if (!client || !client->provider()) { 58 if (!client || !client->provider()) {
59 exceptionState.throwDOMException( 59 exceptionState.throwDOMException(
60 InvalidStateError, 60 InvalidStateError,
61 "Failed to post a message: No associated provider is available."); 61 "Failed to post a message: No associated provider is available.");
62 return; 62 return;
63 } 63 }
64 64
65 // Disentangle the port in preparation for sending it to the remote context. 65 // Disentangle the port in preparation for sending it to the remote context.
66 MessagePortChannelArray channels = 66 MessagePortChannelArray channels = MessagePort::disentanglePorts(
67 MessagePort::disentanglePorts(scriptState->getExecutionContext(), ports, 67 scriptState->getExecutionContext(), ports, exceptionState);
68 exceptionState);
69 if (exceptionState.hadException()) 68 if (exceptionState.hadException())
70 return; 69 return;
71 if (m_handle->serviceWorker()->state() == WebServiceWorkerStateRedundant) { 70 if (m_handle->serviceWorker()->state() == WebServiceWorkerStateRedundant) {
72 exceptionState.throwDOMException(InvalidStateError, 71 exceptionState.throwDOMException(InvalidStateError,
73 "ServiceWorker is in redundant state."); 72 "ServiceWorker is in redundant state.");
74 return; 73 return;
75 } 74 }
76 75
77 WebString messageString = message->toWireString(); 76 WebString messageString = message->toWireString();
78 WebMessagePortChannelArray webChannels = 77 WebMessagePortChannelArray webChannels =
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 m_handle->serviceWorker()->setProxy(this); 157 m_handle->serviceWorker()->setProxy(this);
159 } 158 }
160 159
161 ServiceWorker::~ServiceWorker() {} 160 ServiceWorker::~ServiceWorker() {}
162 161
163 DEFINE_TRACE(ServiceWorker) { 162 DEFINE_TRACE(ServiceWorker) {
164 AbstractWorker::trace(visitor); 163 AbstractWorker::trace(visitor);
165 } 164 }
166 165
167 } // namespace blink 166 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698