Bug 44542 - [Chromium] The V8 NodeFilter wrapper needs to be fixed
Summary: [Chromium] The V8 NodeFilter wrapper needs to be fixed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dumitru Daniliuc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 12:06 PDT by Dumitru Daniliuc
Modified: 2010-08-24 14:42 PDT (History)
1 user (show)

See Also:


Attachments
patch (4.10 KB, patch)
2010-08-24 12:43 PDT, Dumitru Daniliuc
dglazkov: review+
dumi: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dumitru Daniliuc 2010-08-24 12:06:33 PDT
V8DOMWrapper::wrapNativeNodeFilter() returns NULL if the argument is not a function. At the same time, Traversal::acceptNode() accepts all NULL filters. So if we pass in a filter that's not a function, we end up accepting it, instead of throwing an exception.

After http://trac.webkit.org/changeset/65853 the expectation is that only functions and objects with an acceptNode() method should be accepted. Everything else should be rejected. So we should change V8DOMWrapper::wrapNativeNodeFilter() to always create a filter, and update V8NodeFilterCondition::acceptNode() to check for these conditions, like JSNodeFilterCondition::acceptNode() does.
Comment 1 Dumitru Daniliuc 2010-08-24 12:43:08 PDT
Created attachment 65308 [details]
patch
Comment 2 Dimitri Glazkov (Google) 2010-08-24 13:09:03 PDT
Comment on attachment 65308 [details]
patch

ok.
Comment 3 Dumitru Daniliuc 2010-08-24 14:42:58 PDT
landed: r65937.