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

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

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