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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // clearForNavigation(). | 115 // clearForNavigation(). |
116 if (m_lifecycle == Lifecycle::ContextDetached) | 116 if (m_lifecycle == Lifecycle::ContextDetached) |
117 ASSERT(m_scriptState->isGlobalObjectDetached()); | 117 ASSERT(m_scriptState->isGlobalObjectDetached()); |
118 | 118 |
119 v8::Local<v8::Object> global = m_globalProxy.newLocal(m_isolate); | 119 v8::Local<v8::Object> global = m_globalProxy.newLocal(m_isolate); |
120 m_globalProxy.clear(); | 120 m_globalProxy.clear(); |
121 return global; | 121 return global; |
122 } | 122 } |
123 | 123 |
124 void WindowProxy::setGlobal(v8::Local<v8::Object> global) { | 124 void WindowProxy::setGlobal(v8::Local<v8::Object> global) { |
| 125 DCHECK(m_lifecycle == Lifecycle::ContextUninitialized); |
| 126 |
125 m_globalProxy.set(m_isolate, global); | 127 m_globalProxy.set(m_isolate, global); |
126 | 128 |
127 // Initialize the window proxy now, to re-establish the connection between | 129 // Initialize the window proxy now, to re-establish the connection between |
128 // the global object and the v8::Context. This is really only needed for a | 130 // the global object and the v8::Context. This is really only needed for a |
129 // RemoteDOMWindow, since it has no scripting environment of its own. | 131 // RemoteDOMWindow, since it has no scripting environment of its own. |
130 // Without this, existing script references to a swapped in RemoteDOMWindow | 132 // Without this, existing script references to a swapped in RemoteDOMWindow |
131 // would be broken until that RemoteDOMWindow was vended again through an | 133 // would be broken until that RemoteDOMWindow was vended again through an |
132 // interface like window.frames. | 134 // interface like window.frames. |
133 initializeIfNeeded(); | 135 initializeIfNeeded(); |
134 } | 136 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 V8DOMWrapper::setNativeInfo(m_isolate, windowProperties, wrapperTypeInfo, | 239 V8DOMWrapper::setNativeInfo(m_isolate, windowProperties, wrapperTypeInfo, |
238 window); | 240 window); |
239 | 241 |
240 // TODO(keishi): Remove installPagePopupController and implement | 242 // TODO(keishi): Remove installPagePopupController and implement |
241 // PagePopupController in another way. | 243 // PagePopupController in another way. |
242 V8PagePopupControllerBinding::installPagePopupController(context, | 244 V8PagePopupControllerBinding::installPagePopupController(context, |
243 windowWrapper); | 245 windowWrapper); |
244 } | 246 } |
245 | 247 |
246 } // namespace blink | 248 } // namespace blink |
OLD | NEW |