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

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

Issue 2144093002: Adding checks for V8 functions returning Maybe<bool> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: 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 a8d4be011e9c99e2e3dd5ae22c0b877b6ee463d1..52afae9c422039e7c1258fad9793807969102c83 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -533,7 +533,9 @@ void WindowProxy::namedItemAdded(HTMLDocument* document, const AtomicString& nam
v8::Local<v8::Context> context = m_scriptState->context();
v8::Local<v8::Object> documentHandle = m_document.newLocal(m_isolate);
checkDocumentWrapper(documentHandle, document);
- documentHandle->SetAccessor(context, v8String(m_isolate, name), getter);
+ if (documentHandle->SetAccessor(context, v8String(m_isolate, name), getter).IsNothing()) {
+ // TODO: What action, if any, should be taken here?
+ }
}
void WindowProxy::namedItemRemoved(HTMLDocument* document, const AtomicString& name)
@@ -550,7 +552,9 @@ void WindowProxy::namedItemRemoved(HTMLDocument* document, const AtomicString& n
ASSERT(!m_document.isEmpty());
v8::Local<v8::Object> documentHandle = m_document.newLocal(m_isolate);
checkDocumentWrapper(documentHandle, document);
- documentHandle->Delete(m_isolate->GetCurrentContext(), v8String(m_isolate, name));
+ if (documentHandle->Delete(m_isolate->GetCurrentContext(), v8String(m_isolate, name)).IsNothing()) {
+ // TODO: What action, if any, should be taken here?
+ }
}
void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin)

Powered by Google App Engine
This is Rietveld 408576698