DescriptionAllow multiple base::MessagePumpForUI instances to be created simultanenously on Windows.
The current implementation of base::MessagePumpForUI on Windows registers a window class with a predefined name in order to create a message-only window. The window class is unregistered when base::MessagePumpForUI is deleted. This causes issues when two or more instances of base::MessagePumpForUI are created/destroyed simultanenously on different threads. For instance once thread can unregister the window class right before the other thread is trying to create a window using this class.
The CL addresses this problem by switching MessageWindow to implement a message-only window. It also moves MessageWindow from remoting/host/win to base/win along with the corresponding unit test.
MessageWindow registers a uniquely named window class per MessageWindow instance making sure that different MessageWindow objects do not share any resources. In the future this can be optimized further by registering a common window class shared by all MessageWindow objects in a thread-safe manner (by using LazyInstance for example).
BUG=241939
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201955
Patch Set 1 #Patch Set 2 : Fixed the component build. #
Total comments: 8
Patch Set 3 : CR feedback #
Total comments: 4
Patch Set 4 : CR feedback #Patch Set 5 : rebased #
Messages
Total messages: 13 (0 generated)
|