Status: New
Owner: ----
New issue 2268 by [email protected]: Support the correct instance-of
check for DOM methods
http://code.google.com/p/v8/issues/detail?id=2268
div = document.createElement(“div”);
div.focus(); // It works. OK.
xhr = new XMLHttpRequest();
xhr.__proto__ = HTMLDivElement.prototype;
xhr.focus(); // It throws TypeError. OK.
div = document.createElement(“div”);
obj = Object.create(div);
obj.focus(); // It works. Oops. It should throw TypeError. The spec
requires it. IE, Firefox, Safari and Opera follows the spec.
As shown above, the current instance-of check for DOM methods is done for
Arguments.Holder(), which is wrong. This should be done for
Arguments.This().
For compatibility reason, please do not simply replace the current
instance-of check with the new instance-of check. Chrome's V8 bindings are
working based on the current instance-of check. So I am happy if V8 could
support the new instance-of check behind a special signature (, just like
the instance-of check that V8 implemented for DOM attributes). Then I can
replace Chrome's V8 bindings safely and incrementally.
c.f. Document (Google internal only):
https://docs.google.com/a/google.com/document/d/116ne63RJnCsxCJdpqe2_NZPJlbSDy_MAHIxK1jy0wI4/edit?pli=1
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev