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

Side by Side Diff: Source/core/Init.cpp

Issue 1041103002: PartitionAlloc: Centralize Partition allocators into one place (Part 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/V8GCController.cpp ('k') | Source/core/dom/Node.cpp » ('j') | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "core/XMLNames.h" 47 #include "core/XMLNames.h"
48 #include "core/css/parser/CSSParserTokenRange.h" 48 #include "core/css/parser/CSSParserTokenRange.h"
49 #include "core/dom/Document.h" 49 #include "core/dom/Document.h"
50 #include "core/dom/StyleChangeReason.h" 50 #include "core/dom/StyleChangeReason.h"
51 #include "core/events/EventFactory.h" 51 #include "core/events/EventFactory.h"
52 #include "core/fetch/FetchInitiatorTypeNames.h" 52 #include "core/fetch/FetchInitiatorTypeNames.h"
53 #include "core/html/parser/HTMLParserThread.h" 53 #include "core/html/parser/HTMLParserThread.h"
54 #include "core/workers/WorkerThread.h" 54 #include "core/workers/WorkerThread.h"
55 #include "platform/EventTracer.h" 55 #include "platform/EventTracer.h"
56 #include "platform/FontFamilyNames.h" 56 #include "platform/FontFamilyNames.h"
57 #include "platform/Partitions.h"
58 #include "platform/PlatformThreadData.h" 57 #include "platform/PlatformThreadData.h"
59 #include "platform/weborigin/KURL.h" 58 #include "platform/weborigin/KURL.h"
59 #include "wtf/Partitions.h"
60 #include "wtf/text/StringStatics.h" 60 #include "wtf/text/StringStatics.h"
61 61
62 namespace blink { 62 namespace blink {
63 63
64 void CoreInitializer::registerEventFactory() 64 void CoreInitializer::registerEventFactory()
65 { 65 {
66 static bool isRegistered = false; 66 static bool isRegistered = false;
67 if (isRegistered) 67 if (isRegistered)
68 return; 68 return;
69 isRegistered = true; 69 isRegistered = true;
(...skipping 26 matching lines...) Expand all
96 CSSPrimitiveValue::initUnitTable(); 96 CSSPrimitiveValue::initUnitTable();
97 CSSParserTokenRange::initStaticEOFToken(); 97 CSSParserTokenRange::initStaticEOFToken();
98 98
99 // It would make logical sense to do this in WTF::initialize() but there are 99 // It would make logical sense to do this in WTF::initialize() but there are
100 // ordering dependencies, e.g. about "xmlns". 100 // ordering dependencies, e.g. about "xmlns".
101 WTF::StringStatics::init(); 101 WTF::StringStatics::init();
102 102
103 StyleChangeExtraData::init(); 103 StyleChangeExtraData::init();
104 104
105 QualifiedName::init(); 105 QualifiedName::init();
106 Partitions::init();
107 EventTracer::initialize(); 106 EventTracer::initialize();
108 KURL::initialize(); 107 KURL::initialize();
109 108
110 registerEventFactory(); 109 registerEventFactory();
111 110
112 // Ensure that the main thread's thread-local data is initialized before 111 // Ensure that the main thread's thread-local data is initialized before
113 // starting any worker threads. 112 // starting any worker threads.
114 PlatformThreadData::current(); 113 PlatformThreadData::current();
115 114
116 StringImpl::freezeStaticStrings(); 115 StringImpl::freezeStaticStrings();
117 116
118 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but 117 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
119 // does not start the threads. 118 // does not start the threads.
120 HTMLParserThread::init(); 119 HTMLParserThread::init();
121 ScriptStreamerThread::init(); 120 ScriptStreamerThread::init();
122 } 121 }
123 122
124 void CoreInitializer::shutdown() 123 void CoreInitializer::shutdown()
125 { 124 {
126 // Make sure we stop the HTMLParserThread before Platform::current() is 125 // Make sure we stop the HTMLParserThread before Platform::current() is
127 // cleared. 126 // cleared.
128 HTMLParserThread::shutdown(); 127 HTMLParserThread::shutdown();
129
130 Partitions::shutdown();
131 } 128 }
132 129
133 } // namespace blink 130 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8GCController.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698