WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
70164
Make toHTMLElement fail to compile if you try to use it on an HTMLElement*
https://bugs.webkit.org/show_bug.cgi?id=70164
Summary
Make toHTMLElement fail to compile if you try to use it on an HTMLElement*
Darin Adler
Reported
2011-10-14 18:05:32 PDT
Make toHTMLElement fail to compile if you try to use it on an HTMLElement*
Attachments
Patch
(9.79 KB, patch)
2011-10-14 18:09 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2011-10-14 18:09:53 PDT
Created
attachment 111118
[details]
Patch
Adam Barth
Comment 2
2011-10-14 22:53:15 PDT
Comment on
attachment 111118
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=111118&action=review
> Source/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp:54 > + if (Document* document = static_cast<HTMLFrameElement*>(frameElement)->contentDocument()) {
I know this is in the original code, but it's unclear to me what makes this cast safe. It seems like you could add non HTMLFrameElement children to an HTMLFrameSetElement via the DOM (though not with the parser).
WebKit Review Bot
Comment 3
2011-10-15 00:58:32 PDT
Comment on
attachment 111118
[details]
Patch Clearing flags on attachment: 111118 Committed
r97551
: <
http://trac.webkit.org/changeset/97551
>
WebKit Review Bot
Comment 4
2011-10-15 00:58:36 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 5
2011-10-15 13:14:18 PDT
Comment on
attachment 111118
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=111118&action=review
>> Source/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp:54 >> + if (Document* document = static_cast<HTMLFrameElement*>(frameElement)->contentDocument()) { > > I know this is in the original code, but it's unclear to me what makes this cast safe. It seems like you could add non HTMLFrameElement children to an HTMLFrameSetElement via the DOM (though not with the parser).
I had the same question. What makes this safe is that this function is only called if canGetItemsForName returns true. This function could repeat the logic, and I considered it, but there is no need for that.
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