Commit 358eab5
committed
Address Safer C++ static analysis warnings in WebKitLegacy/mac/WebView
https://bugs.webkit.org/show_bug.cgi?id=326054
Reviewed by NOBODY (OOPS!).
Fix Safer C++ warnings in Source/WebKitLegacy/mac/WebView and update the
expectations accordingly. WebFeature and WebFormDelegate are renamed to
Objective-C++ so that they can use smart pointers.
* Source/WebKitLegacy/PlatformCocoa.cmake:
* Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj:
* Source/WebKitLegacy/mac/WebView/WebFeature.mm: Renamed from Source/WebKitLegacy/mac/WebView/WebFeature.m.
* Source/WebKitLegacy/mac/WebView/WebFormDelegate.mm: Renamed from Source/WebKitLegacy/mac/WebView/WebFormDelegate.m.
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebNotificationClient.h:
Add type traits.
* Source/WebKitLegacy/mac/WebView/WebArchive.h:
* Source/WebKitLegacy/mac/WebView/WebArchive.mm:
* Source/WebKitLegacy/mac/WebView/WebFramePrivate.h:
* Source/WebKitLegacy/mac/WebView/WebPreferences.h:
* Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h:
* Source/WebKitLegacy/mac/WebView/WebViewInternal.h:
* Source/WebKitLegacy/mac/WebView/WebViewPrivate.h:
Declare NSString globals as NSString * const.
* Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.h:
* Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.mm:
* Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMockInternal.h:
Make m_core const and initialize it with lazyInitialize().
* Source/WebKitLegacy/mac/WebView/WebFullScreenController.h:
* Source/WebKitLegacy/mac/WebView/WebFullScreenController.mm:
* Source/WebKitLegacy/mac/WebView/WebPDFView.h:
* Source/WebKitLegacy/mac/WebView/WebPDFView.mm:
* Source/WebKitLegacy/mac/WebView/WebTextCompletionController.h:
* Source/WebKitLegacy/mac/WebView/WebTextCompletionController.mm:
Use RetainPtr for owned instance variables and __weak for non-owning ones.
* Source/WebKitLegacy/mac/WebView/WebIndicateLayer.h:
* Source/WebKitLegacy/mac/WebView/WebIndicateLayer.mm:
* Source/WebKitLegacy/mac/WebView/WebWindowAnimation.h:
Use __weak for non-owning instance variables.
* Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.h:
* Source/WebKitLegacy/mac/WebView/WebVideoFullscreenController.mm:
Remove unused instance variables, suppress a MemoryUnsafeCast warning for
WebAVPlayerController, which mimics AVPlayerController without subclassing it,
and use protect() at call sites.
* Source/WebKitLegacy/mac/WebView/WebHTMLView.mm:
(-[WebHTMLView attachRootLayer:]): Read layerHostingView after creating it.
Also use protect(), smart pointer locals and checked Objective-C casts.
* Source/WebKitLegacy/mac/WebView/WebDataSource.mm:
* Source/WebKitLegacy/mac/WebView/WebDelegateImplementationCaching.mm:
* Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm:
* Source/WebKitLegacy/mac/WebView/WebFrame.mm:
* Source/WebKitLegacy/mac/WebView/WebFrameView.mm:
* Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm:
* Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm:
* Source/WebKitLegacy/mac/WebView/WebMediaPlaybackTargetPicker.mm:
* Source/WebKitLegacy/mac/WebView/WebPreferences.mm:
* Source/WebKitLegacy/mac/WebView/WebScriptDebugger.mm:
* Source/WebKitLegacy/mac/WebView/WebView.mm:
Use protect(), smart pointer locals, downcast<> and checked Objective-C casts.
* Source/WebKitLegacy/SaferCPPExpectations/ForwardDeclCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/NoUnretainedMemberCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/RetainPtrCtorAdoptCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UnretainedLambdaCapturesCheckerExpectations:
* Source/WebKitLegacy/SaferCPPExpectations/UnretainedLocalVarsCheckerExpectations:1 parent b435774 commit 358eab5
54 files changed
Lines changed: 715 additions & 746 deletions
File tree
- Source
- WebCore/platform/ios
- WebKitLegacy
- SaferCPPExpectations
- WebKitLegacy.xcodeproj
- mac
- WebCoreSupport
- WebView
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
Lines changed: 0 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | 29 | | |
34 | 30 | | |
35 | | - | |
36 | 31 | | |
37 | | - | |
38 | | - | |
39 | 32 | | |
40 | 33 | | |
41 | | - | |
42 | | - | |
43 | 34 | | |
44 | 35 | | |
45 | 36 | | |
46 | 37 | | |
47 | 38 | | |
48 | | - | |
49 | 39 | | |
50 | | - | |
51 | 40 | | |
52 | | - | |
53 | 41 | | |
54 | 42 | | |
55 | | - | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | | - | |
14 | | - | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
| |||
Lines changed: 0 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
0 commit comments