| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 origin = m_world->isolatedWorldSecurityOrigin(); | 265 origin = m_world->isolatedWorldSecurityOrigin(); |
| 266 setSecurityToken(origin); | 266 setSecurityToken(origin); |
| 267 } | 267 } |
| 268 if (m_frame->isLocalFrame()) { | 268 if (m_frame->isLocalFrame()) { |
| 269 LocalFrame* frame = toLocalFrame(m_frame); | 269 LocalFrame* frame = toLocalFrame(m_frame); |
| 270 MainThreadDebugger::instance()->contextCreated(m_scriptState.get(), fram
e, origin); | 270 MainThreadDebugger::instance()->contextCreated(m_scriptState.get(), fram
e, origin); |
| 271 frame->loader().client()->didCreateScriptContext(context, m_world->exten
sionGroup(), m_world->worldId()); | 271 frame->loader().client()->didCreateScriptContext(context, m_world->exten
sionGroup(), m_world->worldId()); |
| 272 } | 272 } |
| 273 // If Origin Trials have been registered before the V8 context was ready, | 273 // If Origin Trials have been registered before the V8 context was ready, |
| 274 // then inject them into the context now | 274 // then inject them into the context now |
| 275 ExecutionContext* executionContext = m_scriptState->getExecutionContext(); | 275 if (m_world->isMainWorld()) { |
| 276 if (executionContext) { | 276 ExecutionContext* executionContext = m_scriptState->getExecutionContext(
); |
| 277 OriginTrialContext* originTrialContext = OriginTrialContext::from(execut
ionContext); | 277 if (executionContext) { |
| 278 if (originTrialContext) | 278 OriginTrialContext* originTrialContext = OriginTrialContext::from(ex
ecutionContext); |
| 279 originTrialContext->initializePendingFeatures(); | 279 if (originTrialContext) |
| 280 originTrialContext->initializePendingFeatures(); |
| 281 } |
| 280 } | 282 } |
| 281 return true; | 283 return true; |
| 282 } | 284 } |
| 283 | 285 |
| 284 void WindowProxy::createContext() | 286 void WindowProxy::createContext() |
| 285 { | 287 { |
| 286 // FIXME: This should be a null check of m_frame->client(), but there are st
ill some edge cases | 288 // FIXME: This should be a null check of m_frame->client(), but there are st
ill some edge cases |
| 287 // that this fails to catch during frame detach. | 289 // that this fails to catch during frame detach. |
| 288 if (m_frame->isLocalFrame() && !toLocalFrame(m_frame)->loader().documentLoad
er()) | 290 if (m_frame->isLocalFrame() && !toLocalFrame(m_frame)->loader().documentLoad
er()) |
| 289 return; | 291 return; |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 555 } |
| 554 | 556 |
| 555 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 557 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
| 556 { | 558 { |
| 557 if (!isContextInitialized()) | 559 if (!isContextInitialized()) |
| 558 return; | 560 return; |
| 559 setSecurityToken(origin); | 561 setSecurityToken(origin); |
| 560 } | 562 } |
| 561 | 563 |
| 562 } // namespace blink | 564 } // namespace blink |
| OLD | NEW |