Bug 201344 - [PSON] We no longer need to throw away suspended pages in a process before using it for a navigation
Summary: [PSON] We no longer need to throw away suspended pages in a process before us...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 201225 201440
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-30 10:08 PDT by Chris Dumez
Modified: 2019-09-05 13:03 PDT (History)
7 users (show)

See Also:


Attachments
Patch (11.76 KB, patch)
2019-08-30 12:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.54 KB, patch)
2019-08-30 14:46 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-08-30 10:08:32 PDT
We no longer need to throw away suspended pages in a process before using it for a navigation, now that Bug 201225 has been fixed. WebPage objects (suspended or live) in the process now have distinct identifiers and can coexist.
Comment 1 Chris Dumez 2019-08-30 12:47:39 PDT
Created attachment 377740 [details]
Patch
Comment 2 Antti Koivisto 2019-08-30 13:46:15 PDT
Comment on attachment 377740 [details]
Patch

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

> Source/WebKit/Shared/API/Cocoa/RemoteObjectRegistry.h:72
> -    WebPageProxyIdentifier m_messageDestinationID;
> +    uint64_t m_messageDestinationID;

I don't quite understand how this works without fixed type?
Comment 3 Chris Dumez 2019-08-30 13:50:14 PDT
Comment on attachment 377740 [details]
Patch

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

>> Source/WebKit/Shared/API/Cocoa/RemoteObjectRegistry.h:72
>> +    uint64_t m_messageDestinationID;
> 
> I don't quite understand how this works without fixed type?

Not sure I understand the question, it is only used for IPC so it does not need to be a strong type. The reason I am no longer using a Strong type is that RemoteObjectRegistry.h is used from in the UIProcess and in the WebContent process.
When running in the WebContent process, the destinationID is a WebPageProxyIdentifier, when running in the UIProcess, the destinationID is a WebCore::PageIdentifier.

Now that we can have several WebPages in the same WebContent process mapping to the same WebPageProxy in the UIProcess, it is important that RemoteObjectRegistry objects in the WebContent process listen to IPC on the WebCore::PageIdentifier id and not a WebPageProxyIdentifier id. Using a WebPageProxyIdentifier, we'd get a conflict, having several objects listen to IPC on the same id in the same process.
Comment 4 Chris Dumez 2019-08-30 14:46:07 PDT
Created attachment 377752 [details]
Patch
Comment 5 WebKit Commit Bot 2019-08-30 15:59:17 PDT
Comment on attachment 377752 [details]
Patch

Clearing flags on attachment: 377752

Committed r249350: <https://trac.webkit.org/changeset/249350>
Comment 6 WebKit Commit Bot 2019-08-30 15:59:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-08-30 16:00:23 PDT
<rdar://problem/54900270>