Changeset 221392 in webkit
- Timestamp:
- Aug 30, 2017 12:40:35 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 27 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r221386 r221392 1 2017-08-30 Brady Eidson <beidson@apple.com> 2 3 Implement all of "Register" right up until where the script is fetched. 4 https://bugs.webkit.org/show_bug.cgi?id=176082 5 6 Reviewed by Andy Estes. 7 8 * http/tests/workers/service/basic-register-exceptions-expected.txt: Added. 9 * http/tests/workers/service/basic-register-exceptions.html: Added. 10 * http/tests/workers/service/resources/basic-register-exceptions.js: Added. 11 1 12 2017-08-22 Matt Rajca <mrajca@apple.com> 2 13 -
trunk/Source/WebCore/CMakeLists.txt
r221340 r221392 3020 3020 workers/service/ServiceWorkerProvider.cpp 3021 3021 workers/service/ServiceWorkerRegistration.cpp 3022 workers/service/ServiceWorkerRegistrationData.cpp 3022 3023 workers/service/ServiceWorkerRegistrationKey.cpp 3023 3024 workers/service/ServiceWorkerRegistrationOptions.cpp … … 3026 3027 workers/service/server/SWServer.cpp 3027 3028 workers/service/server/SWServerRegistration.cpp 3029 workers/service/server/SWServerWorker.cpp 3028 3030 3029 3031 xml/DOMParser.cpp -
trunk/Source/WebCore/ChangeLog
r221387 r221392 1 2017-08-30 Brady Eidson <beidson@apple.com> 2 3 Implement all of "Register" right up until where the script is fetched. 4 https://bugs.webkit.org/show_bug.cgi?id=176082 5 6 Reviewed by Andy Estes. 7 8 Test: http/tests/workers/service/basic-register-exceptions.html 9 10 This patch implements every detail of the "Register" and "Update" algorithms right up to 11 where we would actually fetch the service worker script file. 12 13 It also includes miscellaneous refactoring and cleanup along the way. 14 15 * CMakeLists.txt: 16 * WebCore.xcodeproj/project.pbxproj: 17 18 * page/SecurityOrigin.cpp: 19 (WebCore::shouldTreatAsPotentiallyTrustworthy): Expose in the header for other files to use. 20 * page/SecurityOrigin.h: 21 22 * workers/service/ServiceWorkerContainer.cpp: 23 (WebCore::ServiceWorkerContainer::addRegistration): Add some more exception cases from the spec. 24 (WebCore::ServiceWorkerContainer::scheduleJob): Use the correct job identifier. 25 (WebCore::ServiceWorkerContainer::jobFailedWithException): 26 (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): 27 (WebCore::ServiceWorkerContainer::jobDidFinish): 28 * workers/service/ServiceWorkerContainer.h: 29 30 * workers/service/ServiceWorkerJob.cpp: 31 (WebCore::ServiceWorkerJob::ServiceWorkerJob): 32 (WebCore::ServiceWorkerJob::failedWithException): Call through to the client to handle the failure. 33 (WebCore::ServiceWorkerJob::resolvedWithRegistration): Call through to the client to handle success. 34 * workers/service/ServiceWorkerJob.h: 35 (WebCore::ServiceWorkerJob::promise): 36 (WebCore::ServiceWorkerJob::identifier const): Deleted. Rely on the identifier from the JobData. 37 38 * workers/service/ServiceWorkerJobClient.h: 39 40 * workers/service/ServiceWorkerJobData.cpp: 41 (WebCore::ServiceWorkerJobData::ServiceWorkerJobData): 42 (WebCore::ServiceWorkerJobData::isolatedCopy const): 43 * workers/service/ServiceWorkerJobData.h: 44 (WebCore::ServiceWorkerJobData::identifier const): 45 (WebCore::ServiceWorkerJobData::encode const): 46 (WebCore::ServiceWorkerJobData::decode): 47 (WebCore::ServiceWorkerJobData::jobIdentifier const): Deleted. 48 49 * workers/service/ServiceWorkerRegistration.cpp: 50 (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): Make this class an ActiveDOMObject 51 both because it *is* an active DOM object and because we need to get at the ScriptExecutionContext. 52 * workers/service/ServiceWorkerRegistration.h: 53 54 Add a class to encapsulate everything about a registration for encode/decode/crossthread: 55 * workers/service/ServiceWorkerRegistrationData.cpp: 56 (WebCore::ServiceWorkerRegistrationData::isolatedCopy const): 57 * workers/service/ServiceWorkerRegistrationData.h: 58 (WebCore::ServiceWorkerRegistrationData::encode const): 59 (WebCore::ServiceWorkerRegistrationData::decode): 60 61 * workers/service/ServiceWorkerRegistrationKey.cpp: 62 (WebCore::ServiceWorkerRegistrationKey::isolatedCopy const): 63 * workers/service/ServiceWorkerRegistrationKey.h: 64 (WebCore::ServiceWorkerRegistrationKey::encode const): 65 (WebCore::ServiceWorkerRegistrationKey::decode): 66 67 * workers/service/server/SWClientConnection.cpp: 68 (WebCore::SWClientConnection::scheduleJob): 69 (WebCore::SWClientConnection::jobResolvedInServer): 70 * workers/service/server/SWClientConnection.h: 71 72 * workers/service/server/SWServer.cpp: 73 (WebCore::SWServer::~SWServer): 74 (WebCore::SWServer::Connection::scheduleJobInServer): 75 (WebCore::SWServer::scheduleJob): 76 (WebCore::SWServer::rejectJob): 77 (WebCore::SWServer::resolveJob): 78 * workers/service/server/SWServer.h: 79 80 * workers/service/server/SWServerRegistration.cpp: 81 (WebCore::SWServerRegistration::SWServerRegistration): 82 (WebCore::SWServerRegistration::startNextJob): 83 (WebCore::SWServerRegistration::isEmpty): 84 (WebCore::SWServerRegistration::getNewestWorker): Implement "Get Newest Worker" algorithm. 85 (WebCore::SWServerRegistration::runRegisterJob): Implement the rest of the "Register" algorithm. 86 (WebCore::SWServerRegistration::runUpdateJob): Implement every part of "Update" up to where we would fetch. 87 (WebCore::SWServerRegistration::rejectWithExceptionOnMainThread): 88 (WebCore::SWServerRegistration::resolveWithRegistrationOnMainThread): 89 (WebCore::SWServerRegistration::resolveCurrentJob): 90 (WebCore::SWServerRegistration::data const): 91 (WebCore::SWServerRegistration::performCurrentJob): Deleted. 92 * workers/service/server/SWServerRegistration.h: 93 (WebCore::SWServerRegistration::identifier const): 94 95 Add a stub class to represent "active service workers" in the SWServer: 96 * workers/service/server/SWServerWorker.cpp: 97 (WebCore::SWServerWorker::SWServerWorker): 98 (WebCore::SWServerWorker::~SWServerWorker): 99 * workers/service/server/SWServerWorker.h: 100 (WebCore::SWServerWorker::scriptURL const): 101 1 102 2017-08-30 Don Olmstead <don.olmstead@sony.com> 2 103 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r221329 r221392 2302 2302 517A53281F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A53271F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.cpp */; }; 2303 2303 517A53291F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A53261F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2304 517A53451F50C17F00DCDC0A /* SWServerWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A53431F50C16100DCDC0A /* SWServerWorker.cpp */; }; 2305 517A53461F50C17F00DCDC0A /* SWServerWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A53421F50C16100DCDC0A /* SWServerWorker.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2306 517A534E1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A534B1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.cpp */; }; 2307 517A534F1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A534C1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2304 2308 517A63C31B74318700E7DCDC /* KeyedDecoderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A63BF1B74317E00E7DCDC /* KeyedDecoderCF.cpp */; }; 2305 2309 517A63C41B74318B00E7DCDC /* KeyedEncoderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A63C11B74317E00E7DCDC /* KeyedEncoderCF.cpp */; }; … … 10123 10127 517A53261F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerRegistrationKey.h; sourceTree = "<group>"; }; 10124 10128 517A53271F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerRegistrationKey.cpp; sourceTree = "<group>"; }; 10129 517A53421F50C16100DCDC0A /* SWServerWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWServerWorker.h; sourceTree = "<group>"; }; 10130 517A53431F50C16100DCDC0A /* SWServerWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SWServerWorker.cpp; sourceTree = "<group>"; }; 10131 517A534B1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerRegistrationData.cpp; sourceTree = "<group>"; }; 10132 517A534C1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerRegistrationData.h; sourceTree = "<group>"; }; 10125 10133 517A63BF1B74317E00E7DCDC /* KeyedDecoderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedDecoderCF.cpp; sourceTree = "<group>"; }; 10126 10134 517A63C01B74317E00E7DCDC /* KeyedDecoderCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedDecoderCF.h; sourceTree = "<group>"; }; … … 18759 18767 51F645951F4A686100B54DED /* SWServerRegistration.cpp */, 18760 18768 51F645941F4A684F00B54DED /* SWServerRegistration.h */, 18769 517A53431F50C16100DCDC0A /* SWServerWorker.cpp */, 18770 517A53421F50C16100DCDC0A /* SWServerWorker.h */, 18761 18771 ); 18762 18772 path = server; … … 18864 18874 51F1754C1F3EBC0C00C74950 /* ServiceWorkerRegistration.h */, 18865 18875 51F1754B1F3EBC0C00C74950 /* ServiceWorkerRegistration.idl */, 18876 517A534B1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.cpp */, 18877 517A534C1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.h */, 18866 18878 517A53271F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.cpp */, 18867 18879 517A53261F4B90B200DCDC0A /* ServiceWorkerRegistrationKey.h */, … … 29710 29722 51F175661F3EBC8300C74950 /* ServiceWorkerProvider.h in Headers */, 29711 29723 51F175681F3EBC8300C74950 /* ServiceWorkerRegistration.h in Headers */, 29724 517A534F1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.h in Headers */, 29712 29725 517A53291F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.h in Headers */, 29713 29726 51F175691F3EBC8300C74950 /* ServiceWorkerRegistrationOptions.h in Headers */, … … 30131 30144 517A52F01F47535B00DCDC0A /* SWServer.h in Headers */, 30132 30145 51F645971F4A686F00B54DED /* SWServerRegistration.h in Headers */, 30146 517A53461F50C17F00DCDC0A /* SWServerWorker.h in Headers */, 30133 30147 E180811716FCF9CB00B80D07 /* SynchronousLoaderClient.h in Headers */, 30134 30148 26FAE4CF1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.h in Headers */, … … 33601 33615 51F175651F3EBC8300C74950 /* ServiceWorkerProvider.cpp in Sources */, 33602 33616 51F175671F3EBC8300C74950 /* ServiceWorkerRegistration.cpp in Sources */, 33617 517A534E1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.cpp in Sources */, 33603 33618 517A53281F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.cpp in Sources */, 33604 33619 51F645A21F4BF53C00B54DED /* ServiceWorkerRegistrationOptions.cpp in Sources */, … … 33908 33923 517A52F11F4754E700DCDC0A /* SWServer.cpp in Sources */, 33909 33924 51F645961F4A686F00B54DED /* SWServerRegistration.cpp in Sources */, 33925 517A53451F50C17F00DCDC0A /* SWServerWorker.cpp in Sources */, 33910 33926 E180811216FCF42F00B80D07 /* SynchronousLoaderClient.cpp in Sources */, 33911 33927 E180811616FCF9CB00B80D07 /* SynchronousLoaderClient.mm in Sources */, -
trunk/Source/WebCore/page/SecurityOrigin.cpp
r221334 r221392 124 124 125 125 // https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy (Editor's Draft, 17 November 2016) 126 staticbool shouldTreatAsPotentiallyTrustworthy(const URL& url)126 bool shouldTreatAsPotentiallyTrustworthy(const URL& url) 127 127 { 128 128 if (!url.isValid()) -
trunk/Source/WebCore/page/SecurityOrigin.h
r221334 r221392 235 235 }; 236 236 237 bool shouldTreatAsPotentiallyTrustworthy(const URL&); 238 237 239 // Returns true if the Origin header values serialized from these two origins would be the same. 238 240 bool originsMatch(const SecurityOrigin&, const SecurityOrigin&); -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp
r221198 r221392 30 30 31 31 #include "Exception.h" 32 #include "IDLTypes.h" 32 33 #include "JSDOMPromiseDeferred.h" 34 #include "JSServiceWorkerRegistration.h" 33 35 #include "NavigatorBase.h" 36 #include "ScopeGuard.h" 34 37 #include "ScriptExecutionContext.h" 35 38 #include "SecurityOrigin.h" … … 105 108 String path = jobData.scriptURL.path(); 106 109 if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) { 107 promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a script URL whose path does not contain '% %2f' or '%%5c'") });110 promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'") }); 108 111 return; 109 112 } … … 113 116 jobData.scopeURL = context->completeURL(scope); 114 117 118 if (!jobData.scopeURL.isNull() && !jobData.scopeURL.protocolIsInHTTPFamily()) { 119 promise->reject(Exception { TypeError, ASCIILiteral("Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS") }); 120 return; 121 } 122 123 path = jobData.scopeURL.path(); 124 if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) { 125 promise->reject(Exception { TypeError, ASCIILiteral("Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'") }); 126 return; 127 } 128 115 129 jobData.clientCreationURL = context->url(); 116 130 jobData.topOrigin = SecurityOriginData::fromSecurityOrigin(context->topOrigin()); 117 131 jobData.type = ServiceWorkerJobType::Register; 118 jobData.registrationOptions = std::make_unique<RegistrationOptions>(options);132 jobData.registrationOptions = options; 119 133 120 134 scheduleJob(ServiceWorkerJob::create(*this, WTFMove(promise), WTFMove(jobData))); … … 126 140 127 141 ServiceWorkerJob& rawJob = job.get(); 128 auto result = m_jobMap.add(rawJob. identifier(), WTFMove(job));142 auto result = m_jobMap.add(rawJob.data().identifier(), WTFMove(job)); 129 143 ASSERT_UNUSED(result, result.isNewEntry); 130 144 … … 146 160 } 147 161 162 void ServiceWorkerContainer::jobFailedWithException(ServiceWorkerJob& job, const Exception& exception) 163 { 164 job.promise().reject(exception); 165 jobDidFinish(job); 166 } 167 168 void ServiceWorkerContainer::jobResolvedWithRegistration(ServiceWorkerJob& job, const ServiceWorkerRegistrationData& data) 169 { 170 ScopeGuard guard([this, &job] { 171 jobDidFinish(job); 172 }); 173 174 auto* context = scriptExecutionContext(); 175 if (!context) { 176 LOG_ERROR("ServiceWorkerContainer::jobResolvedWithRegistration called but the containers ScriptExecutionContext is gone"); 177 return; 178 } 179 180 auto registration = ServiceWorkerRegistration::create(*context, data); 181 job.promise().resolve<IDLInterface<ServiceWorkerRegistration>>(registration.get()); 182 } 183 148 184 void ServiceWorkerContainer::jobDidFinish(ServiceWorkerJob& job) 149 185 { 150 auto taken = m_jobMap.take(job. identifier());186 auto taken = m_jobMap.take(job.data().identifier()); 151 187 ASSERT_UNUSED(taken, taken.get() == &job); 152 188 } -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h
r221198 r221392 71 71 private: 72 72 void scheduleJob(Ref<ServiceWorkerJob>&&); 73 void jobDidFinish(ServiceWorkerJob&) final; 73 74 void jobFailedWithException(ServiceWorkerJob&, const Exception&) final; 75 void jobResolvedWithRegistration(ServiceWorkerJob&, const ServiceWorkerRegistrationData&) final; 76 void jobDidFinish(ServiceWorkerJob&); 77 74 78 uint64_t connectionIdentifier() final; 75 79 -
trunk/Source/WebCore/workers/service/ServiceWorkerJob.cpp
r221198 r221392 31 31 #include "JSDOMPromiseDeferred.h" 32 32 #include "ServiceWorkerJobData.h" 33 #include "ServiceWorkerRegistration.h" 33 34 34 35 namespace WebCore { 35 36 static std::atomic<uint64_t> currentIdentifier;37 36 38 37 ServiceWorkerJob::ServiceWorkerJob(ServiceWorkerJobClient& client, Ref<DeferredPromise>&& promise, ServiceWorkerJobData&& jobData) … … 40 39 , m_jobData(WTFMove(jobData)) 41 40 , m_promise(WTFMove(promise)) 42 , m_identifier(++currentIdentifier)43 41 { 44 42 } … … 52 50 { 53 51 ASSERT(currentThread() == m_creationThread); 52 ASSERT(!m_completed); 54 53 54 m_completed = true; 55 m_client->jobFailedWithException(*this, exception); 56 } 57 58 void ServiceWorkerJob::resolvedWithRegistration(const ServiceWorkerRegistrationData& data) 59 { 60 ASSERT(currentThread() == m_creationThread); 55 61 ASSERT(!m_completed); 56 m_promise->reject(exception); 62 57 63 m_completed = true; 58 59 // Can cause this to be deleted. 60 m_client->jobDidFinish(*this); 64 m_client->jobResolvedWithRegistration(*this, data); 61 65 } 62 66 -
trunk/Source/WebCore/workers/service/ServiceWorkerJob.h
r221198 r221392 40 40 class Exception; 41 41 enum class ServiceWorkerJobType; 42 struct ServiceWorkerRegistrationData; 42 43 43 44 class ServiceWorkerJob : public ThreadSafeRefCounted<ServiceWorkerJob> { … … 50 51 WEBCORE_EXPORT ~ServiceWorkerJob(); 51 52 52 WEBCORE_EXPORT void failedWithException(const Exception&); 53 54 uint64_t identifier() const { return m_identifier; } 53 void failedWithException(const Exception&); 54 void resolvedWithRegistration(const ServiceWorkerRegistrationData&); 55 55 56 56 ServiceWorkerJobData data() const { return m_jobData; } 57 DeferredPromise& promise() { return m_promise.get(); } 57 58 58 59 private: … … 64 65 65 66 bool m_completed { false }; 66 uint64_t m_identifier;67 67 68 68 Ref<RunLoop> m_runLoop { RunLoop::current() }; -
trunk/Source/WebCore/workers/service/ServiceWorkerJobClient.h
r221198 r221392 30 30 namespace WebCore { 31 31 32 class Exception; 32 33 class ServiceWorkerJob; 34 struct ServiceWorkerRegistrationData; 33 35 34 36 class ServiceWorkerJobClient { … … 36 38 virtual ~ServiceWorkerJobClient() { }; 37 39 38 virtual void jobDidFinish(ServiceWorkerJob&) = 0; 40 virtual void jobFailedWithException(ServiceWorkerJob&, const Exception&) = 0; 41 virtual void jobResolvedWithRegistration(ServiceWorkerJob&, const ServiceWorkerRegistrationData&) = 0; 42 39 43 virtual uint64_t connectionIdentifier() = 0; 40 44 -
trunk/Source/WebCore/workers/service/ServiceWorkerJobData.cpp
r221198 r221392 48 48 scopeURL = other.scopeURL; 49 49 type = other.type; 50 51 if (other.registrationOptions) 52 registrationOptions = std::make_unique<RegistrationOptions>(*other.registrationOptions); 50 registrationOptions = other.registrationOptions; 53 51 } 54 52 … … 69 67 result.topOrigin = topOrigin.isolatedCopy(); 70 68 result.scopeURL = scopeURL.isolatedCopy(); 69 result.registrationOptions = registrationOptions.isolatedCopy(); 71 70 72 if (registrationOptions)73 result.registrationOptions = std::make_unique<RegistrationOptions>(registrationOptions->isolatedCopy());74 71 return result; 75 72 } -
trunk/Source/WebCore/workers/service/ServiceWorkerJobData.h
r221198 r221392 42 42 ServiceWorkerJobData() = default; 43 43 44 uint64_t jobIdentifier() const { return m_jobIdentifier; }44 uint64_t identifier() const { return m_jobIdentifier; } 45 45 uint64_t connectionIdentifier() const { return m_connectionIdentifier; } 46 46 … … 51 51 ServiceWorkerJobType type; 52 52 53 std::unique_ptr<RegistrationOptions>registrationOptions;53 RegistrationOptions registrationOptions; 54 54 55 55 ServiceWorkerRegistrationKey registrationKey() const; … … 71 71 switch (type) { 72 72 case ServiceWorkerJobType::Register: 73 RELEASE_ASSERT(registrationOptions); 74 encoder << *registrationOptions; 73 encoder << registrationOptions; 75 74 break; 76 75 } … … 97 96 switch (jobData.type) { 98 97 case ServiceWorkerJobType::Register: 99 jobData.registrationOptions = std::make_unique<RegistrationOptions>(); 100 if (!decoder.decode(*jobData.registrationOptions)) 98 if (!decoder.decode(jobData.registrationOptions)) 101 99 return false; 102 100 break; -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp
r220623 r221392 30 30 31 31 namespace WebCore { 32 33 ServiceWorkerRegistration::ServiceWorkerRegistration(ScriptExecutionContext& context, const ServiceWorkerRegistrationData& registrationData) 34 : ActiveDOMObject(&context) 35 , m_registrationData(registrationData) 36 { 37 suspendIfNeeded(); 38 } 32 39 33 40 ServiceWorker* ServiceWorkerRegistration::installing() -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.h
r220623 r221392 28 28 #if ENABLE(SERVICE_WORKER) 29 29 30 #include "ActiveDOMObject.h" 30 31 #include "EventTarget.h" 31 32 #include "JSDOMPromiseDeferred.h" 33 #include "ServiceWorkerRegistrationData.h" 32 34 33 35 namespace WebCore { 34 36 35 class Frame;37 class ScriptExecutionContext; 36 38 class ServiceWorker; 37 39 38 class ServiceWorkerRegistration final : public EventTargetWithInlineData {40 class ServiceWorkerRegistration final : public EventTargetWithInlineData, public ActiveDOMObject { 39 41 public: 40 42 enum class UpdateViaCache { … … 44 46 }; 45 47 46 static Ref<ServiceWorkerRegistration> create(Frame& frame) { return adoptRef(*new ServiceWorkerRegistration(frame)); } 48 static Ref<ServiceWorkerRegistration> create(ScriptExecutionContext& context, const ServiceWorkerRegistrationData& data) 49 { 50 return adoptRef(*new ServiceWorkerRegistration(context, data)); 51 } 52 47 53 virtual ~ServiceWorkerRegistration() = default; 48 54 … … 58 64 59 65 private: 60 explicit ServiceWorkerRegistration(Frame&);66 ServiceWorkerRegistration(ScriptExecutionContext&, const ServiceWorkerRegistrationData&); 61 67 62 68 virtual EventTargetInterface eventTargetInterface() const; … … 64 70 void refEventTarget() final { ref(); } 65 71 void derefEventTarget() final { deref(); } 72 73 const char* activeDOMObjectName() const { return "ServiceWorkerRegistration"; } 74 bool canSuspendForDocumentSuspension() const { return false; } 75 76 ServiceWorkerRegistrationData m_registrationData; 66 77 }; 67 78 -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationData.cpp
r221388 r221392 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "ServiceWorkerRegistrationData.h" 27 28 28 29 #if ENABLE(SERVICE_WORKER) … … 30 31 namespace WebCore { 31 32 32 class ServiceWorkerJob; 33 ServiceWorkerRegistrationData ServiceWorkerRegistrationData::isolatedCopy() const 34 { 35 ServiceWorkerRegistrationData result; 36 result.key = key.isolatedCopy(); 37 result.identifier = identifier; 38 return result; 39 } 33 40 34 class ServiceWorkerJobClient { 35 public: 36 virtual ~ServiceWorkerJobClient() { }; 37 38 virtual void jobDidFinish(ServiceWorkerJob&) = 0; 39 virtual uint64_t connectionIdentifier() = 0; 40 41 virtual void ref() = 0; 42 virtual void deref() = 0; 43 }; 44 45 } // namespace WebCore 41 } // namespace WTF 46 42 47 43 #endif // ENABLE(SERVICE_WORKER) -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationData.h
r221388 r221392 24 24 */ 25 25 26 #include "config.h" 27 #include "ServiceWorkerRegistrationKey.h" 26 #pragma once 28 27 29 28 #if ENABLE(SERVICE_WORKER) 30 29 31 #include " URLHash.h"30 #include "ServiceWorkerRegistrationKey.h" 32 31 33 32 namespace WebCore { 34 33 35 ServiceWorkerRegistrationKey ServiceWorkerRegistrationKey::emptyKey() 34 struct ServiceWorkerRegistrationData { 35 ServiceWorkerRegistrationKey key; 36 uint64_t identifier; 37 38 ServiceWorkerRegistrationData isolatedCopy() const; 39 40 template<class Encoder> void encode(Encoder&) const; 41 template<class Decoder> static bool decode(Decoder&, ServiceWorkerRegistrationData&); 42 }; 43 44 45 template<class Encoder> 46 void ServiceWorkerRegistrationData::encode(Encoder& encoder) const 36 47 { 37 return { };48 encoder << key << identifier; 38 49 } 39 50 40 unsigned ServiceWorkerRegistrationKey::hash() const 51 template<class Decoder> 52 bool ServiceWorkerRegistrationData::decode(Decoder& decoder, ServiceWorkerRegistrationData& data) 41 53 { 42 unsigned hashes[2]; 43 hashes[0] = URLHash::hash(clientCreationURL); 44 hashes[1] = SecurityOriginDataHash::hash(topOrigin); 54 if (!decoder.decode(data.key)) 55 return false; 56 if (!decoder.decodeEnum(data.identifier)) 57 return false; 45 58 46 return StringHasher::hashMemory(hashes, sizeof(hashes));59 return true; 47 60 } 48 61 49 bool ServiceWorkerRegistrationKey::operator==(const ServiceWorkerRegistrationKey& other) const 50 { 51 return clientCreationURL == other.clientCreationURL && topOrigin == other.topOrigin; 52 } 53 54 } // namespace WebCore 62 } // namespace WTF 55 63 56 64 #endif // ENABLE(SERVICE_WORKER) -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp
r221198 r221392 52 52 } 53 53 54 ServiceWorkerRegistrationKey ServiceWorkerRegistrationKey::isolatedCopy() const 55 { 56 ServiceWorkerRegistrationKey result; 57 result.clientCreationURL = clientCreationURL.isolatedCopy(); 58 result.topOrigin = topOrigin.isolatedCopy(); 59 return result; 60 } 61 54 62 } // namespace WebCore 55 63 -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h
r221198 r221392 41 41 42 42 bool operator==(const ServiceWorkerRegistrationKey&) const; 43 44 ServiceWorkerRegistrationKey isolatedCopy() const; 45 46 template<class Encoder> void encode(Encoder&) const; 47 template<class Decoder> static bool decode(Decoder&, ServiceWorkerRegistrationKey&); 43 48 }; 49 50 template<class Encoder> 51 void ServiceWorkerRegistrationKey::encode(Encoder& encoder) const 52 { 53 encoder << clientCreationURL << topOrigin; 54 } 55 56 template<class Decoder> 57 bool ServiceWorkerRegistrationKey::decode(Decoder& decoder, ServiceWorkerRegistrationKey& key) 58 { 59 if (!decoder.decode(key.clientCreationURL)) 60 return false; 61 if (!decoder.decode(key.topOrigin)) 62 return false; 63 64 return true; 65 } 44 66 45 67 } // namespace WebCore -
trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp
r220977 r221392 44 44 void SWClientConnection::scheduleJob(ServiceWorkerJob& job) 45 45 { 46 auto addResult = m_scheduledJobs.add(job. identifier(), &job);46 auto addResult = m_scheduledJobs.add(job.data().identifier(), &job); 47 47 ASSERT_UNUSED(addResult, addResult.isNewEntry); 48 48 … … 61 61 } 62 62 63 void SWClientConnection::jobResolvedInServer(uint64_t jobIdentifier, const ServiceWorkerRegistrationData& registrationData) 64 { 65 auto job = m_scheduledJobs.take(jobIdentifier); 66 if (!job) { 67 LOG_ERROR("Job %" PRIu64 " resolved in server, but was not found", jobIdentifier); 68 return; 69 } 70 71 job->resolvedWithRegistration(registrationData); 72 } 73 63 74 } // namespace WebCore 64 75 -
trunk/Source/WebCore/workers/service/server/SWClientConnection.h
r221198 r221392 35 35 36 36 struct ExceptionData; 37 struct ServiceWorkerRegistrationData; 37 38 38 39 class SWClientConnection : public ThreadSafeRefCounted<SWClientConnection> { … … 47 48 protected: 48 49 WEBCORE_EXPORT void jobRejectedInServer(uint64_t jobIdentifier, const ExceptionData&); 50 WEBCORE_EXPORT void jobResolvedInServer(uint64_t jobIdentifier, const ServiceWorkerRegistrationData&); 49 51 50 52 private: -
trunk/Source/WebCore/workers/service/server/SWServer.cpp
r221198 r221392 55 55 RELEASE_ASSERT(m_registrations.isEmpty()); 56 56 57 ASSERT(m_taskQueue.isEmpty()); 58 ASSERT(m_taskReplyQueue.isEmpty()); 59 57 60 // For a SWServer to be cleanly shut down its thread must have finished and gone away. 58 61 // At this stage in development of the feature that actually never happens. … … 64 67 void SWServer::Connection::scheduleJobInServer(const ServiceWorkerJobData& jobData) 65 68 { 66 LOG(ServiceWorker, "Scheduling ServiceWorker job %" PRIu64 "-%" PRIu64 " in server", jobData.connectionIdentifier(), jobData. jobIdentifier());69 LOG(ServiceWorker, "Scheduling ServiceWorker job %" PRIu64 "-%" PRIu64 " in server", jobData.connectionIdentifier(), jobData.identifier()); 67 70 ASSERT(identifier() == jobData.connectionIdentifier()); 68 71 … … 83 86 auto result = m_registrations.add(jobData.registrationKey(), nullptr); 84 87 if (result.isNewEntry) 85 result.iterator->value = std::make_unique<SWServerRegistration>(*this );88 result.iterator->value = std::make_unique<SWServerRegistration>(*this, jobData.registrationKey()); 86 89 87 90 ASSERT(result.iterator->value); … … 92 95 void SWServer::rejectJob(const ServiceWorkerJobData& jobData, const ExceptionData& exceptionData) 93 96 { 94 LOG(ServiceWorker, "Rejected ServiceWorker job %" PRIu64 "-%" PRIu64 " in server", jobData.connectionIdentifier(), jobData. jobIdentifier());97 LOG(ServiceWorker, "Rejected ServiceWorker job %" PRIu64 "-%" PRIu64 " in server", jobData.connectionIdentifier(), jobData.identifier()); 95 98 auto* connection = m_connections.get(jobData.connectionIdentifier()); 96 99 if (!connection) 97 100 return; 98 101 99 connection->rejectJobInClient(jobData.jobIdentifier(), exceptionData); 102 connection->rejectJobInClient(jobData.identifier(), exceptionData); 103 } 104 105 void SWServer::resolveJob(const ServiceWorkerJobData& jobData, const ServiceWorkerRegistrationData& registrationData) 106 { 107 LOG(ServiceWorker, "Resolved ServiceWorker job %" PRIu64 "-%" PRIu64 " in server with registration %" PRIu64, jobData.connectionIdentifier(), jobData.identifier(), registrationData.identifier); 108 auto* connection = m_connections.get(jobData.connectionIdentifier()); 109 if (!connection) 110 return; 111 112 connection->resolveJobInClient(jobData.identifier(), registrationData); 100 113 } 101 114 -
trunk/Source/WebCore/workers/service/server/SWServer.h
r221198 r221392 43 43 class SWServerRegistration; 44 44 struct ExceptionData; 45 struct ServiceWorkerRegistrationData; 45 46 46 47 class SWServer { … … 61 62 private: 62 63 virtual void rejectJobInClient(uint64_t jobIdentifier, const ExceptionData&) = 0; 64 virtual void resolveJobInClient(uint64_t jobIdentifier, const ServiceWorkerRegistrationData&) = 0; 63 65 64 66 SWServer& m_server; … … 71 73 void scheduleJob(const ServiceWorkerJobData&); 72 74 void rejectJob(const ServiceWorkerJobData&, const ExceptionData&); 73 75 void resolveJob(const ServiceWorkerJobData&, const ServiceWorkerRegistrationData&); 74 76 void postTask(CrossThreadTask&&); 75 77 void postTaskReply(CrossThreadTask&&); -
trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp
r221198 r221392 31 31 #include "ExceptionData.h" 32 32 #include "SWServer.h" 33 #include "SWServerWorker.h" 34 #include "SecurityOrigin.h" 35 #include "ServiceWorkerRegistrationData.h" 36 #include "WorkerType.h" 33 37 34 38 namespace WebCore { 35 39 36 SWServerRegistration::SWServerRegistration(SWServer& server) 40 static std::atomic<uint64_t> currentIdentifier; 41 42 SWServerRegistration::SWServerRegistration(SWServer& server, const ServiceWorkerRegistrationKey& key) 37 43 : m_jobTimer(*this, &SWServerRegistration::startNextJob) 38 44 , m_server(server) 45 , m_identifier(++currentIdentifier) 46 , m_registrationKey(key) 39 47 { 40 48 } … … 66 74 67 75 m_currentJob = std::make_unique<ServiceWorkerJobData>(m_jobQueue.takeFirst().isolatedCopy()); 68 m_server.postTask(createCrossThreadTask(*this, &SWServerRegistration::performCurrentJob)); 69 } 70 71 void SWServerRegistration::performCurrentJob() 72 { 73 ASSERT(!isMainThread()); 74 75 auto exception = ExceptionData { UnknownError, ASCIILiteral("serviceWorker job scheduling is not yet implemented") }; 76 77 switch (m_currentJob->type) { 78 case ServiceWorkerJobType::Register: 79 m_server.postTask(createCrossThreadTask(*this, &SWServerRegistration::runRegisterJob, *m_currentJob)); 80 return; 81 } 82 83 RELEASE_ASSERT_NOT_REACHED(); 84 } 85 86 bool SWServerRegistration::isEmpty() 87 { 88 ASSERT(!isMainThread()); 89 90 // Having or not-having an m_updateViaCache flag is currently 91 // the signal as to whether or not this is an empty (i.e. "new") registration. 92 // There will be a more explicit signal in the near future. 93 return !m_updateViaCache; 94 } 95 96 SWServerWorker* SWServerRegistration::getNewestWorker() 97 { 98 ASSERT(!isMainThread()); 99 if (m_installingWorker) 100 return m_installingWorker.get(); 101 if (m_waitingWorker) 102 return m_waitingWorker.get(); 103 104 return m_activeWorker.get(); 105 } 106 107 void SWServerRegistration::runRegisterJob(const ServiceWorkerJobData& job) 108 { 109 ASSERT(!isMainThread()); 110 ASSERT(job.type == ServiceWorkerJobType::Register); 111 112 if (!shouldTreatAsPotentiallyTrustworthy(job.scriptURL)) 113 return rejectWithExceptionOnMainThread(ExceptionData { SecurityError, ASCIILiteral("Script URL is not potentially trustworthy") }); 114 115 // If the origin of job’s script url is not job’s referrer's origin, then: 116 if (!protocolHostAndPortAreEqual(job.scriptURL, job.clientCreationURL)) 117 return rejectWithExceptionOnMainThread(ExceptionData { SecurityError, ASCIILiteral("Script origin does not match the registering client's origin") }); 118 119 // If the origin of job’s scope url is not job’s referrer's origin, then: 120 if (!protocolHostAndPortAreEqual(job.scopeURL, job.clientCreationURL)) 121 return rejectWithExceptionOnMainThread(ExceptionData { SecurityError, ASCIILiteral("Scope origin does not match the registering client's origin") }); 122 123 // If registration is not null (in our parlance "empty"), then: 124 if (!isEmpty()) { 125 ASSERT(m_updateViaCache); 126 127 m_uninstalling = false; 128 auto* newestWorker = getNewestWorker(); 129 if (newestWorker && equalIgnoringFragmentIdentifier(job.scriptURL, newestWorker->scriptURL()) && job.registrationOptions.updateViaCache == *m_updateViaCache) { 130 resolveWithRegistrationOnMainThread(); 131 return; 132 } 133 } else { 134 m_scopeURL = job.scopeURL.isolatedCopy(); 135 m_scopeURL.removeFragmentIdentifier(); 136 m_updateViaCache = job.registrationOptions.updateViaCache; 137 } 138 139 runUpdateJob(job); 140 } 141 142 void SWServerRegistration::runUpdateJob(const ServiceWorkerJobData& job) 143 { 144 // If registration is null (in our parlance "empty") or registration’s uninstalling flag is set, then: 145 if (isEmpty()) 146 return rejectWithExceptionOnMainThread(ExceptionData { TypeError, ASCIILiteral("Cannot update a null/nonexistent service worker registration") }); 147 if (m_uninstalling) 148 return rejectWithExceptionOnMainThread(ExceptionData { TypeError, ASCIILiteral("Cannot update a service worker registration that is uninstalling") }); 149 150 // If job’s job type is update, and newestWorker’s script url does not equal job’s script url with the exclude fragments flag set, then: 151 auto* newestWorker = getNewestWorker(); 152 if (newestWorker && !equalIgnoringFragmentIdentifier(job.scriptURL, newestWorker->scriptURL())) 153 return rejectWithExceptionOnMainThread(ExceptionData { TypeError, ASCIILiteral("Cannot update a service worker with a requested script URL whose newest worker has a different script URL") }); 154 155 // FIXME: At this point we are ready to actually fetch the script for the worker in the registering context. 156 // For now we're still hard coding the same rejection we have so far. 157 rejectWithExceptionOnMainThread(ExceptionData { UnknownError, ASCIILiteral("serviceWorker job scheduling is not yet implemented") }); 158 } 159 160 void SWServerRegistration::rejectWithExceptionOnMainThread(const ExceptionData& exception) 161 { 162 ASSERT(!isMainThread()); 76 163 m_server.postTaskReply(createCrossThreadTask(*this, &SWServerRegistration::rejectCurrentJob, exception)); 164 } 165 166 void SWServerRegistration::resolveWithRegistrationOnMainThread() 167 { 168 ASSERT(!isMainThread()); 169 m_server.postTaskReply(createCrossThreadTask(*this, &SWServerRegistration::resolveCurrentJob, data())); 77 170 } 78 171 … … 83 176 84 177 m_server.rejectJob(*m_currentJob, exceptionData); 178 179 finishCurrentJob(); 180 } 181 182 void SWServerRegistration::resolveCurrentJob(const ServiceWorkerRegistrationData& data) 183 { 184 ASSERT(isMainThread()); 185 ASSERT(m_currentJob); 186 187 m_server.resolveJob(*m_currentJob, data); 85 188 86 189 finishCurrentJob(); … … 99 202 } 100 203 204 ServiceWorkerRegistrationData SWServerRegistration::data() const 205 { 206 return { m_registrationKey, m_identifier }; 207 } 208 209 101 210 } // namespace WebCore 102 211 -
trunk/Source/WebCore/workers/service/server/SWServerRegistration.h
r221198 r221392 29 29 30 30 #include "ServiceWorkerJobData.h" 31 #include "ServiceWorkerRegistrationData.h" 31 32 #include "Timer.h" 32 33 #include <wtf/Deque.h> … … 35 36 36 37 class SWServer; 38 class SWServerWorker; 37 39 struct ExceptionData; 38 40 39 41 class SWServerRegistration { 40 42 public: 41 explicit SWServerRegistration(SWServer& );43 explicit SWServerRegistration(SWServer&, const ServiceWorkerRegistrationKey&); 42 44 SWServerRegistration(const SWServerRegistration&) = delete; 43 45 ~SWServerRegistration(); … … 45 47 void enqueueJob(const ServiceWorkerJobData&); 46 48 49 uint64_t identifier() const { return m_identifier; } 50 ServiceWorkerRegistrationData data() const; 51 47 52 private: 48 53 void jobTimerFired(); 49 void performCurrentJob();54 void startNextJob(); 50 55 void rejectCurrentJob(const ExceptionData&); 56 void resolveCurrentJob(const ServiceWorkerRegistrationData&); 57 void finishCurrentJob(); 51 58 52 void startNextJob(); 53 void finishCurrentJob(); 59 void runRegisterJob(const ServiceWorkerJobData&); 60 void runUpdateJob(const ServiceWorkerJobData&); 61 62 void rejectWithExceptionOnMainThread(const ExceptionData&); 63 void resolveWithRegistrationOnMainThread(); 64 bool isEmpty(); 65 SWServerWorker* getNewestWorker(); 54 66 55 67 Deque<ServiceWorkerJobData> m_jobQueue; 56 68 std::unique_ptr<ServiceWorkerJobData> m_currentJob; 57 69 70 bool m_uninstalling { false }; 71 std::unique_ptr<SWServerWorker> m_installingWorker; 72 std::unique_ptr<SWServerWorker> m_waitingWorker; 73 std::unique_ptr<SWServerWorker> m_activeWorker; 74 URL m_scopeURL; 75 std::optional<ServiceWorkerUpdateViaCache> m_updateViaCache; 76 58 77 Timer m_jobTimer; 59 78 SWServer& m_server; 79 uint64_t m_identifier; 80 ServiceWorkerRegistrationKey m_registrationKey; 60 81 }; 61 82 -
trunk/Source/WebCore/workers/service/server/SWServerWorker.cpp
r221388 r221392 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "SWServerWorker.h" 27 28 28 29 #if ENABLE(SERVICE_WORKER) 29 30 31 #include <wtf/MainThread.h> 32 30 33 namespace WebCore { 31 34 32 class ServiceWorkerJob; 35 SWServerWorker::SWServerWorker(const URL& url) 36 : m_scriptURL(url) 37 { 38 ASSERT(!isMainThread()); 39 } 33 40 34 class ServiceWorkerJobClient { 35 public: 36 virtual ~ServiceWorkerJobClient() { }; 37 38 virtual void jobDidFinish(ServiceWorkerJob&) = 0; 39 virtual uint64_t connectionIdentifier() = 0; 40 41 virtual void ref() = 0; 42 virtual void deref() = 0; 43 }; 41 SWServerWorker::~SWServerWorker() 42 { 43 ASSERT(!isMainThread()); 44 } 44 45 45 46 } // namespace WebCore -
trunk/Source/WebCore/workers/service/server/SWServerWorker.h
r221388 r221392 28 28 #if ENABLE(SERVICE_WORKER) 29 29 30 #include "URL.h" 31 30 32 namespace WebCore { 31 33 32 class ServiceWorkerJob; 34 class SWServerWorker { 35 public: 36 SWServerWorker(const URL&); 37 SWServerWorker(const SWServerWorker&) = delete; 38 ~SWServerWorker(); 39 const URL& scriptURL() const { return m_scriptURL; } 33 40 34 class ServiceWorkerJobClient { 35 public: 36 virtual ~ServiceWorkerJobClient() { }; 37 38 virtual void jobDidFinish(ServiceWorkerJob&) = 0; 39 virtual uint64_t connectionIdentifier() = 0; 40 41 virtual void ref() = 0; 42 virtual void deref() = 0; 41 private: 42 URL m_scriptURL; 43 43 }; 44 44 -
trunk/Source/WebKit/ChangeLog
r221381 r221392 1 2017-08-30 Brady Eidson <beidson@apple.com> 2 3 Implement all of "Register" right up until where the script is fetched. 4 https://bugs.webkit.org/show_bug.cgi?id=176082 5 6 Reviewed by Andy Estes. 7 8 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: 9 (WebKit::WebSWServerConnection::resolveJobInClient): 10 * StorageProcess/ServiceWorker/WebSWServerConnection.h: 11 * WebProcess/Storage/WebSWClientConnection.messages.in: 12 1 13 2017-08-30 Andy Estes <aestes@apple.com> 2 14 -
trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp
r221198 r221392 66 66 } 67 67 68 void WebSWServerConnection::resolveJobInClient(uint64_t jobIdentifier, const ServiceWorkerRegistrationData& registrationData) 69 { 70 send(Messages::WebSWClientConnection::JobResolvedInServer(jobIdentifier, registrationData)); 71 } 72 68 73 } // namespace WebKit 69 74 -
trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h
r221198 r221392 51 51 // Implement SWServer::Connection 52 52 void rejectJobInClient(uint64_t jobIdentifier, const WebCore::ExceptionData&) final; 53 void resolveJobInClient(uint64_t jobIdentifier, const WebCore::ServiceWorkerRegistrationData&) final; 53 54 54 55 IPC::Connection* messageSenderConnection() final { return m_connection.ptr(); } -
trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.messages.in
r220977 r221392 26 26 # When possible, these messages can be implemented directly by WebCore::SWServer::Connection 27 27 JobRejectedInServer(uint64_t identifier, struct WebCore::ExceptionData exception) 28 JobResolvedInServer(uint64_t identifier, struct WebCore::ServiceWorkerRegistrationData registration) 28 29 } 29 30
Note: See TracChangeset
for help on using the changeset viewer.