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

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: . 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
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
125 virtual v8::Isolate* initializeIsolate(); 129 virtual v8::Isolate* initializeIsolate();
126 virtual void willDestroyIsolate(); 130 virtual void willDestroyIsolate();
127 virtual void destroyIsolate(); 131 virtual void destroyIsolate();
128 virtual void terminateV8Execution(); 132 virtual void terminateV8Execution();
129 133
130 // This is protected virtual for testing. 134 // This is protected virtual for testing.
131 virtual bool doIdleGc(double deadlineSeconds); 135 virtual bool doIdleGc(double deadlineSeconds);
132 136
133 private: 137 private:
134 friend class WorkerSharedTimer; 138 friend class WorkerSharedTimer;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Used to signal thread shutdown. 170 // Used to signal thread shutdown.
167 OwnPtr<WebWaitableEvent> m_shutdownEvent; 171 OwnPtr<WebWaitableEvent> m_shutdownEvent;
168 172
169 // Used to signal thread termination. 173 // Used to signal thread termination.
170 OwnPtr<WebWaitableEvent> m_terminationEvent; 174 OwnPtr<WebWaitableEvent> m_terminationEvent;
171 }; 175 };
172 176
173 } // namespace blink 177 } // namespace blink
174 178
175 #endif // WorkerThread_h 179 #endif // WorkerThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698