Bug 94715 - [V8] Remove V8Proxy from getXPathNSResolver()
Summary: [V8] Remove V8Proxy from getXPathNSResolver()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 85330
  Show dependency treegraph
 
Reported: 2012-08-22 08:34 PDT by Kentaro Hara
Modified: 2012-08-22 18:12 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.61 KB, patch)
2012-08-22 08:38 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-08-22 08:34:31 PDT
- The V8Proxy* argument of getXPathNSResolver(..., V8Proxy* = 0) is not used. We can remove it.
- We can rename getXPathNSResolver() to toXPathNSResolver().
- We can move toXPathNSResolver() from V8DOMWrapper to V8Binding, since other toXXX() methods are written in V8Binding.
Comment 1 Kentaro Hara 2012-08-22 08:38:39 PDT
Created attachment 159947 [details]
Patch
Comment 2 Adam Barth 2012-08-22 12:30:34 PDT
Comment on attachment 159947 [details]
Patch

It seems odd that XPathNSResolver needs this special-case code.  How do we do this in the general case?
Comment 3 Kentaro Hara 2012-08-22 17:43:42 PDT
(In reply to comment #2)
> (From update of attachment 159947 [details])
> It seems odd that XPathNSResolver needs this special-case code.  How do we do this in the general case?

Generated code by default:

  if (V8XPathNSResolver::HasInstance(value))
    return V8XPathNSResolver::toNative(value)
  return 0;

What XPathNSResolver expects:

  if (V8XPathNSResolver::HasInstance(value))
    return V8XPathNSResolver::toNative(value);
  else if (value->IsObject())
    return V8CustomXPathNSResolver::create(value->ToObject());
  return 0;

It looks like that XPathNSResolver wants to fall back to V8CustomXPathNSResolver. (I don't know why though.)
Comment 4 WebKit Review Bot 2012-08-22 18:12:31 PDT
Comment on attachment 159947 [details]
Patch

Clearing flags on attachment: 159947

Committed r126375: <http://trac.webkit.org/changeset/126375>
Comment 5 WebKit Review Bot 2012-08-22 18:12:34 PDT
All reviewed patches have been landed.  Closing bug.