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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 27 matching lines...) Expand all
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/Logging.h" 43 #include "platform/Logging.h"
44 #include "platform/heap/Heap.h" 44 #include "platform/heap/Heap.h"
45 #include "public/platform/Platform.h" 45 #include "public/platform/Platform.h"
46 #include "public/platform/WebThread.h" 46 #include "public/platform/WebThread.h"
47 #include "wtf/Assertions.h" 47 #include "wtf/Assertions.h"
48 #include "wtf/PtrUtil.h"
49 #include "wtf/WTF.h" 48 #include "wtf/WTF.h"
50 #include "wtf/allocator/Partitions.h" 49 #include "wtf/allocator/Partitions.h"
51 #include "wtf/text/AtomicString.h" 50 #include "wtf/text/AtomicString.h"
52 #include "wtf/text/TextEncoding.h" 51 #include "wtf/text/TextEncoding.h"
53 #include <memory>
54 #include <v8.h> 52 #include <v8.h>
55 53
56 namespace blink { 54 namespace blink {
57 55
58 namespace { 56 namespace {
59 57
60 class EndOfTaskRunner : public WebThread::TaskObserver { 58 class EndOfTaskRunner : public WebThread::TaskObserver {
61 public: 59 public:
62 void willProcessTask() override 60 void willProcessTask() override
63 { 61 {
64 AnimationClock::notifyTaskStart(); 62 AnimationClock::notifyTaskStart();
65 } 63 }
66 void didProcessTask() override 64 void didProcessTask() override
67 { 65 {
68 Microtask::performCheckpoint(mainThreadIsolate()); 66 Microtask::performCheckpoint(mainThreadIsolate());
69 V8Initializer::reportRejectedPromisesOnMainThread(); 67 V8Initializer::reportRejectedPromisesOnMainThread();
70 } 68 }
71 }; 69 };
72 70
73 } // namespace 71 } // namespace
74 72
75 static WebThread::TaskObserver* s_endOfTaskRunner = nullptr; 73 static WebThread::TaskObserver* s_endOfTaskRunner = nullptr;
76 74
77 static ModulesInitializer& modulesInitializer() 75 static ModulesInitializer& modulesInitializer()
78 { 76 {
79 DEFINE_STATIC_LOCAL(std::unique_ptr<ModulesInitializer>, initializer, (wrapU nique(new ModulesInitializer))); 77 DEFINE_STATIC_LOCAL(OwnPtr<ModulesInitializer>, initializer, (adoptPtr(new M odulesInitializer)));
80 return *initializer; 78 return *initializer;
81 } 79 }
82 80
83 void initialize(Platform* platform) 81 void initialize(Platform* platform)
84 { 82 {
85 Platform::initialize(platform); 83 Platform::initialize(platform);
86 84
87 V8Initializer::initializeMainThread(); 85 V8Initializer::initializeMainThread();
88 86
89 modulesInitializer().initialize(); 87 modulesInitializer().initialize();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 178 }
181 179
182 void MemoryPressureNotificationToWorkerThreadIsolates( 180 void MemoryPressureNotificationToWorkerThreadIsolates(
183 v8::MemoryPressureLevel level) 181 v8::MemoryPressureLevel level)
184 { 182 {
185 WorkerBackingThread:: 183 WorkerBackingThread::
186 MemoryPressureNotificationToWorkerThreadIsolates(level); 184 MemoryPressureNotificationToWorkerThreadIsolates(level);
187 } 185 }
188 186
189 } // namespace blink 187 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebImageDecoder.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698