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

Unified Diff: Source/bindings/core/v8/ScriptPromiseProperty.h

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
« no previous file with comments | « Source/bindings/core/v8/ScriptController.cpp ('k') | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptPromiseProperty.h
diff --git a/Source/bindings/core/v8/ScriptPromiseProperty.h b/Source/bindings/core/v8/ScriptPromiseProperty.h
index 7d4d199fcae9ac4f8ca4e3a5da163784e78e8427..da166e9f6d574a2e42c051a880c55b58c5203e41 100644
--- a/Source/bindings/core/v8/ScriptPromiseProperty.h
+++ b/Source/bindings/core/v8/ScriptPromiseProperty.h
@@ -120,6 +120,8 @@ template<typename HolderType, typename ResolvedType, typename RejectedType>
v8::Local<v8::Object> ScriptPromiseProperty<HolderType, ResolvedType, RejectedType>::holder(v8::Isolate* isolate, v8::Local<v8::Object> creationContext)
{
v8::Local<v8::Value> value = toV8(m_holder, creationContext, isolate);
+ if (value.IsEmpty())
+ return v8::Local<v8::Object>();
return value.As<v8::Object>();
}
« no previous file with comments | « Source/bindings/core/v8/ScriptController.cpp ('k') | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698