Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: Source/bindings/core/v8/WindowProxy.cpp

Issue 1100223003: bindings: Add empty checks for toV8() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index d63642bf34c2ca4f6efa1931c276b41694d3be23..22183ec47e528e43f9c354db20b152aa0a4c6018 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -371,6 +371,8 @@ void WindowProxy::updateDocumentProperty()
v8::Local<v8::Context> context = m_scriptState->context();
LocalFrame* frame = toLocalFrame(m_frame);
v8::Local<v8::Value> documentWrapper = toV8(frame->document(), context->Global(), context->GetIsolate());
+ if (documentWrapper.IsEmpty())
+ return;
ASSERT(documentWrapper == m_document.newLocal(m_isolate) || m_document.isEmpty());
if (m_document.isEmpty())
updateDocumentWrapper(v8::Local<v8::Object>::Cast(documentWrapper));
« no previous file with comments | « Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp ('k') | Source/bindings/core/v8/custom/V8PopStateEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698