OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 ASSERT(s_pendingGCRunner); | 211 ASSERT(s_pendingGCRunner); |
212 delete s_pendingGCRunner; | 212 delete s_pendingGCRunner; |
213 s_pendingGCRunner = 0; | 213 s_pendingGCRunner = 0; |
214 | 214 |
215 ASSERT(s_messageLoopInterruptor); | 215 ASSERT(s_messageLoopInterruptor); |
216 ThreadState::current()->removeInterruptor(s_messageLoopInterruptor); | 216 ThreadState::current()->removeInterruptor(s_messageLoopInterruptor); |
217 delete s_messageLoopInterruptor; | 217 delete s_messageLoopInterruptor; |
218 s_messageLoopInterruptor = 0; | 218 s_messageLoopInterruptor = 0; |
219 } | 219 } |
220 | 220 |
| 221 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); |
| 222 V8PerIsolateData::willBeDestroyed(isolate); |
| 223 |
221 // Detach the main thread before starting the shutdown sequence | 224 // Detach the main thread before starting the shutdown sequence |
222 // so that the main thread won't get involved in a GC during the shutdown. | 225 // so that the main thread won't get involved in a GC during the shutdown. |
223 ThreadState::detachMainThread(); | 226 ThreadState::detachMainThread(); |
224 | 227 |
225 v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate(); | 228 V8PerIsolateData::destroy(isolate); |
226 V8PerIsolateData::dispose(isolate); | |
227 isolate->Exit(); | 229 isolate->Exit(); |
228 isolate->Dispose(); | 230 isolate->Dispose(); |
229 | 231 |
230 shutdownWithoutV8(); | 232 shutdownWithoutV8(); |
231 } | 233 } |
232 | 234 |
233 void shutdownWithoutV8() | 235 void shutdownWithoutV8() |
234 { | 236 { |
235 ASSERT(!s_endOfTaskRunner); | 237 ASSERT(!s_endOfTaskRunner); |
236 CoreInitializer::shutdown(); | 238 CoreInitializer::shutdown(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 channel->state = WTFLogChannelOn; | 271 channel->state = WTFLogChannelOn; |
270 #endif // !LOG_DISABLED | 272 #endif // !LOG_DISABLED |
271 } | 273 } |
272 | 274 |
273 void resetPluginCache(bool reloadPages) | 275 void resetPluginCache(bool reloadPages) |
274 { | 276 { |
275 Page::refreshPlugins(reloadPages); | 277 Page::refreshPlugins(reloadPages); |
276 } | 278 } |
277 | 279 |
278 } // namespace blink | 280 } // namespace blink |
OLD | NEW |