WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
208162
[WTF] Attach WARN_UNUSED_RETURN to makeScopeExit and fix existing wrong usage
https://bugs.webkit.org/show_bug.cgi?id=208162
Summary
[WTF] Attach WARN_UNUSED_RETURN to makeScopeExit and fix existing wrong usage
Yusuke Suzuki
Reported
2020-02-24 15:51:25 PST
Fix
r254739
.
Attachments
Patch
(3.93 KB, patch)
2020-02-24 16:03 PST
,
Yusuke Suzuki
rmorisset
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2020-02-24 16:03:00 PST
Created
attachment 391592
[details]
Patch
Robin Morisset
Comment 2
2020-02-24 16:06:40 PST
Comment on
attachment 391592
[details]
Patch r=me
Yusuke Suzuki
Comment 3
2020-02-24 16:07:31 PST
Land it after ensuring all the EWS bots get green.
Saam Barati
Comment 4
2020-02-24 16:39:56 PST
Comment on
attachment 391592
[details]
Patch oops. r=me too
Yusuke Suzuki
Comment 5
2020-02-24 16:55:13 PST
OK, building worked. Landing.
Yusuke Suzuki
Comment 6
2020-02-24 16:57:48 PST
Committed
r257285
: <
https://trac.webkit.org/changeset/257285
>
Radar WebKit Bug Importer
Comment 7
2020-02-24 16:58:18 PST
<
rdar://problem/59747287
>
Darin Adler
Comment 8
2020-02-24 16:59:59 PST
Comment on
attachment 391592
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391592&action=review
> Source/WebCore/html/HTMLLinkElement.cpp:305 > + auto scopeExit = makeScopeExit([&] { m_isHandlingBeforeLoad = previous; });
Seems like for this we should figure out what behavior was broken by not setting m_isHandlingBeforeLoad to true, and make a test that would detect that mistake!
Yusuke Suzuki
Comment 9
2020-02-24 17:38:42 PST
Comment on
attachment 391592
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391592&action=review
>> Source/WebCore/html/HTMLLinkElement.cpp:305 >> + auto scopeExit = makeScopeExit([&] { m_isHandlingBeforeLoad = previous; }); > > Seems like for this we should figure out what behavior was broken by not setting m_isHandlingBeforeLoad to true, and make a test that would detect that mistake!
Yeah, look like we are lacking the test for this case. To me, this looks like HTMLLinkElement is detached and reinserted during emitting before-load event is attached, but need some investigation. Filed
https://bugs.webkit.org/show_bug.cgi?id=208171
Darin Adler
Comment 10
2020-02-24 17:46:59 PST
Comment on
attachment 391592
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391592&action=review
>>> Source/WebCore/html/HTMLLinkElement.cpp:305 >>> + auto scopeExit = makeScopeExit([&] { m_isHandlingBeforeLoad = previous; }); >> >> Seems like for this we should figure out what behavior was broken by not setting m_isHandlingBeforeLoad to true, and make a test that would detect that mistake! > > Yeah, look like we are lacking the test for this case. To me, this looks like HTMLLinkElement is detached and reinserted during emitting before-load event is attached, but need some investigation. > Filed
https://bugs.webkit.org/show_bug.cgi?id=208171
Oh, I forgot that this was the one that inspired this entire exercise!
Yusuke Suzuki
Comment 11
2020-02-24 18:58:48 PST
Comment on
attachment 391592
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=391592&action=review
>>>> Source/WebCore/html/HTMLLinkElement.cpp:305 >>>> + auto scopeExit = makeScopeExit([&] { m_isHandlingBeforeLoad = previous; }); >>> >>> Seems like for this we should figure out what behavior was broken by not setting m_isHandlingBeforeLoad to true, and make a test that would detect that mistake! >> >> Yeah, look like we are lacking the test for this case. To me, this looks like HTMLLinkElement is detached and reinserted during emitting before-load event is attached, but need some investigation. >> Filed
https://bugs.webkit.org/show_bug.cgi?id=208171
> > Oh, I forgot that this was the one that inspired this entire exercise!
The good thing is that, we also found this case in JSC Parser.cpp :). While it is only used for debug assertions, anyway, having this annotation is super useful! Thanks Emilio!
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