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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 384633002: Oilpan: add transition types to remaining Fetch and ServiceWorker objects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another rebase Created 6 years, 5 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 { 98 {
99 KURL url = completeURL(urlstring); 99 KURL url = completeURL(urlstring);
100 if (!url.isValid()) 100 if (!url.isValid())
101 return ScriptPromise::reject(scriptState, V8ThrowException::createTypeEr ror("Invalid URL", scriptState->isolate())); 101 return ScriptPromise::reject(scriptState, V8ThrowException::createTypeEr ror("Invalid URL", scriptState->isolate()));
102 OwnPtr<ResourceRequest> resourceRequest = adoptPtr(new ResourceRequest(url)) ; 102 OwnPtr<ResourceRequest> resourceRequest = adoptPtr(new ResourceRequest(url)) ;
103 resourceRequest->setRequestContext(blink::WebURLRequest::RequestContextFetch ); 103 resourceRequest->setRequestContext(blink::WebURLRequest::RequestContextFetch );
104 resourceRequest->setHTTPMethod("GET"); 104 resourceRequest->setHTTPMethod("GET");
105 return m_fetchManager->fetch(scriptState, resourceRequest.release()); 105 return m_fetchManager->fetch(scriptState, resourceRequest.release());
106 } 106 }
107 107
108 PassRefPtr<ServiceWorkerClients> ServiceWorkerGlobalScope::clients() 108 PassRefPtrWillBeRawPtr<ServiceWorkerClients> ServiceWorkerGlobalScope::clients()
109 { 109 {
110 if (!m_clients) 110 if (!m_clients)
111 m_clients = ServiceWorkerClients::create(); 111 m_clients = ServiceWorkerClients::create();
112 return m_clients; 112 return m_clients;
113 } 113 }
114 114
115 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const 115 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const
116 { 116 {
117 return EventTargetNames::ServiceWorkerGlobalScope; 117 return EventTargetNames::ServiceWorkerGlobalScope;
118 } 118 }
119 119
120 void ServiceWorkerGlobalScope::trace(Visitor* visitor) 120 void ServiceWorkerGlobalScope::trace(Visitor* visitor)
121 { 121 {
122 visitor->trace(m_clients);
122 WorkerGlobalScope::trace(visitor); 123 WorkerGlobalScope::trace(visitor);
123 } 124 }
124 125
125 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack> callStack) 126 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack> callStack)
126 { 127 {
127 WorkerGlobalScope::logExceptionToConsole(errorMessage, sourceURL, lineNumber , columnNumber, callStack); 128 WorkerGlobalScope::logExceptionToConsole(errorMessage, sourceURL, lineNumber , columnNumber, callStack);
128 addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, callStack, 0); 129 addMessageToWorkerConsole(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, callStack, 0);
129 } 130 }
130 131
131 } // namespace WebCore 132 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698