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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 frame()->isMainFrame()); | 105 frame()->isMainFrame()); |
106 | 106 |
107 DCHECK(m_lifecycle == Lifecycle::ContextInitialized); | 107 DCHECK(m_lifecycle == Lifecycle::ContextInitialized); |
108 m_lifecycle = Lifecycle::ContextDetached; | 108 m_lifecycle = Lifecycle::ContextDetached; |
109 } | 109 } |
110 | 110 |
111 void LocalWindowProxy::initialize() { | 111 void LocalWindowProxy::initialize() { |
112 TRACE_EVENT1("v8", "LocalWindowProxy::initialize", "isMainWindow", | 112 TRACE_EVENT1("v8", "LocalWindowProxy::initialize", "isMainWindow", |
113 frame()->isMainFrame()); | 113 frame()->isMainFrame()); |
114 SCOPED_BLINK_UMA_HISTOGRAM_TIMER( | 114 SCOPED_BLINK_UMA_HISTOGRAM_TIMER( |
115 frame()->isMainFrame() ? "Blink.Binding.InitializeMainWindowProxy" | 115 frame()->isMainFrame() |
116 : "Blink.Binding.InitializeNonMainWindowProxy"); | 116 ? "Blink.Binding.InitializeMainLocalWindowProxy" |
| 117 : "Blink.Binding.InitializeNonMainLocalWindowProxy"); |
117 | 118 |
118 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 119 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
119 | 120 |
120 v8::HandleScope handleScope(isolate()); | 121 v8::HandleScope handleScope(isolate()); |
121 | 122 |
122 createContext(); | 123 createContext(); |
123 | 124 |
124 ScriptState::Scope scope(m_scriptState.get()); | 125 ScriptState::Scope scope(m_scriptState.get()); |
125 v8::Local<v8::Context> context = m_scriptState->context(); | 126 v8::Local<v8::Context> context = m_scriptState->context(); |
126 if (m_globalProxy.isEmpty()) { | 127 if (m_globalProxy.isEmpty()) { |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 439 |
439 setSecurityToken(origin); | 440 setSecurityToken(origin); |
440 } | 441 } |
441 | 442 |
442 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, | 443 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, |
443 LocalFrame& frame, | 444 LocalFrame& frame, |
444 RefPtr<DOMWrapperWorld> world) | 445 RefPtr<DOMWrapperWorld> world) |
445 : WindowProxy(isolate, frame, std::move(world)) {} | 446 : WindowProxy(isolate, frame, std::move(world)) {} |
446 | 447 |
447 } // namespace blink | 448 } // namespace blink |
OLD | NEW |