Bug 211751 - Replace isNullFunctionPointer with real weak-linking support
Summary: Replace isNullFunctionPointer with real weak-linking support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-11 15:49 PDT by Jer Noble
Modified: 2020-05-13 13:51 PDT (History)
13 users (show)

See Also:


Attachments
Patch (24.36 KB, patch)
2020-05-11 16:13 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (8.53 KB, patch)
2020-05-13 09:12 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (11.54 KB, patch)
2020-05-13 09:30 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2020-05-11 15:49:51 PDT
Replace isNullFunctionPointer with real weak-linking support
Comment 1 Jer Noble 2020-05-11 16:13:15 PDT
Created attachment 399065 [details]
Patch
Comment 2 Sam Weinig 2020-05-12 08:53:57 PDT
What this change adds is what is commonly called "soft" linking, at least in macOS parlance, not weak linking. This doesn't seem like the right direction to go in to me.
Comment 3 Jer Noble 2020-05-13 08:43:17 PDT
(In reply to Sam Weinig from comment #2)
> What this change adds is what is commonly called "soft" linking, at least in
> macOS parlance, not weak linking. This doesn't seem like the right direction
> to go in to me.

There's a crucial difference: this patch doesn't load symbols at runtime; it only checks whether those symbols were loaded at process launch.
Comment 4 Jer Noble 2020-05-13 09:12:05 PDT
Created attachment 399269 [details]
Patch
Comment 5 Jer Noble 2020-05-13 09:30:33 PDT
Created attachment 399273 [details]
Patch
Comment 6 Sam Weinig 2020-05-13 13:44:34 PDT
Comment on attachment 399273 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399273&action=review

> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:37
> +WTF_WEAK_LINK_FORCE_IMPORT(webrtc::setApplicationStatus);

Interesting. I couldn't get this to work when I tried.
Comment 7 EWS 2020-05-13 13:49:29 PDT
Committed r261651: <https://trac.webkit.org/changeset/261651>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399273 [details].
Comment 8 Radar WebKit Bug Importer 2020-05-13 13:50:15 PDT
<rdar://problem/63198533>
Comment 9 mitz 2020-05-13 13:51:38 PDT
(In reply to Sam Weinig from comment #6)
> Comment on attachment 399273 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399273&action=review
> 
> > Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:37
> > +WTF_WEAK_LINK_FORCE_IMPORT(webrtc::setApplicationStatus);
> 
> Interesting. I couldn't get this to work when I tried.

I think that thing that doesn’t work is redeclaring member functions like this. webrtc ::setApplicationStatus isn’t a member function.