| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 { | 95 { |
| 96 ASSERT(!isMainThread() || WebCore::V8RecursionScope::properlyUsed()); | 96 ASSERT(!isMainThread() || WebCore::V8RecursionScope::properlyUsed()); |
| 97 } | 97 } |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 void initialize(Platform* platform) | 100 void initialize(Platform* platform) |
| 101 { | 101 { |
| 102 initializeWithoutV8(platform); | 102 initializeWithoutV8(platform); |
| 103 | 103 |
| 104 v8::V8::SetEntropySource(&generateEntropy); | 104 v8::V8::SetEntropySource(&generateEntropy); |
| 105 v8::V8::SetArrayBufferAllocator(WebCore::v8ArrayBufferAllocator()); | |
| 106 static const char* kArrayBufferFlag = "--harmony_array_buffer"; | |
| 107 v8::V8::SetFlagsFromString(kArrayBufferFlag, strlen(kArrayBufferFlag)); | |
| 108 v8::V8::Initialize(); | 105 v8::V8::Initialize(); |
| 109 WebCore::V8PerIsolateData::ensureInitialized(v8::Isolate::GetCurrent()); | 106 WebCore::V8PerIsolateData::ensureInitialized(v8::Isolate::GetCurrent()); |
| 110 | 107 |
| 111 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. | 108 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. |
| 112 if (WebThread* currentThread = platform->currentThread()) { | 109 if (WebThread* currentThread = platform->currentThread()) { |
| 113 #ifndef NDEBUG | 110 #ifndef NDEBUG |
| 114 v8::V8::AddCallCompletedCallback(&assertV8RecursionScope); | 111 v8::V8::AddCallCompletedCallback(&assertV8RecursionScope); |
| 115 #endif | 112 #endif |
| 116 ASSERT(!s_endOfTaskRunner); | 113 ASSERT(!s_endOfTaskRunner); |
| 117 s_endOfTaskRunner = new EndOfTaskRunner; | 114 s_endOfTaskRunner = new EndOfTaskRunner; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 UNUSED_PARAM(name); | 206 UNUSED_PARAM(name); |
| 210 #endif // !LOG_DISABLED | 207 #endif // !LOG_DISABLED |
| 211 } | 208 } |
| 212 | 209 |
| 213 void resetPluginCache(bool reloadPages) | 210 void resetPluginCache(bool reloadPages) |
| 214 { | 211 { |
| 215 WebCore::Page::refreshPlugins(reloadPages); | 212 WebCore::Page::refreshPlugins(reloadPages); |
| 216 } | 213 } |
| 217 | 214 |
| 218 } // namespace WebKit | 215 } // namespace WebKit |
| OLD | NEW |