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

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

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
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/PlatformThreadData.h"
58 #include "platform/weborigin/KURL.h" 57 #include "platform/weborigin/KURL.h"
59 #include "wtf/Partitions.h" 58 #include "wtf/Partitions.h"
60 #include "wtf/text/StringStatics.h" 59 #include "wtf/text/StringStatics.h"
61 60
62 namespace blink { 61 namespace blink {
63 62
64 void CoreInitializer::registerEventFactory() 63 void CoreInitializer::registerEventFactory()
65 { 64 {
66 static bool isRegistered = false; 65 static bool isRegistered = false;
67 if (isRegistered) 66 if (isRegistered)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 WTF::StringStatics::init(); 100 WTF::StringStatics::init();
102 101
103 StyleChangeExtraData::init(); 102 StyleChangeExtraData::init();
104 103
105 QualifiedName::init(); 104 QualifiedName::init();
106 EventTracer::initialize(); 105 EventTracer::initialize();
107 KURL::initialize(); 106 KURL::initialize();
108 107
109 registerEventFactory(); 108 registerEventFactory();
110 109
111 // Ensure that the main thread's thread-local data is initialized before
112 // starting any worker threads.
113 PlatformThreadData::current();
114
115 StringImpl::freezeStaticStrings(); 110 StringImpl::freezeStaticStrings();
116 111
117 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but 112 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
118 // does not start the threads. 113 // does not start the threads.
119 HTMLParserThread::init(); 114 HTMLParserThread::init();
120 ScriptStreamerThread::init(); 115 ScriptStreamerThread::init();
121 } 116 }
122 117
123 void CoreInitializer::shutdown() 118 void CoreInitializer::shutdown()
124 { 119 {
125 // Make sure we stop the HTMLParserThread before Platform::current() is 120 // Make sure we stop the HTMLParserThread before Platform::current() is
126 // cleared. 121 // cleared.
127 HTMLParserThread::shutdown(); 122 HTMLParserThread::shutdown();
128 } 123 }
129 124
130 } // namespace blink 125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698