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

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

Issue 2475293003: [RemotePlayback] No monitoring on low-end devices (Closed)
Patch Set: Use blink::initialize Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/platform/MemoryCoordinator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 #include "bindings/core/v8/Microtask.h" 33 #include "bindings/core/v8/Microtask.h"
34 #include "bindings/core/v8/V8Binding.h" 34 #include "bindings/core/v8/V8Binding.h"
35 #include "bindings/core/v8/V8GCController.h" 35 #include "bindings/core/v8/V8GCController.h"
36 #include "bindings/core/v8/V8Initializer.h" 36 #include "bindings/core/v8/V8Initializer.h"
37 #include "core/animation/AnimationClock.h" 37 #include "core/animation/AnimationClock.h"
38 #include "core/page/Page.h" 38 #include "core/page/Page.h"
39 #include "core/workers/WorkerBackingThread.h" 39 #include "core/workers/WorkerBackingThread.h"
40 #include "gin/public/v8_platform.h" 40 #include "gin/public/v8_platform.h"
41 #include "modules/ModulesInitializer.h" 41 #include "modules/ModulesInitializer.h"
42 #include "platform/LayoutTestSupport.h" 42 #include "platform/LayoutTestSupport.h"
43 #include "platform/MemoryCoordinator.h"
43 #include "platform/heap/Heap.h" 44 #include "platform/heap/Heap.h"
44 #include "public/platform/Platform.h" 45 #include "public/platform/Platform.h"
45 #include "public/platform/WebThread.h" 46 #include "public/platform/WebThread.h"
46 #include "wtf/Assertions.h" 47 #include "wtf/Assertions.h"
47 #include "wtf/PtrUtil.h" 48 #include "wtf/PtrUtil.h"
48 #include "wtf/WTF.h" 49 #include "wtf/WTF.h"
49 #include "wtf/allocator/Partitions.h" 50 #include "wtf/allocator/Partitions.h"
50 #include "wtf/text/AtomicString.h" 51 #include "wtf/text/AtomicString.h"
51 #include "wtf/text/TextEncoding.h" 52 #include "wtf/text/TextEncoding.h"
52 #include <memory> 53 #include <memory>
(...skipping 20 matching lines...) Expand all
73 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer, 74 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer,
74 (wrapUnique(new ModulesInitializer))); 75 (wrapUnique(new ModulesInitializer)));
75 return *initializer; 76 return *initializer;
76 } 77 }
77 78
78 void initialize(Platform* platform) { 79 void initialize(Platform* platform) {
79 Platform::initialize(platform); 80 Platform::initialize(platform);
80 81
81 V8Initializer::initializeMainThread(); 82 V8Initializer::initializeMainThread();
82 83
84 // Seems like the most suitable place for this initialization. See the
85 // discussion at https://codereview.chromium.org/2475293003.
86 MemoryCoordinator::initialize();
haraken 2016/11/29 02:02:46 We should call this in Platform::initialize since
whywhat 2016/11/29 20:04:44 Done.
87
83 modulesInitializer().initialize(); 88 modulesInitializer().initialize();
84 89
85 // currentThread is null if we are running on a thread without a message loop. 90 // currentThread is null if we are running on a thread without a message loop.
86 if (WebThread* currentThread = platform->currentThread()) { 91 if (WebThread* currentThread = platform->currentThread()) {
87 DCHECK(!s_endOfTaskRunner); 92 DCHECK(!s_endOfTaskRunner);
88 s_endOfTaskRunner = new EndOfTaskRunner; 93 s_endOfTaskRunner = new EndOfTaskRunner;
89 currentThread->addTaskObserver(s_endOfTaskRunner); 94 currentThread->addTaskObserver(s_endOfTaskRunner);
90 } 95 }
91 } 96 }
92 97
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void MemoryPressureNotificationToWorkerThreadIsolates( 151 void MemoryPressureNotificationToWorkerThreadIsolates(
147 v8::MemoryPressureLevel level) { 152 v8::MemoryPressureLevel level) {
148 WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(level); 153 WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(level);
149 } 154 }
150 155
151 void setRAILModeOnWorkerThreadIsolates(v8::RAILMode railMode) { 156 void setRAILModeOnWorkerThreadIsolates(v8::RAILMode railMode) {
152 WorkerBackingThread::setRAILModeOnWorkerThreadIsolates(railMode); 157 WorkerBackingThread::setRAILModeOnWorkerThreadIsolates(railMode);
153 } 158 }
154 159
155 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/MemoryCoordinator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698