| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 disposeContext(DoNotDetachGlobal); | 210 disposeContext(DoNotDetachGlobal); |
| 211 return false; | 211 return false; |
| 212 } | 212 } |
| 213 | 213 |
| 214 if (m_world->isMainWorld()) { | 214 if (m_world->isMainWorld()) { |
| 215 // ActivityLogger for main world is updated within updateDocument(). | 215 // ActivityLogger for main world is updated within updateDocument(). |
| 216 updateDocument(); | 216 updateDocument(); |
| 217 if (m_frame->document()) { | 217 if (m_frame->document()) { |
| 218 setSecurityToken(m_frame->document()->securityOrigin()); | 218 setSecurityToken(m_frame->document()->securityOrigin()); |
| 219 ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPol
icy(); | 219 ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPol
icy(); |
| 220 context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSec
urityPolicy::SuppressReport)); | 220 if (csp) { |
| 221 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isol
ate, csp->evalDisabledErrorMessage())); | 221 context->AllowCodeGenerationFromStrings(csp->allowEval(0, Conten
tSecurityPolicy::SuppressReport)); |
| 222 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_
isolate, csp->evalDisabledErrorMessage())); |
| 223 } |
| 222 } | 224 } |
| 223 } else { | 225 } else { |
| 224 updateActivityLogger(); | 226 updateActivityLogger(); |
| 225 SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin(); | 227 SecurityOrigin* origin = m_world->isolatedWorldSecurityOrigin(); |
| 226 setSecurityToken(origin); | 228 setSecurityToken(origin); |
| 227 if (origin && InspectorInstrumentation::hasFrontends()) { | 229 if (origin && InspectorInstrumentation::hasFrontends()) { |
| 228 InspectorInstrumentation::didCreateIsolatedContext(m_frame, m_script
State.get(), origin); | 230 InspectorInstrumentation::didCreateIsolatedContext(m_frame, m_script
State.get(), origin); |
| 229 } | 231 } |
| 230 } | 232 } |
| 231 m_frame->loader().client()->didCreateScriptContext(context, m_world->extensi
onGroup(), m_world->worldId()); | 233 m_frame->loader().client()->didCreateScriptContext(context, m_world->extensi
onGroup(), m_world->worldId()); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 | 486 |
| 485 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 487 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
| 486 { | 488 { |
| 487 ASSERT(m_world->isMainWorld()); | 489 ASSERT(m_world->isMainWorld()); |
| 488 if (!isContextInitialized()) | 490 if (!isContextInitialized()) |
| 489 return; | 491 return; |
| 490 setSecurityToken(origin); | 492 setSecurityToken(origin); |
| 491 } | 493 } |
| 492 | 494 |
| 493 } // namespace blink | 495 } // namespace blink |
| OLD | NEW |