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

Side by Side Diff: Source/core/workers/WorkerThread.h

Issue 1158443008: compositor-worker: Share a thread and an isolate for compositor workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tot-merge Created 5 years, 6 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/core.gypi ('k') | Source/core/workers/WorkerThread.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 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void setWorkerInspectorController(WorkerInspectorController*); 114 void setWorkerInspectorController(WorkerInspectorController*);
115 115
116 protected: 116 protected:
117 WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); 117 WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&);
118 118
119 // Factory method for creating a new worker context for the thread. 119 // Factory method for creating a new worker context for the thread.
120 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(Pa ssOwnPtr<WorkerThreadStartupData>) = 0; 120 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(Pa ssOwnPtr<WorkerThreadStartupData>) = 0;
121 121
122 virtual void postInitialize() { } 122 virtual void postInitialize() { }
123 123
124 // Both of these methods are called in the worker thread.
125 virtual void initializeBackingThread();
126 virtual void shutdownBackingThread();
127
124 virtual v8::Isolate* initializeIsolate(); 128 virtual v8::Isolate* initializeIsolate();
125 virtual void willDestroyIsolate(); 129 virtual void willDestroyIsolate();
126 virtual void destroyIsolate(); 130 virtual void destroyIsolate();
127 virtual void terminateV8Execution(); 131 virtual void terminateV8Execution();
128 132
129 // This is protected virtual for testing. 133 // This is protected virtual for testing.
130 virtual bool doIdleGc(double deadlineSeconds); 134 virtual bool doIdleGc(double deadlineSeconds);
131 135
132 private: 136 private:
133 friend class WorkerMicrotaskRunner; 137 friend class WorkerMicrotaskRunner;
(...skipping 30 matching lines...) Expand all
164 // Used to signal thread shutdown. 168 // Used to signal thread shutdown.
165 OwnPtr<WebWaitableEvent> m_shutdownEvent; 169 OwnPtr<WebWaitableEvent> m_shutdownEvent;
166 170
167 // Used to signal thread termination. 171 // Used to signal thread termination.
168 OwnPtr<WebWaitableEvent> m_terminationEvent; 172 OwnPtr<WebWaitableEvent> m_terminationEvent;
169 }; 173 };
170 174
171 } // namespace blink 175 } // namespace blink
172 176
173 #endif // WorkerThread_h 177 #endif // WorkerThread_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698