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

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

Issue 366223006: createTreeWalker and createNodeIterator should deal with null NodeFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use fully qualified variable name Created 6 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
« no previous file with comments | « LayoutTests/fast/dom/TreeWalker/TreeWalker-basic-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8Binding.cpp
diff --git a/Source/bindings/core/v8/V8Binding.cpp b/Source/bindings/core/v8/V8Binding.cpp
index 946677479d7a7d0db34fdb0ba61249c62409f7eb..b85856fe6f96d890e11cbd5db4965e35c817dd75 100644
--- a/Source/bindings/core/v8/V8Binding.cpp
+++ b/Source/bindings/core/v8/V8Binding.cpp
@@ -149,6 +149,8 @@ v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator()
PassRefPtrWillBeRawPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value> callback, v8::Handle<v8::Object> creationContext, ScriptState* scriptState)
{
+ if (callback->IsNull())
+ return nullptr;
RefPtrWillBeRawPtr<NodeFilter> filter = NodeFilter::create();
v8::Handle<v8::Object> filterWrapper = toV8(filter, creationContext, scriptState->isolate()).As<v8::Object>();
« no previous file with comments | « LayoutTests/fast/dom/TreeWalker/TreeWalker-basic-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698