| Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
|
| index 761b4a5c50260087de64d90bd90070998e813310..41f622d56314beea627d92fd40648d18562322ff 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
|
| @@ -140,9 +140,8 @@ void WindowProxy::setGlobal(v8::Local<v8::Object> global) {
|
| // If there are JS code holds a closure to the old inner window,
|
| // it won't be able to reach the outer window via its global object.
|
| void WindowProxy::initializeIfNeeded() {
|
| - // TODO(haraken): It is wrong to re-initialize an already detached window
|
| - // proxy. This must be 'if(m_lifecycle == Lifecycle::ContextUninitialized)'.
|
| - if (m_lifecycle != Lifecycle::ContextInitialized) {
|
| + if (m_lifecycle == Lifecycle::ContextUninitialized ||
|
| + m_lifecycle == Lifecycle::GlobalObjectDetached) {
|
| initialize();
|
| }
|
| }
|
|
|