WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
33977
[Chromium] WebNode::toElement refcounts incorrectly
https://bugs.webkit.org/show_bug.cgi?id=33977
Summary
[Chromium] WebNode::toElement refcounts incorrectly
James Robinson
Reported
2010-01-21 16:04:30 PST
The following results in the refcount on 'foo' decreasing by one, when it should stay the same: { WebNode n = foo; WebElement e = n.toElement<WebElement>(); } This is because WebNode::toElement() does not increment the refcount on 'foo', but the WebElement destructor does decrement the refcount.
Attachments
Fixes the bug by using WebNode::assign()
(1.68 KB, patch)
2010-01-21 16:07 PST
,
James Robinson
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2010-01-21 16:07:57 PST
Created
attachment 47155
[details]
Fixes the bug by using WebNode::assign() I have to use the WebNode:: qualifier because some T's that are used in this function (like WebElement) define incompatible 1-arg versions of ::assign(), for example WebElement::assign(const WebElement& e). This confuses visual studio terribly. I'm not sure if this is an issue with the compiler, but we always want to use the WebNode::assign() version anyway.
WebKit Commit Bot
Comment 2
2010-01-21 22:22:00 PST
Comment on
attachment 47155
[details]
Fixes the bug by using WebNode::assign() Clearing flags on attachment: 47155 Committed
r53678
: <
http://trac.webkit.org/changeset/53678
>
WebKit Commit Bot
Comment 3
2010-01-21 22:22:07 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug