Chromium Code Reviews| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 return false; | 205 return false; |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 if (!m_world->isMainWorld()) { | 209 if (!m_world->isMainWorld()) { |
| 210 V8WindowShell* mainWindow = m_frame->script().existingWindowShell(DOMWra pperWorld::mainWorld()); | 210 V8WindowShell* mainWindow = m_frame->script().existingWindowShell(DOMWra pperWorld::mainWorld()); |
| 211 if (mainWindow && !mainWindow->context().IsEmpty()) | 211 if (mainWindow && !mainWindow->context().IsEmpty()) |
| 212 setInjectedScriptContextDebugId(context, m_frame->script().contextDe bugId(mainWindow->context())); | 212 setInjectedScriptContextDebugId(context, m_frame->script().contextDe bugId(mainWindow->context())); |
| 213 } | 213 } |
| 214 | 214 |
| 215 m_scriptState->perContextData()->setActivityLogger(V8DOMActivityLogger::acti vityLogger(m_world->worldId())); | 215 m_scriptState->perContextData()->setActivityLogger( |
|
haraken
2014/04/30 00:54:20
It's mis-designed that ActivityLogger is cached on
| |
| 216 V8DOMActivityLogger::activityLogger(m_world->worldId(), | |
| 217 m_frame->document() ? m_frame->document()->baseURI() : KURL())); | |
| 216 if (!installDOMWindow()) { | 218 if (!installDOMWindow()) { |
| 217 disposeContext(DoNotDetachGlobal); | 219 disposeContext(DoNotDetachGlobal); |
| 218 return false; | 220 return false; |
| 219 } | 221 } |
| 220 | 222 |
| 221 if (m_world->isMainWorld()) { | 223 if (m_world->isMainWorld()) { |
| 222 updateDocument(); | 224 updateDocument(); |
| 223 if (m_frame->document()) { | 225 if (m_frame->document()) { |
| 224 setSecurityToken(m_frame->document()->securityOrigin()); | 226 setSecurityToken(m_frame->document()->securityOrigin()); |
| 225 ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPol icy(); | 227 ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPol icy(); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 | 488 |
| 487 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) | 489 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) |
| 488 { | 490 { |
| 489 ASSERT(m_world->isMainWorld()); | 491 ASSERT(m_world->isMainWorld()); |
| 490 if (!isContextInitialized()) | 492 if (!isContextInitialized()) |
| 491 return; | 493 return; |
| 492 setSecurityToken(origin); | 494 setSecurityToken(origin); |
| 493 } | 495 } |
| 494 | 496 |
| 495 } // WebCore | 497 } // WebCore |
| OLD | NEW |