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

Side by Side Diff: third_party/WebKit/Source/web/WebKit.cpp

Issue 1399993004: testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: testing. Created 5 years, 2 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
OLDNEW
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 23 matching lines...) Expand all
34 #include "bindings/core/v8/ScriptStreamerThread.h" 34 #include "bindings/core/v8/ScriptStreamerThread.h"
35 #include "bindings/core/v8/V8Binding.h" 35 #include "bindings/core/v8/V8Binding.h"
36 #include "bindings/core/v8/V8GCController.h" 36 #include "bindings/core/v8/V8GCController.h"
37 #include "bindings/core/v8/V8Initializer.h" 37 #include "bindings/core/v8/V8Initializer.h"
38 #include "core/Init.h" 38 #include "core/Init.h"
39 #include "core/animation/AnimationClock.h" 39 #include "core/animation/AnimationClock.h"
40 #include "core/dom/Microtask.h" 40 #include "core/dom/Microtask.h"
41 #include "core/frame/Settings.h" 41 #include "core/frame/Settings.h"
42 #include "core/page/Page.h" 42 #include "core/page/Page.h"
43 #include "core/workers/WorkerGlobalScopeProxy.h" 43 #include "core/workers/WorkerGlobalScopeProxy.h"
44 #include "core/fetch/MemoryCache.h"
44 #include "gin/public/v8_platform.h" 45 #include "gin/public/v8_platform.h"
45 #include "modules/InitModules.h" 46 #include "modules/InitModules.h"
46 #include "platform/LayoutTestSupport.h" 47 #include "platform/LayoutTestSupport.h"
47 #include "platform/Logging.h" 48 #include "platform/Logging.h"
48 #include "platform/RuntimeEnabledFeatures.h" 49 #include "platform/RuntimeEnabledFeatures.h"
49 #include "platform/graphics/ImageDecodingStore.h" 50 #include "platform/graphics/ImageDecodingStore.h"
50 #include "platform/heap/Heap.h" 51 #include "platform/heap/Heap.h"
51 #include "platform/heap/glue/MessageLoopInterruptor.h" 52 #include "platform/heap/glue/MessageLoopInterruptor.h"
52 #include "platform/heap/glue/PendingGCRunner.h" 53 #include "platform/heap/glue/PendingGCRunner.h"
53 #include "public/platform/Platform.h" 54 #include "public/platform/Platform.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 OwnPtr<V8IsolateInterruptor> interruptor = adoptPtr(new V8IsolateInterruptor (V8PerIsolateData::mainThreadIsolate())); 116 OwnPtr<V8IsolateInterruptor> interruptor = adoptPtr(new V8IsolateInterruptor (V8PerIsolateData::mainThreadIsolate()));
116 ThreadState::current()->addInterruptor(interruptor.release()); 117 ThreadState::current()->addInterruptor(interruptor.release());
117 ThreadState::current()->registerTraceDOMWrappers(V8PerIsolateData::mainThrea dIsolate(), V8GCController::traceDOMWrappers); 118 ThreadState::current()->registerTraceDOMWrappers(V8PerIsolateData::mainThrea dIsolate(), V8GCController::traceDOMWrappers);
118 119
119 // currentThread is null if we are running on a thread without a message loo p. 120 // currentThread is null if we are running on a thread without a message loo p.
120 if (WebThread* currentThread = platform->currentThread()) { 121 if (WebThread* currentThread = platform->currentThread()) {
121 ASSERT(!s_endOfTaskRunner); 122 ASSERT(!s_endOfTaskRunner);
122 s_endOfTaskRunner = new EndOfTaskRunner; 123 s_endOfTaskRunner = new EndOfTaskRunner;
123 currentThread->addTaskObserver(s_endOfTaskRunner); 124 currentThread->addTaskObserver(s_endOfTaskRunner);
125
126 memoryCache();
124 } 127 }
125 } 128 }
126 129
127 v8::Isolate* mainThreadIsolate() 130 v8::Isolate* mainThreadIsolate()
128 { 131 {
129 return V8PerIsolateData::mainThreadIsolate(); 132 return V8PerIsolateData::mainThreadIsolate();
130 } 133 }
131 134
132 static double currentTimeFunction() 135 static double currentTimeFunction()
133 { 136 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ()); 194 DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ());
192 initializer.init(); 195 initializer.init();
193 196
194 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create); 197 setIndexedDBClientCreateFunction(IndexedDBClientImpl::create);
195 } 198 }
196 199
197 void shutdown() 200 void shutdown()
198 { 201 {
199 // currentThread() is null if we are running on a thread without a message l oop. 202 // currentThread() is null if we are running on a thread without a message l oop.
200 if (Platform::current()->currentThread()) { 203 if (Platform::current()->currentThread()) {
204 shutdownCache();
205
201 // We don't need to (cannot) remove s_endOfTaskRunner from the current 206 // We don't need to (cannot) remove s_endOfTaskRunner from the current
202 // message loop, because the message loop is already destructed before 207 // message loop, because the message loop is already destructed before
203 // the shutdown() is called. 208 // the shutdown() is called.
204 delete s_endOfTaskRunner; 209 delete s_endOfTaskRunner;
205 s_endOfTaskRunner = 0; 210 s_endOfTaskRunner = 0;
206 } 211 }
207 212
208 // currentThread() is null if we are running on a thread without a message l oop. 213 // currentThread() is null if we are running on a thread without a message l oop.
209 if (Platform::current()->currentThread()) { 214 if (Platform::current()->currentThread()) {
210 ASSERT(s_pendingGCRunner); 215 ASSERT(s_pendingGCRunner);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ASSERT(!reloadPages); 284 ASSERT(!reloadPages);
280 Page::refreshPlugins(); 285 Page::refreshPlugins();
281 } 286 }
282 287
283 void decommitFreeableMemory() 288 void decommitFreeableMemory()
284 { 289 {
285 WTF::Partitions::decommitFreeableMemory(); 290 WTF::Partitions::decommitFreeableMemory();
286 } 291 }
287 292
288 } // namespace blink 293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698