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

Unified Diff: Source/bindings/core/v8/V8NodeFilterCondition.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/V8NodeFilterCondition.cpp
diff --git a/Source/bindings/core/v8/V8NodeFilterCondition.cpp b/Source/bindings/core/v8/V8NodeFilterCondition.cpp
index ef76e20a9aff98e639924c1b11343a007d700cb9..3128311990ce6080cfc986da6bd3839fb4915f89 100644
--- a/Source/bindings/core/v8/V8NodeFilterCondition.cpp
+++ b/Source/bindings/core/v8/V8NodeFilterCondition.cpp
@@ -92,6 +92,11 @@ short V8NodeFilterCondition::acceptNode(Node* node, ExceptionState& exceptionSta
OwnPtr<v8::Local<v8::Value>[]> info = adoptArrayPtr(new v8::Local<v8::Value>[1]);
info[0] = toV8(node, m_scriptState->context()->Global(), isolate);
+ if (info[0].IsEmpty()) {
+ if (exceptionCatcher.HasCaught())
+ exceptionState.rethrowV8Exception(exceptionCatcher.Exception());
+ return NodeFilter::FILTER_REJECT;
+ }
v8::Local<v8::Value> result;
if (!ScriptController::callFunction(m_scriptState->executionContext(), callback, receiver, 1, info.get(), isolate).ToLocal(&result)) {
« no previous file with comments | « Source/bindings/core/v8/V8MutationCallback.cpp ('k') | Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698