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

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

Issue 1167023002: Revert of Implement timers by posting delayed tasks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/fetch/ResourceTest.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/PlatformThreadData.h"
57 #include "platform/weborigin/KURL.h" 58 #include "platform/weborigin/KURL.h"
58 #include "platform/weborigin/SecurityPolicy.h" 59 #include "platform/weborigin/SecurityPolicy.h"
59 #include "wtf/Partitions.h" 60 #include "wtf/Partitions.h"
60 #include "wtf/text/StringStatics.h" 61 #include "wtf/text/StringStatics.h"
61 62
62 namespace blink { 63 namespace blink {
63 64
64 void CoreInitializer::registerEventFactory() 65 void CoreInitializer::registerEventFactory()
65 { 66 {
66 static bool isRegistered = false; 67 static bool isRegistered = false;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 103
103 StyleChangeExtraData::init(); 104 StyleChangeExtraData::init();
104 105
105 QualifiedName::init(); 106 QualifiedName::init();
106 EventTracer::initialize(); 107 EventTracer::initialize();
107 KURL::initialize(); 108 KURL::initialize();
108 SecurityPolicy::init(); 109 SecurityPolicy::init();
109 110
110 registerEventFactory(); 111 registerEventFactory();
111 112
113 // Ensure that the main thread's thread-local data is initialized before
114 // starting any worker threads.
115 PlatformThreadData::current();
116
112 StringImpl::freezeStaticStrings(); 117 StringImpl::freezeStaticStrings();
113 118
114 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but 119 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
115 // does not start the threads. 120 // does not start the threads.
116 HTMLParserThread::init(); 121 HTMLParserThread::init();
117 ScriptStreamerThread::init(); 122 ScriptStreamerThread::init();
118 } 123 }
119 124
120 void CoreInitializer::shutdown() 125 void CoreInitializer::shutdown()
121 { 126 {
122 // Make sure we stop the HTMLParserThread before Platform::current() is 127 // Make sure we stop the HTMLParserThread before Platform::current() is
123 // cleared. 128 // cleared.
124 HTMLParserThread::shutdown(); 129 HTMLParserThread::shutdown();
125 } 130 }
126 131
127 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/fetch/ResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698