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

Unified Diff: Source/bindings/core/v8/V8MutationCallback.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
« no previous file with comments | « Source/bindings/core/v8/V8LazyEventListener.cpp ('k') | Source/bindings/core/v8/V8NodeFilterCondition.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8MutationCallback.cpp
diff --git a/Source/bindings/core/v8/V8MutationCallback.cpp b/Source/bindings/core/v8/V8MutationCallback.cpp
index 3da7b498b2ff7aee24eef6148afeb7153d931d31..48d7b1920b20b62b98dc8b157bbf310abd334282 100644
--- a/Source/bindings/core/v8/V8MutationCallback.cpp
+++ b/Source/bindings/core/v8/V8MutationCallback.cpp
@@ -73,7 +73,10 @@ void V8MutationCallback::call(const WillBeHeapVector<RefPtrWillBeMember<Mutation
return;
v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(observerHandle);
- v8::Local<v8::Value> argv[] = { toV8(mutations, m_scriptState->context()->Global(), isolate), observerHandle };
+ v8::Local<v8::Value> v8Mutations = toV8(mutations, m_scriptState->context()->Global(), isolate);
+ if (v8Mutations.IsEmpty())
+ return;
+ v8::Local<v8::Value> argv[] = { v8Mutations, observerHandle };
v8::TryCatch exceptionCatcher;
exceptionCatcher.SetVerbose(true);
« no previous file with comments | « Source/bindings/core/v8/V8LazyEventListener.cpp ('k') | Source/bindings/core/v8/V8NodeFilterCondition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698