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

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

Issue 1117513003: Initializes SecurityPolicy static locals during blink initialization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/platform/weborigin/SecurityPolicy.h » ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/PlatformThreadData.h"
58 #include "platform/weborigin/KURL.h" 58 #include "platform/weborigin/KURL.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;
67 if (isRegistered) 68 if (isRegistered)
68 return; 69 return;
(...skipping 29 matching lines...) Expand all
98 99
99 // It would make logical sense to do this in WTF::initialize() but there are 100 // It would make logical sense to do this in WTF::initialize() but there are
100 // ordering dependencies, e.g. about "xmlns". 101 // ordering dependencies, e.g. about "xmlns".
101 WTF::StringStatics::init(); 102 WTF::StringStatics::init();
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();
109 SecurityPolicy::init();
108 110
109 registerEventFactory(); 111 registerEventFactory();
110 112
111 // Ensure that the main thread's thread-local data is initialized before 113 // Ensure that the main thread's thread-local data is initialized before
112 // starting any worker threads. 114 // starting any worker threads.
113 PlatformThreadData::current(); 115 PlatformThreadData::current();
114 116
115 StringImpl::freezeStaticStrings(); 117 StringImpl::freezeStaticStrings();
116 118
117 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but 119 // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
118 // does not start the threads. 120 // does not start the threads.
119 HTMLParserThread::init(); 121 HTMLParserThread::init();
120 ScriptStreamerThread::init(); 122 ScriptStreamerThread::init();
121 } 123 }
122 124
123 void CoreInitializer::shutdown() 125 void CoreInitializer::shutdown()
124 { 126 {
125 // Make sure we stop the HTMLParserThread before Platform::current() is 127 // Make sure we stop the HTMLParserThread before Platform::current() is
126 // cleared. 128 // cleared.
127 HTMLParserThread::shutdown(); 129 HTMLParserThread::shutdown();
128 } 130 }
129 131
130 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/weborigin/SecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698