| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // object. Reuse the global object if one has been created earlier. | 264 // object. Reuse the global object if one has been created earlier. |
| 265 v8::Handle<v8::ObjectTemplate> globalTemplate = V8Window::GetShadowObjectTem
plate(m_isolate, m_world->isMainWorld() ? MainWorld : IsolatedWorld); | 265 v8::Handle<v8::ObjectTemplate> globalTemplate = V8Window::GetShadowObjectTem
plate(m_isolate, m_world->isMainWorld() ? MainWorld : IsolatedWorld); |
| 266 if (globalTemplate.IsEmpty()) | 266 if (globalTemplate.IsEmpty()) |
| 267 return; | 267 return; |
| 268 | 268 |
| 269 double contextCreationStartInSeconds = currentTime(); | 269 double contextCreationStartInSeconds = currentTime(); |
| 270 | 270 |
| 271 // Used to avoid sleep calls in unload handlers. | 271 // Used to avoid sleep calls in unload handlers. |
| 272 ScriptController::registerExtensionIfNeeded(DateExtension::get()); | 272 ScriptController::registerExtensionIfNeeded(DateExtension::get()); |
| 273 | 273 |
| 274 // Enables experimental i18n API in V8. | 274 // Enable i18n API in V8. |
| 275 if (RuntimeEnabledFeatures::javaScriptI18NAPIEnabled()) | 275 ScriptController::registerExtensionIfNeeded(v8_i18n::Extension::get()); |
| 276 ScriptController::registerExtensionIfNeeded(v8_i18n::Extension::get()); | |
| 277 | 276 |
| 278 // Dynamically tell v8 about our extensions now. | 277 // Dynamically tell v8 about our extensions now. |
| 279 const V8Extensions& extensions = ScriptController::registeredExtensions(); | 278 const V8Extensions& extensions = ScriptController::registeredExtensions(); |
| 280 OwnArrayPtr<const char*> extensionNames = adoptArrayPtr(new const char*[exte
nsions.size()]); | 279 OwnArrayPtr<const char*> extensionNames = adoptArrayPtr(new const char*[exte
nsions.size()]); |
| 281 int index = 0; | 280 int index = 0; |
| 282 int extensionGroup = m_world->extensionGroup(); | 281 int extensionGroup = m_world->extensionGroup(); |
| 283 int worldId = m_world->worldId(); | 282 int worldId = m_world->worldId(); |
| 284 for (size_t i = 0; i < extensions.size(); ++i) { | 283 for (size_t i = 0; i < extensions.size(); ++i) { |
| 285 // Ensure our date extension is always allowed. | 284 // Ensure our date extension is always allowed. |
| 286 if (extensions[i] != DateExtension::get() | 285 if (extensions[i] != DateExtension::get() |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 void V8WindowShell::updateSecurityOrigin() | 502 void V8WindowShell::updateSecurityOrigin() |
| 504 { | 503 { |
| 505 ASSERT(m_world->isMainWorld()); | 504 ASSERT(m_world->isMainWorld()); |
| 506 if (m_context.isEmpty()) | 505 if (m_context.isEmpty()) |
| 507 return; | 506 return; |
| 508 v8::HandleScope handleScope; | 507 v8::HandleScope handleScope; |
| 509 setSecurityToken(); | 508 setSecurityToken(); |
| 510 } | 509 } |
| 511 | 510 |
| 512 } // WebCore | 511 } // WebCore |
| OLD | NEW |