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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 1864243004: Remove RawPtr from Source/modules Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
index b0acf10a1c828c1eb19057c6ba2f8e6db26945fe..ac99dd23d0caa2226e0c7900e20579d8c2a0aac8 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
@@ -64,20 +64,20 @@
namespace blink {
-RawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::create(ServiceWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData)
+ServiceWorkerGlobalScope* ServiceWorkerGlobalScope::create(ServiceWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData)
{
// Note: startupData is finalized on return. After the relevant parts has been
// passed along to the created 'context'.
- RawPtr<ServiceWorkerGlobalScope> context = new ServiceWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAgent, thread, monotonicallyIncreasingTime(), startupData->m_starterOriginPrivilegeData.release(), startupData->m_workerClients.release());
+ ServiceWorkerGlobalScope* context = new ServiceWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAgent, thread, monotonicallyIncreasingTime(), startupData->m_starterOriginPrivilegeData.release(), startupData->m_workerClients.release());
context->setV8CacheOptions(startupData->m_v8CacheOptions);
context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurityPolicyHeaders);
context->setAddressSpace(startupData->m_addressSpace);
- return context.release();
+ return context;
}
-ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String& userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, RawPtr<WorkerClients> workerClients)
+ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String& userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* workerClients)
: WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOriginPrivilegeData, workerClients)
, m_didEvaluateScript(false)
, m_hadErrorInTopLevelEventHandler(false)
@@ -152,11 +152,11 @@ bool ServiceWorkerGlobalScope::addEventListenerInternal(const AtomicString& even
{
if (m_didEvaluateScript) {
if (eventType == EventTypeNames::install) {
- RawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Event handler of 'install' event must be added on the initial evaluation of worker script.");
- addMessageToWorkerConsole(consoleMessage.release());
+ ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Event handler of 'install' event must be added on the initial evaluation of worker script.");
+ addMessageToWorkerConsole(consoleMessage);
} else if (eventType == EventTypeNames::activate) {
- RawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Event handler of 'activate' event must be added on the initial evaluation of worker script.");
- addMessageToWorkerConsole(consoleMessage.release());
+ ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Event handler of 'activate' event must be added on the initial evaluation of worker script.");
+ addMessageToWorkerConsole(consoleMessage);
}
}
return WorkerGlobalScope::addEventListenerInternal(eventType, listener, options);
@@ -177,7 +177,7 @@ DispatchEventResult ServiceWorkerGlobalScope::dispatchEventInternal(Event* event
return dispatchResult;
}
-void ServiceWorkerGlobalScope::dispatchExtendableEvent(RawPtr<Event> event, WaitUntilObserver* observer)
+void ServiceWorkerGlobalScope::dispatchExtendableEvent(Event* event, WaitUntilObserver* observer)
{
ASSERT(m_eventNestingLevel == 0);
m_hadErrorInTopLevelEventHandler = false;
@@ -214,10 +214,10 @@ RawPtr<CachedMetadataHandler> ServiceWorkerGlobalScope::createWorkerScriptCached
void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack> callStack)
{
WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack);
- RawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber);
+ ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber);
consoleMessage->setScriptId(scriptId);
consoleMessage->setCallStack(callStack);
- addMessageToWorkerConsole(consoleMessage.release());
+ addMessageToWorkerConsole(consoleMessage);
}
void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMetadataSize)

Powered by Google App Engine
This is Rietveld 408576698