[GTK][WPE] Use LazyNeverDestroyed<XErrorTrapper> to remove static initializers
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 01:10:37 +0000 (01:10 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 01:10:37 +0000 (01:10 +0000)
commiteef0baa604e5628e69dda12515e92005f1a433de
tree2335ebfc97b0424a68c00b6720e3b9c6e2d9cd04
parent4474d9c5d16c5286260108bd03b7dae5a8535484
[GTK][WPE] Use LazyNeverDestroyed<XErrorTrapper> to remove static initializers
https://bugs.webkit.org/show_bug.cgi?id=187089

Reviewed by Michael Catanzaro.

Source/WebCore:

Do not allow copying since XErrorTrapper's logic relies on the address of XErrorTrapper.

* platform/graphics/x11/XErrorTrapper.h:

Source/WebKit:

Use LazyNeverDestroyed<XErrorTrapper> instead of global std::unique_ptr<XErrorTrapper>.
Since this variable's exit time destructor is not important in this code, using
LazyNeverDestroyed<XErrorTrapper> is fine. This removes the last static initializer
of libwebkit2gtk.so.

* PluginProcess/unix/PluginProcessMainUnix.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/x11/XErrorTrapper.h
Source/WebKit/ChangeLog
Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp