-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Adopt smart pointers in WebFullScreenManagerProxy.cpp, WebInspectorClient.cpp, WebInspectorInternal.cpp #47411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash ee580ee) |
Safer C++ Build #42166 (ee580ee)❌ Found 2 failing files with 15 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
Didn't check all the failures in the analyzer results. They were spread out across the results and I didn't realize. Will address tomorrow. |
if (page && page->protectedInspector()) | ||
page->protectedInspector()->bringToFront(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (page && page->protectedInspector()) | |
page->protectedInspector()->bringToFront(); | |
if (!page) | |
return; | |
if (RefPtr inspector = page->inspector(); | |
inspector->bringToFront(); |
Is what we did elsewhere for cases like this. You should definitely never need a protected member just for a boolean output.
…ient.cpp, WebInspectorInternal.cpp https://bugs.webkit.org/show_bug.cgi?id=295243 rdar://154710862 Reviewed by NOBODY (OOPS!). Smart pointer adoption as per the static analyzer. * Source/WebKit/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations: * Source/WebKit/SaferCPPExpectations/UncountedCallArgsCheckerExpectations: * Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::isFullScreen): * Source/WebKit/WebProcess/Inspector/WebInspectorClient.cpp: (WebKit::WebInspectorClient::~WebInspectorClient): (WebKit::WebInspectorClient::openLocalFrontend): (WebKit::WebInspectorClient::bringFrontendToFront): (WebKit::WebInspectorClient::didResizeMainFrame): (WebKit::WebInspectorClient::showPaintRect): (WebKit::WebInspectorClient::elementSelectionChanged): (WebKit::WebInspectorClient::timelineRecordingChanged): (WebKit::WebInspectorClient::setDeveloperPreferenceOverride): * Source/WebKit/WebProcess/Inspector/WebInspectorInternal.cpp: (WebKit::WebInspector::~WebInspector): (WebKit::WebInspector::openLocalInspectorFrontend): (WebKit::WebInspector::closeFrontendConnection): (WebKit::WebInspector::bringToFront): (WebKit::WebInspector::showMainResourceForFrame): (WebKit::WebInspector::elementSelectionChanged): (WebKit::WebInspector::timelineRecordingChanged): (WebKit::WebInspector::setDeveloperPreferenceOverride): (WebKit::WebInspector::setEmulatedConditions): (WebKit::WebInspector::canAttachWindow): (WebKit::WebInspector::updateDockingAvailability): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::protectedInspector): (WebKit::WebPage::protectedInspectorUI): (WebKit::WebPage::protectedRemoteInspectorUI): * Source/WebKit/WebProcess/WebPage/WebPage.h:
ee580ee
to
51d2c6a
Compare
EWS run on current version of this PR (hash 51d2c6a) |
@@ -103,22 +103,28 @@ void WebInspectorClient::frontendCountChanged(unsigned count) | |||
Inspector::FrontendChannel* WebInspectorClient::openLocalFrontend(InspectorController* controller) | |||
{ | |||
if (RefPtr page = m_page.get()) | |||
page->inspector()->openLocalInspectorFrontend(); | |||
page->protectedInspector()->openLocalInspectorFrontend(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
51d2c6a
51d2c6a