[Webkit-unassigned] [Bug 43735] C++ DOM binding classes with private structs need operator= overload

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 9 11:52:17 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43735





--- Comment #4 from Kevin Ollivier <kevino at theolliviers.com>  2010-08-09 11:52:17 PST ---
(In reply to comment #2)
> Are there cases where assignment is used like this? If so, you should be able to write a layout test.

Yes, I ran into this problem when generating Python wrappers for these bindings. The SWIG tool does something along these lines (code simplified to show the relevant bits):

WebDOMNode result;

{
    result = range->startContainer();
}

swigptr = new WebDOMNode(result);

The block assigning result has some extra error handling code, etc. which is why they isolate it in a code block.

As for the LayoutTest part, does WebDOM* have a test suite yet? If so I'll be happy to add a case for it.

> If assignment is not used like this, I suggest just forbidding assignment, in the same way the Noncopyable class does.

For a public API like the WebDOM* classes, I'm concerned that making the objects non-copyable would be pretty restrictive. (And, of course, it would really set me back on trying to get Python bindings working.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list