| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 void V8WindowShell::createContext() | 254 void V8WindowShell::createContext() |
| 255 { | 255 { |
| 256 // The documentLoader pointer could be 0 during frame shutdown. | 256 // The documentLoader pointer could be 0 during frame shutdown. |
| 257 // FIXME: Can we remove this check? | 257 // FIXME: Can we remove this check? |
| 258 if (!m_frame->loader().documentLoader()) | 258 if (!m_frame->loader().documentLoader()) |
| 259 return; | 259 return; |
| 260 | 260 |
| 261 // Create a new environment using an empty template for the shadow | 261 // Create a new environment using an empty template for the shadow |
| 262 // object. Reuse the global object if one has been created earlier. | 262 // object. Reuse the global object if one has been created earlier. |
| 263 v8::Handle<v8::ObjectTemplate> globalTemplate = V8Window::getShadowObjectTem
plate(m_isolate, m_world->isMainWorld() ? MainWorld : IsolatedWorld); | 263 v8::Handle<v8::ObjectTemplate> globalTemplate = V8Window::getShadowObjectTem
plate(m_isolate); |
| 264 if (globalTemplate.IsEmpty()) | 264 if (globalTemplate.IsEmpty()) |
| 265 return; | 265 return; |
| 266 | 266 |
| 267 double contextCreationStartInSeconds = currentTime(); | 267 double contextCreationStartInSeconds = currentTime(); |
| 268 | 268 |
| 269 // Dynamically tell v8 about our extensions now. | 269 // Dynamically tell v8 about our extensions now. |
| 270 const V8Extensions& extensions = ScriptController::registeredExtensions(); | 270 const V8Extensions& extensions = ScriptController::registeredExtensions(); |
| 271 OwnPtr<const char*[]> extensionNames = adoptArrayPtr(new const char*[extensi
ons.size()]); | 271 OwnPtr<const char*[]> extensionNames = adoptArrayPtr(new const char*[extensi
ons.size()]); |
| 272 int index = 0; | 272 int index = 0; |
| 273 int extensionGroup = m_world->extensionGroup(); | 273 int extensionGroup = m_world->extensionGroup(); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) | 492 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) |
| 493 { | 493 { |
| 494 ASSERT(m_world->isMainWorld()); | 494 ASSERT(m_world->isMainWorld()); |
| 495 if (!m_perContextData) | 495 if (!m_perContextData) |
| 496 return; | 496 return; |
| 497 v8::HandleScope handleScope(m_isolate); | 497 v8::HandleScope handleScope(m_isolate); |
| 498 setSecurityToken(origin); | 498 setSecurityToken(origin); |
| 499 } | 499 } |
| 500 | 500 |
| 501 } // WebCore | 501 } // WebCore |
| OLD | NEW |