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

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

Issue 2144093002: Adding checks for V8 functions returning Maybe<bool> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding NOTREACHED if Delete result IsNothing for LazyFieldGetterInner 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/V8Binding.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
index 24cb6e608abb890ee5182883145eb4c23b983bb8..1470c22e5cc0b10c3501dd66f8bdfc9c935e215f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
@@ -904,7 +904,10 @@ void removeHiddenValueFromArray(v8::Isolate* isolate, v8::Local<v8::Object> obje
if (!array->Get(isolate->GetCurrentContext(), i).ToLocal(&item))
return;
if (item->StrictEquals(value)) {
- array->Delete(isolate->GetCurrentContext(), i);
+ if (array->Delete(isolate->GetCurrentContext(), i).IsNothing()) {
+ // TODO: Not sure if this should be logged or an error thrown or
+ // if it is fine to just return
+ }
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698