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 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()); | 105 v8::V8::SetArrayBufferAllocator(WebCore::v8ArrayBufferAllocator()); |
106 static const char* kArrayBufferFlag = "--harmony_array_buffer"; | 106 static const char* kTypedArraysFlag = "--harmony_array_buffer --harmony_type
d_arrays"; |
107 v8::V8::SetFlagsFromString(kArrayBufferFlag, strlen(kArrayBufferFlag)); | 107 v8::V8::SetFlagsFromString(kTypedArraysFlag, strlen(kTypedArraysFlag)); |
108 v8::V8::Initialize(); | 108 v8::V8::Initialize(); |
109 WebCore::V8PerIsolateData::ensureInitialized(v8::Isolate::GetCurrent()); | 109 WebCore::V8PerIsolateData::ensureInitialized(v8::Isolate::GetCurrent()); |
110 | 110 |
111 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. | 111 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. |
112 if (WebThread* currentThread = platform->currentThread()) { | 112 if (WebThread* currentThread = platform->currentThread()) { |
113 #ifndef NDEBUG | 113 #ifndef NDEBUG |
114 v8::V8::AddCallCompletedCallback(&assertV8RecursionScope); | 114 v8::V8::AddCallCompletedCallback(&assertV8RecursionScope); |
115 #endif | 115 #endif |
116 ASSERT(!s_endOfTaskRunner); | 116 ASSERT(!s_endOfTaskRunner); |
117 s_endOfTaskRunner = new EndOfTaskRunner; | 117 s_endOfTaskRunner = new EndOfTaskRunner; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 UNUSED_PARAM(name); | 218 UNUSED_PARAM(name); |
219 #endif // !LOG_DISABLED | 219 #endif // !LOG_DISABLED |
220 } | 220 } |
221 | 221 |
222 void resetPluginCache(bool reloadPages) | 222 void resetPluginCache(bool reloadPages) |
223 { | 223 { |
224 WebCore::Page::refreshPlugins(reloadPages); | 224 WebCore::Page::refreshPlugins(reloadPages); |
225 } | 225 } |
226 | 226 |
227 } // namespace WebKit | 227 } // namespace WebKit |
OLD | NEW |