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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // it won't be able to reach the outer window via its global object. | 212 // it won't be able to reach the outer window via its global object. |
213 bool WindowProxy::initializeIfNeeded() { | 213 bool WindowProxy::initializeIfNeeded() { |
214 if (isContextInitialized()) | 214 if (isContextInitialized()) |
215 return true; | 215 return true; |
216 | 216 |
217 return initialize(); | 217 return initialize(); |
218 } | 218 } |
219 | 219 |
220 bool WindowProxy::initialize() { | 220 bool WindowProxy::initialize() { |
221 TRACE_EVENT0("v8", "WindowProxy::initialize"); | 221 TRACE_EVENT0("v8", "WindowProxy::initialize"); |
222 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "InitializeWindow"); | |
223 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Binding.InitializeWindowProxy"); | 222 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Binding.InitializeWindowProxy"); |
224 | 223 |
225 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 224 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
226 | 225 |
227 v8::HandleScope handleScope(m_isolate); | 226 v8::HandleScope handleScope(m_isolate); |
228 | 227 |
229 createContext(); | 228 createContext(); |
230 | 229 |
231 if (!isContextInitialized()) | 230 if (!isContextInitialized()) |
232 return false; | 231 return false; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 v8String(m_isolate, name)); | 576 v8String(m_isolate, name)); |
578 } | 577 } |
579 | 578 |
580 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { | 579 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { |
581 if (!isContextInitialized()) | 580 if (!isContextInitialized()) |
582 return; | 581 return; |
583 setSecurityToken(origin); | 582 setSecurityToken(origin); |
584 } | 583 } |
585 | 584 |
586 } // namespace blink | 585 } // namespace blink |
OLD | NEW |