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

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

Issue 14070021: Rename 'UseCounter::observe' to 'UseCounter::count'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/SharedWorker.cpp ('k') | no next file » | 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 inline Worker::Worker(ScriptExecutionContext* context) 52 inline Worker::Worker(ScriptExecutionContext* context)
53 : AbstractWorker(context) 53 : AbstractWorker(context)
54 , m_contextProxy(WorkerContextProxy::create(this)) 54 , m_contextProxy(WorkerContextProxy::create(this))
55 { 55 {
56 } 56 }
57 57
58 PassRefPtr<Worker> Worker::create(ScriptExecutionContext* context, const String& url, ExceptionCode& ec) 58 PassRefPtr<Worker> Worker::create(ScriptExecutionContext* context, const String& url, ExceptionCode& ec)
59 { 59 {
60 ASSERT(isMainThread()); 60 ASSERT(isMainThread());
61 UseCounter::observe(static_cast<Document*>(context)->domWindow(), UseCounter ::WorkerStart); 61 UseCounter::count(static_cast<Document*>(context)->domWindow(), UseCounter:: WorkerStart);
62 62
63 RefPtr<Worker> worker = adoptRef(new Worker(context)); 63 RefPtr<Worker> worker = adoptRef(new Worker(context));
64 64
65 worker->suspendIfNeeded(); 65 worker->suspendIfNeeded();
66 66
67 KURL scriptURL = worker->resolveURL(url, ec); 67 KURL scriptURL = worker->resolveURL(url, ec);
68 if (scriptURL.isEmpty()) 68 if (scriptURL.isEmpty())
69 return 0; 69 return 0;
70 70
71 // 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 // 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.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 startMode = PauseWorkerContextOnStart; 142 startMode = PauseWorkerContextOnStart;
143 m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutio nContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMod e); 143 m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutio nContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMod e);
144 InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scr iptLoader->identifier(), m_scriptLoader->script()); 144 InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scr iptLoader->identifier(), m_scriptLoader->script());
145 } 145 }
146 m_scriptLoader = nullptr; 146 m_scriptLoader = nullptr;
147 147
148 unsetPendingActivity(this); 148 unsetPendingActivity(this);
149 } 149 }
150 150
151 } // namespace WebCore 151 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/workers/SharedWorker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698