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

Side by Side Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 692003002: ServiceWorker: Registering a malformed script should fail [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | Source/web/WebSharedWorkerImpl.h » ('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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr< ConsoleMessage> consoleMessage) 136 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr< ConsoleMessage> consoleMessage)
137 { 137 {
138 m_client.reportConsoleMessage(consoleMessage->source(), consoleMessage->leve l(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage->ur l()); 138 m_client.reportConsoleMessage(consoleMessage->source(), consoleMessage->leve l(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage->ur l());
139 } 139 }
140 140
141 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes sage) 141 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes sage)
142 { 142 {
143 m_document.postInspectorTask(createCrossThreadTask(&WebEmbeddedWorkerImpl::p ostMessageToPageInspector, &m_embeddedWorker, message)); 143 m_document.postInspectorTask(createCrossThreadTask(&WebEmbeddedWorkerImpl::p ostMessageToPageInspector, &m_embeddedWorker, message));
144 } 144 }
145 145
146 void ServiceWorkerGlobalScopeProxy::didEvaluateWorkerScript(bool success)
147 {
148 m_client.didEvaluateWorkerScript(success);
149 }
150
146 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope* workerGlobalScope) 151 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope* workerGlobalScope)
147 { 152 {
148 ASSERT(!m_workerGlobalScope); 153 ASSERT(!m_workerGlobalScope);
149 m_workerGlobalScope = static_cast<ServiceWorkerGlobalScope*>(workerGlobalSco pe); 154 m_workerGlobalScope = static_cast<ServiceWorkerGlobalScope*>(workerGlobalSco pe);
150 m_client.workerContextStarted(this); 155 m_client.workerContextStarted(this);
151 } 156 }
152 157
153 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() 158 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed()
154 { 159 {
155 m_document.postTask(createCrossThreadTask(&WebEmbeddedWorkerImpl::terminateW orkerContext, &m_embeddedWorker)); 160 m_document.postTask(createCrossThreadTask(&WebEmbeddedWorkerImpl::terminateW orkerContext, &m_embeddedWorker));
(...skipping 12 matching lines...) Expand all
168 173
169 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) 174 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client)
170 : m_embeddedWorker(embeddedWorker) 175 : m_embeddedWorker(embeddedWorker)
171 , m_document(document) 176 , m_document(document)
172 , m_client(client) 177 , m_client(client)
173 , m_workerGlobalScope(0) 178 , m_workerGlobalScope(0)
174 { 179 {
175 } 180 }
176 181
177 } // namespace blink 182 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698