| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 s_endOfTaskRunner = new EndOfTaskRunner; | 96 s_endOfTaskRunner = new EndOfTaskRunner; |
| 97 currentThread->addTaskObserver(s_endOfTaskRunner); | 97 currentThread->addTaskObserver(s_endOfTaskRunner); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 v8::Isolate* mainThreadIsolate() | 101 v8::Isolate* mainThreadIsolate() |
| 102 { | 102 { |
| 103 return V8PerIsolateData::mainThreadIsolate(); | 103 return V8PerIsolateData::mainThreadIsolate(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 // TODO(haraken): Remove this function. | |
| 107 void initializeWithoutV8(Platform* platform) | |
| 108 { | |
| 109 Platform::initialize(platform); | |
| 110 } | |
| 111 | |
| 112 void shutdown() | 106 void shutdown() |
| 113 { | 107 { |
| 114 ThreadState::current()->cleanupMainThread(); | 108 ThreadState::current()->cleanupMainThread(); |
| 115 | 109 |
| 116 // currentThread() is null if we are running on a thread without a message l
oop. | 110 // currentThread() is null if we are running on a thread without a message l
oop. |
| 117 if (Platform::current()->currentThread()) { | 111 if (Platform::current()->currentThread()) { |
| 118 // We don't need to (cannot) remove s_endOfTaskRunner from the current | 112 // We don't need to (cannot) remove s_endOfTaskRunner from the current |
| 119 // message loop, because the message loop is already destructed before | 113 // message loop, because the message loop is already destructed before |
| 120 // the shutdown() is called. | 114 // the shutdown() is called. |
| 121 delete s_endOfTaskRunner; | 115 delete s_endOfTaskRunner; |
| 122 s_endOfTaskRunner = nullptr; | 116 s_endOfTaskRunner = nullptr; |
| 123 } | 117 } |
| 124 | 118 |
| 125 V8Initializer::shutdownMainThread(); | 119 V8Initializer::shutdownMainThread(); |
| 126 | 120 |
| 127 modulesInitializer().shutdown(); | 121 modulesInitializer().shutdown(); |
| 128 | 122 |
| 129 Platform::shutdown(); | 123 Platform::shutdown(); |
| 130 } | 124 } |
| 131 | 125 |
| 132 // TODO(haraken): Remove this function. | |
| 133 void shutdownWithoutV8() | |
| 134 { | |
| 135 Platform::shutdown(); | |
| 136 } | |
| 137 | |
| 138 // TODO(tkent): The following functions to wrap LayoutTestSupport should be | 126 // TODO(tkent): The following functions to wrap LayoutTestSupport should be |
| 139 // moved to public/platform/. | 127 // moved to public/platform/. |
| 140 | 128 |
| 141 void setLayoutTestMode(bool value) | 129 void setLayoutTestMode(bool value) |
| 142 { | 130 { |
| 143 LayoutTestSupport::setIsRunningLayoutTest(value); | 131 LayoutTestSupport::setIsRunningLayoutTest(value); |
| 144 } | 132 } |
| 145 | 133 |
| 146 bool layoutTestMode() | 134 bool layoutTestMode() |
| 147 { | 135 { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ASSERT(!reloadPages); | 175 ASSERT(!reloadPages); |
| 188 Page::refreshPlugins(); | 176 Page::refreshPlugins(); |
| 189 } | 177 } |
| 190 | 178 |
| 191 void decommitFreeableMemory() | 179 void decommitFreeableMemory() |
| 192 { | 180 { |
| 193 WTF::Partitions::decommitFreeableMemory(); | 181 WTF::Partitions::decommitFreeableMemory(); |
| 194 } | 182 } |
| 195 | 183 |
| 196 } // namespace blink | 184 } // namespace blink |
| OLD | NEW |