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

Side by Side Diff: Source/core/workers/Worker.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/SharedWorker.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('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) 2008, 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ASSERT(document->page()); 58 ASSERT(document->page());
59 WorkerGlobalScopeProxyProvider* proxyProvider = WorkerGlobalScopeProxyProvid er::from(*document->page()); 59 WorkerGlobalScopeProxyProvider* proxyProvider = WorkerGlobalScopeProxyProvid er::from(*document->page());
60 ASSERT(proxyProvider); 60 ASSERT(proxyProvider);
61 61
62 RefPtr<Worker> worker = adoptRef(new Worker(context)); 62 RefPtr<Worker> worker = adoptRef(new Worker(context));
63 63
64 worker->suspendIfNeeded(); 64 worker->suspendIfNeeded();
65 65
66 KURL scriptURL = worker->resolveURL(url, exceptionState); 66 KURL scriptURL = worker->resolveURL(url, exceptionState);
67 if (scriptURL.isEmpty()) 67 if (scriptURL.isEmpty())
68 return 0; 68 return nullptr;
69 69
70 // The worker context does not exist while loading, so we must ensure that t he worker object is not collected, nor are its event listeners. 70 // The worker context does not exist while loading, so we must ensure that t he worker object is not collected, nor are its event listeners.
71 worker->setPendingActivity(worker.get()); 71 worker->setPendingActivity(worker.get());
72 72
73 worker->m_scriptLoader = WorkerScriptLoader::create(); 73 worker->m_scriptLoader = WorkerScriptLoader::create();
74 worker->m_scriptLoader->loadAsynchronously(context, scriptURL, DenyCrossOrig inRequests, worker.get()); 74 worker->m_scriptLoader->loadAsynchronously(context, scriptURL, DenyCrossOrig inRequests, worker.get());
75 worker->m_contextProxy = proxyProvider->createWorkerGlobalScopeProxy(worker. get()); 75 worker->m_contextProxy = proxyProvider->createWorkerGlobalScopeProxy(worker. get());
76 return worker.release(); 76 return worker.release();
77 } 77 }
78 78
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 startMode = PauseWorkerGlobalScopeOnStart; 128 startMode = PauseWorkerGlobalScopeOnStart;
129 m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), executionC ontext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode) ; 129 m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), executionC ontext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode) ;
130 InspectorInstrumentation::scriptImported(executionContext(), m_scriptLoa der->identifier(), m_scriptLoader->script()); 130 InspectorInstrumentation::scriptImported(executionContext(), m_scriptLoa der->identifier(), m_scriptLoader->script());
131 } 131 }
132 m_scriptLoader = nullptr; 132 m_scriptLoader = nullptr;
133 133
134 unsetPendingActivity(this); 134 unsetPendingActivity(this);
135 } 135 }
136 136
137 } // namespace WebCore 137 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/workers/SharedWorker.cpp ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698