| OLD | NEW |
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void CoreInitializer::RegisterEventFactory() { | 68 void CoreInitializer::RegisterEventFactory() { |
| 69 static bool is_registered = false; | 69 static bool is_registered = false; |
| 70 if (is_registered) | 70 if (is_registered) |
| 71 return; | 71 return; |
| 72 is_registered = true; | 72 is_registered = true; |
| 73 | 73 |
| 74 Document::RegisterEventFactory(EventFactory::Create()); | 74 Document::RegisterEventFactory(EventFactory::Create()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void CoreInitializer::Initialize() { | 77 void CoreInitializer::Initialize() { |
| 78 ASSERT(!IsInitialized()); | 78 DCHECK(!IsInitialized()); |
| 79 is_initialized_ = true; | 79 is_initialized_ = true; |
| 80 // Note: in order to add core static strings for a new module (1) | 80 // Note: in order to add core static strings for a new module (1) |
| 81 // the value of 'coreStaticStringsCount' must be updated with the | 81 // the value of 'coreStaticStringsCount' must be updated with the |
| 82 // added strings count, (2) if the added strings are quialified names | 82 // added strings count, (2) if the added strings are quialified names |
| 83 // the 'qualifiedNamesCount' must be updated as well, (3) the strings | 83 // the 'qualifiedNamesCount' must be updated as well, (3) the strings |
| 84 // 'init()' function call must be added. | 84 // 'init()' function call must be added. |
| 85 // TODO(mikhail.pozdnyakov@intel.com): We should generate static strings | 85 // TODO(mikhail.pozdnyakov@intel.com): We should generate static strings |
| 86 // initialization code. | 86 // initialization code. |
| 87 const unsigned kQualifiedNamesCount = | 87 const unsigned kQualifiedNamesCount = |
| 88 HTMLNames::HTMLTagsCount + HTMLNames::HTMLAttrsCount + | 88 HTMLNames::HTMLTagsCount + HTMLNames::HTMLAttrsCount + |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 SecurityPolicy::Init(); | 138 SecurityPolicy::Init(); |
| 139 | 139 |
| 140 RegisterEventFactory(); | 140 RegisterEventFactory(); |
| 141 | 141 |
| 142 StringImpl::FreezeStaticStrings(); | 142 StringImpl::FreezeStaticStrings(); |
| 143 | 143 |
| 144 ScriptStreamerThread::Init(); | 144 ScriptStreamerThread::Init(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace blink | 147 } // namespace blink |
| OLD | NEW |