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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "bindings/core/v8/V8Initializer.h" | 43 #include "bindings/core/v8/V8Initializer.h" |
44 #include "bindings/core/v8/V8ObjectConstructor.h" | 44 #include "bindings/core/v8/V8ObjectConstructor.h" |
45 #include "bindings/core/v8/V8PagePopupControllerBinding.h" | 45 #include "bindings/core/v8/V8PagePopupControllerBinding.h" |
46 #include "bindings/core/v8/V8Window.h" | 46 #include "bindings/core/v8/V8Window.h" |
47 #include "core/frame/LocalFrame.h" | 47 #include "core/frame/LocalFrame.h" |
48 #include "core/frame/csp/ContentSecurityPolicy.h" | 48 #include "core/frame/csp/ContentSecurityPolicy.h" |
49 #include "core/html/DocumentNameCollection.h" | 49 #include "core/html/DocumentNameCollection.h" |
50 #include "core/html/HTMLCollection.h" | 50 #include "core/html/HTMLCollection.h" |
51 #include "core/html/HTMLIFrameElement.h" | 51 #include "core/html/HTMLIFrameElement.h" |
52 #include "core/inspector/InspectorInstrumentation.h" | 52 #include "core/inspector/InspectorInstrumentation.h" |
| 53 #include "core/inspector/MainThreadDebugger.h" |
53 #include "core/loader/DocumentLoader.h" | 54 #include "core/loader/DocumentLoader.h" |
54 #include "core/loader/FrameLoader.h" | 55 #include "core/loader/FrameLoader.h" |
55 #include "core/loader/FrameLoaderClient.h" | 56 #include "core/loader/FrameLoaderClient.h" |
56 #include "platform/RuntimeEnabledFeatures.h" | 57 #include "platform/RuntimeEnabledFeatures.h" |
57 #include "platform/ScriptForbiddenScope.h" | 58 #include "platform/ScriptForbiddenScope.h" |
58 #include "platform/TraceEvent.h" | 59 #include "platform/TraceEvent.h" |
59 #include "platform/heap/Handle.h" | 60 #include "platform/heap/Handle.h" |
60 #include "platform/weborigin/SecurityOrigin.h" | 61 #include "platform/weborigin/SecurityOrigin.h" |
61 #include "public/platform/Platform.h" | 62 #include "public/platform/Platform.h" |
62 #include "wtf/Assertions.h" | 63 #include "wtf/Assertions.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 ContentSecurityPolicy* csp = m_frame->securityContext()->contentSecurity
Policy(); | 248 ContentSecurityPolicy* csp = m_frame->securityContext()->contentSecurity
Policy(); |
248 context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurit
yPolicy::SuppressReport)); | 249 context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurit
yPolicy::SuppressReport)); |
249 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate,
csp->evalDisabledErrorMessage())); | 250 context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate,
csp->evalDisabledErrorMessage())); |
250 } else { | 251 } else { |
251 updateActivityLogger(); | 252 updateActivityLogger(); |
252 origin = m_world->isolatedWorldSecurityOrigin(); | 253 origin = m_world->isolatedWorldSecurityOrigin(); |
253 setSecurityToken(origin); | 254 setSecurityToken(origin); |
254 } | 255 } |
255 if (m_frame->isLocalFrame()) { | 256 if (m_frame->isLocalFrame()) { |
256 LocalFrame* frame = toLocalFrame(m_frame); | 257 LocalFrame* frame = toLocalFrame(m_frame); |
| 258 MainThreadDebugger::initializeContext(context, m_world->worldId()); |
257 InspectorInstrumentation::didCreateScriptContext(frame, m_scriptState.ge
t(), origin, m_world->worldId()); | 259 InspectorInstrumentation::didCreateScriptContext(frame, m_scriptState.ge
t(), origin, m_world->worldId()); |
258 frame->loader().client()->didCreateScriptContext(context, m_world->exten
sionGroup(), m_world->worldId()); | 260 frame->loader().client()->didCreateScriptContext(context, m_world->exten
sionGroup(), m_world->worldId()); |
259 } | 261 } |
260 return true; | 262 return true; |
261 } | 263 } |
262 | 264 |
263 void WindowProxy::createContext() | 265 void WindowProxy::createContext() |
264 { | 266 { |
265 // FIXME: This should be a null check of m_frame->client(), but there are st
ill some edge cases | 267 // FIXME: This should be a null check of m_frame->client(), but there are st
ill some edge cases |
266 // that this fails to catch during frame detach. | 268 // that this fails to catch during frame detach. |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 518 |
517 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 519 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
518 { | 520 { |
519 ASSERT(m_world->isMainWorld()); | 521 ASSERT(m_world->isMainWorld()); |
520 if (!isContextInitialized()) | 522 if (!isContextInitialized()) |
521 return; | 523 return; |
522 setSecurityToken(origin); | 524 setSecurityToken(origin); |
523 } | 525 } |
524 | 526 |
525 } // namespace blink | 527 } // namespace blink |
OLD | NEW |