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 c844933df3de3000ff9a7ca41652da2932386d81..30d61d4d392a5f0e9cbd95ec614de75fe969bba6 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp |
@@ -518,8 +518,8 @@ static void getter(v8::Local<v8::Name> property, |
void WindowProxy::namedItemAdded(HTMLDocument* document, |
const AtomicString& name) { |
DCHECK(m_world->isMainWorld()); |
- |
- if (!isContextInitialized()) |
+ DCHECK(m_scriptState); |
+ if (!m_scriptState->contextIsValid()) |
Yuki
2017/01/05 13:31:27
Why do you want to replace !isContextInitialized()
haraken
2017/01/05 23:50:26
Reverted it back to !isContextInitialized().
I ju
|
return; |
ScriptState::Scope scope(m_scriptState.get()); |
@@ -535,10 +535,9 @@ void WindowProxy::namedItemAdded(HTMLDocument* document, |
void WindowProxy::namedItemRemoved(HTMLDocument* document, |
const AtomicString& name) { |
DCHECK(m_world->isMainWorld()); |
- |
- if (!isContextInitialized()) |
+ DCHECK(m_scriptState); |
+ if (!m_scriptState->contextIsValid()) |
return; |
- |
if (document->hasNamedItem(name) || document->hasExtraNamedItem(name)) |
return; |