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

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

Issue 1166923003: Revert of compositor-worker: Share a thread and an isolate for compositor workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void setWorkerInspectorController(WorkerInspectorController*); 115 void setWorkerInspectorController(WorkerInspectorController*);
116 116
117 protected: 117 protected:
118 WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); 118 WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&);
119 119
120 // Factory method for creating a new worker context for the thread. 120 // Factory method for creating a new worker context for the thread.
121 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(Pa ssOwnPtr<WorkerThreadStartupData>) = 0; 121 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(Pa ssOwnPtr<WorkerThreadStartupData>) = 0;
122 122
123 virtual void postInitialize() { } 123 virtual void postInitialize() { }
124 124
125 // Both of these methods are called in the worker thread.
126 virtual void initializeBackingThread();
127 virtual void shutdownBackingThread();
128
129 virtual v8::Isolate* initializeIsolate(); 125 virtual v8::Isolate* initializeIsolate();
130 virtual void willDestroyIsolate(); 126 virtual void willDestroyIsolate();
131 virtual void destroyIsolate(); 127 virtual void destroyIsolate();
132 virtual void terminateV8Execution(); 128 virtual void terminateV8Execution();
133 129
134 // This is protected virtual for testing. 130 // This is protected virtual for testing.
135 virtual bool doIdleGc(double deadlineSeconds); 131 virtual bool doIdleGc(double deadlineSeconds);
136 132
137 private: 133 private:
138 friend class WorkerSharedTimer; 134 friend class WorkerSharedTimer;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Used to signal thread shutdown. 166 // Used to signal thread shutdown.
171 OwnPtr<WebWaitableEvent> m_shutdownEvent; 167 OwnPtr<WebWaitableEvent> m_shutdownEvent;
172 168
173 // Used to signal thread termination. 169 // Used to signal thread termination.
174 OwnPtr<WebWaitableEvent> m_terminationEvent; 170 OwnPtr<WebWaitableEvent> m_terminationEvent;
175 }; 171 };
176 172
177 } // namespace blink 173 } // namespace blink
178 174
179 #endif // WorkerThread_h 175 #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