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

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

Issue 857193004: [NOT READY FOR REVIEW YET]workers: Some refactoring to allow creating new kind of worker threads Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 11 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/Worker.cpp ('k') | Source/core/workers/WorkerThread.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Notify parent that this context is closed. Parent is responsible for calling WorkerThread::stop(). 75 // Notify parent that this context is closed. Parent is responsible for calling WorkerThread::stop().
76 workerGlobalScope->thread()->workerReportingProxy().workerGlobalScopeClo sed(); 76 workerGlobalScope->thread()->workerReportingProxy().workerGlobalScopeClo sed();
77 } 77 }
78 78
79 virtual bool isCleanupTask() const { return true; } 79 virtual bool isCleanupTask() const { return true; }
80 }; 80 };
81 81
82 WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W orkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, Pas sOwnPtrWillBeRawPtr<WorkerClients> workerClients) 82 WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W orkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, Pas sOwnPtrWillBeRawPtr<WorkerClients> workerClients)
83 : m_url(url) 83 : m_url(url)
84 , m_userAgent(userAgent) 84 , m_userAgent(userAgent)
85 , m_script(adoptPtr(new WorkerScriptController(*this))) 85 , m_script(adoptPtr(new WorkerScriptController(*this, thread->isolate())))
86 , m_thread(thread) 86 , m_thread(thread)
87 , m_workerInspectorController(adoptRefWillBeNoop(new WorkerInspectorControll er(this))) 87 , m_workerInspectorController(adoptRefWillBeNoop(new WorkerInspectorControll er(this)))
88 , m_closing(false) 88 , m_closing(false)
89 , m_eventQueue(WorkerEventQueue::create(this)) 89 , m_eventQueue(WorkerEventQueue::create(this))
90 , m_workerClients(workerClients) 90 , m_workerClients(workerClients)
91 , m_timeOrigin(timeOrigin) 91 , m_timeOrigin(timeOrigin)
92 , m_messageStorage(ConsoleMessageStorage::createForWorker(this)) 92 , m_messageStorage(ConsoleMessageStorage::createForWorker(this))
93 , m_workerExceptionUniqueIdentifier(0) 93 , m_workerExceptionUniqueIdentifier(0)
94 { 94 {
95 setSecurityOrigin(SecurityOrigin::create(url)); 95 setSecurityOrigin(SecurityOrigin::create(url));
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 visitor->trace(m_timers); 361 visitor->trace(m_timers);
362 visitor->trace(m_messageStorage); 362 visitor->trace(m_messageStorage);
363 visitor->trace(m_pendingMessages); 363 visitor->trace(m_pendingMessages);
364 HeapSupplementable<WorkerGlobalScope>::trace(visitor); 364 HeapSupplementable<WorkerGlobalScope>::trace(visitor);
365 #endif 365 #endif
366 ExecutionContext::trace(visitor); 366 ExecutionContext::trace(visitor);
367 EventTargetWithInlineData::trace(visitor); 367 EventTargetWithInlineData::trace(visitor);
368 } 368 }
369 369
370 } // namespace blink 370 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/Worker.cpp ('k') | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698