12019-08-05 Chris Dumez <cdumez@apple.com>
2
3 navigator.geolocation wrapper should not become GC-collectable once its frame is detached
4 https://bugs.webkit.org/show_bug.cgi?id=200436
5
6 Reviewed by Darin Adler.
7
8 navigator.geolocation wrapper should not become GC-collectable once its frame is detached, given
9 that it can outlive the frame. Instead, tie the navigator.geolocation wrapper's lifetime to its
10 Navigator's.
11
12 Test: fast/dom/navigator-property-gc-after-frame-detach.html
13
14 * Modules/geolocation/Geolocation.cpp:
15 (WebCore::Geolocation::create):
16 (WebCore::Geolocation::Geolocation):
17 (WebCore::Geolocation::navigator):
18 (WebCore::Geolocation::frame const):
19 * Modules/geolocation/Geolocation.h:
20 * Modules/geolocation/Geolocation.idl:
21 * Modules/geolocation/NavigatorGeolocation.cpp:
22 (WebCore::NavigatorGeolocation::NavigatorGeolocation):
23 (WebCore::NavigatorGeolocation::from):
24 (WebCore::NavigatorGeolocation::geolocation):
25 (WebCore::NavigatorGeolocation::geolocation const):
26 * Modules/geolocation/NavigatorGeolocation.h:
27 * bindings/js/JSNavigatorCustom.cpp:
28 (WebCore::JSNavigator::visitAdditionalChildren):
29 * bindings/js/JSWorkerNavigatorCustom.cpp:
30 (WebCore::JSWorkerNavigator::visitAdditionalChildren):
31 * bindings/scripts/CodeGeneratorJS.pm:
32 (GenerateImplementation):
33 * bindings/scripts/IDLAttributes.json:
34 * page/Navigator.cpp:
35 (WebCore::Navigator::plugins):
36 (WebCore::Navigator::mimeTypes):
37 * page/NavigatorBase.h:
38 * plugins/DOMMimeTypeArray.cpp:
39 (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
40 * plugins/DOMMimeTypeArray.h:
41 * plugins/DOMMimeTypeArray.idl:
42 * plugins/DOMPluginArray.cpp:
43 (WebCore::DOMPluginArray::DOMPluginArray):
44 * plugins/DOMPluginArray.h:
45 * plugins/DOMPluginArray.idl:
46 * workers/service/ServiceWorkerContainer.h:
47 * workers/service/ServiceWorkerContainer.idl:
48