RESOLVED FIXED 97839
[EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy.
https://bugs.webkit.org/show_bug.cgi?id=97839
Summary [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRe...
Byungwoo Lee
Reported 2012-09-27 19:04:03 PDT
There is an unclear relation between WebContext and {VibrationProvider, BatteryProvider, NetworkInfoProvider} VibrationProvider has WKRetainPtr<WKVibrationRef> m_wkVibrationRef which has reference for object WebVibrationProxy. But the WebVibrationProxy instance is a member of WebContext which also has RefPtr<WebVibrationProxy> Two classes are sharing the reference for WebVibrationProxy but there is no relation between the two. This can make a problem that, When WebContext if deleted befor the VibrationProvider, WebVibrationProxy will be alive without WebContext, because VibrationProvider also has the reference for WebVibrationProxy. This is a problem because WebVibrationProxy should be a member of WebContext. To prevent this, there should be a relation between VibrationProvider and WebContext. (And same about BatteryProvider, NetworkInfoProvider)
Attachments
Patch (12.32 KB, patch)
2012-09-27 22:38 PDT, Byungwoo Lee
no flags
Patch (12.58 KB, patch)
2012-09-28 02:44 PDT, Byungwoo Lee
no flags
Patch (13.56 KB, patch)
2012-09-28 04:50 PDT, Byungwoo Lee
no flags
Patch (13.55 KB, patch)
2012-09-28 08:59 PDT, Byungwoo Lee
no flags
Patch (13.57 KB, patch)
2012-09-28 09:02 PDT, Byungwoo Lee
no flags
Byungwoo Lee
Comment 1 2012-09-27 22:38:04 PDT
Chris Dumez
Comment 2 2012-09-27 22:59:20 PDT
Comment on attachment 166142 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166142&action=review > Source/WebKit2/ChangeLog:3 > + [EFL][WK2] Make relation between WebContext and {VibrationProvider,BatteryProvider,NetworkInfoProvider}. The bug title is really not clear. > Source/WebKit2/ChangeLog:16 > + This can make a problem that, when WebContext is deleted befor the "before" > Source/WebKit2/ChangeLog:25 > + Same about BatteryProvider and NetworkInfoProvider. "Same for" > Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:89 > + vibrationProvider = VibrationProvider::create(context.get()); It looks like we are missing the networkInfoProvider, right? We should probably fix this in a separate patch.
Chris Dumez
Comment 3 2012-09-27 23:08:11 PDT
(In reply to comment #2) > (From update of attachment 166142 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=166142&action=review > > > Source/WebKit2/ChangeLog:3 > > + [EFL][WK2] Make relation between WebContext and {VibrationProvider,BatteryProvider,NetworkInfoProvider}. > > The bug title is really not clear. > > > Source/WebKit2/ChangeLog:16 > > + This can make a problem that, when WebContext is deleted befor the > > "before" > > > Source/WebKit2/ChangeLog:25 > > + Same about BatteryProvider and NetworkInfoProvider. > > "Same for" > > > Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:89 > > + vibrationProvider = VibrationProvider::create(context.get()); > > It looks like we are missing the networkInfoProvider, right? We should probably fix this in a separate patch. Addressing the missing networkInfoProvider initialization issue in Bug 97865. This patch will need rebasing afterwards.
Byungwoo Lee
Comment 4 2012-09-27 23:12:27 PDT
Comment on attachment 166142 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166142&action=review >> Source/WebKit2/ChangeLog:3 >> + [EFL][WK2] Make relation between WebContext and {VibrationProvider,BatteryProvider,NetworkInfoProvider}. > > The bug title is really not clear. Yes. How about this? [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy. >> Source/WebKit2/ChangeLog:16 >> + This can make a problem that, when WebContext is deleted befor the > > "before" Oops~ >> Source/WebKit2/ChangeLog:25 >> + Same about BatteryProvider and NetworkInfoProvider. > > "Same for" Ok >> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:89 >> + vibrationProvider = VibrationProvider::create(context.get()); > > It looks like we are missing the networkInfoProvider, right? We should probably fix this in a separate patch. Yes I couldn't find a code about networkInfoProvider. it should be fixed in other patch :)
Chris Dumez
Comment 5 2012-09-28 02:25:41 PDT
(In reply to comment #4) > (From update of attachment 166142 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=166142&action=review > > >> Source/WebKit2/ChangeLog:3 > >> + [EFL][WK2] Make relation between WebContext and {VibrationProvider,BatteryProvider,NetworkInfoProvider}. > > > > The bug title is really not clear. > > Yes. How about this? > [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy. Yes, I think it is better. > >> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:89 > >> + vibrationProvider = VibrationProvider::create(context.get()); > > > > It looks like we are missing the networkInfoProvider, right? We should probably fix this in a separate patch. > > Yes I couldn't find a code about networkInfoProvider. it should be fixed in other patch :) This has been fixed in 97865, please rebase.
Byungwoo Lee
Comment 6 2012-09-28 02:34:06 PDT
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 166142 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=166142&action=review > > > > >> Source/WebKit2/ChangeLog:3 > > >> + [EFL][WK2] Make relation between WebContext and {VibrationProvider,BatteryProvider,NetworkInfoProvider}. > > > > > > The bug title is really not clear. > > > > Yes. How about this? > > [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy. > > Yes, I think it is better. > > > >> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:89 > > >> + vibrationProvider = VibrationProvider::create(context.get()); > > > > > > It looks like we are missing the networkInfoProvider, right? We should probably fix this in a separate patch. > > > > Yes I couldn't find a code about networkInfoProvider. it should be fixed in other patch :) > > This has been fixed in 97865, please rebase. Ok~ I'll apply it :)
Byungwoo Lee
Comment 7 2012-09-28 02:44:54 PDT
Byungwoo Lee
Comment 8 2012-09-28 02:48:15 PDT
Comment on attachment 166186 [details] Patch Need apply bug 97528
Gyuyoung Kim
Comment 9 2012-09-28 02:48:25 PDT
Byungwoo Lee
Comment 10 2012-09-28 04:50:46 PDT
Chris Dumez
Comment 11 2012-09-28 08:01:44 PDT
Comment on attachment 166209 [details] Patch LGTM, thanks.
Kenneth Rohde Christiansen
Comment 12 2012-09-28 08:08:10 PDT
Comment on attachment 166209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166209&action=review > Source/WebKit2/ChangeLog:16 > + This can make a problem that, when WebContext is deleted before the This can become a problem when We... > Source/WebKit2/ChangeLog:23 > + To prevent this, changed the VibrationProvider to have To prevent this, I changed
Byungwoo Lee
Comment 13 2012-09-28 08:52:25 PDT
(In reply to comment #12) > (From update of attachment 166209 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=166209&action=review > > > Source/WebKit2/ChangeLog:16 > > + This can make a problem that, when WebContext is deleted before the > > This can become a problem when We... > > > Source/WebKit2/ChangeLog:23 > > + To prevent this, changed the VibrationProvider to have > > To prevent this, I changed Ok~ I'll change it.
Byungwoo Lee
Comment 14 2012-09-28 08:59:39 PDT
Byungwoo Lee
Comment 15 2012-09-28 09:02:10 PDT
WebKit Review Bot
Comment 16 2012-09-28 11:04:01 PDT
Comment on attachment 166262 [details] Patch Clearing flags on attachment: 166262 Committed r129922: <http://trac.webkit.org/changeset/129922>
WebKit Review Bot
Comment 17 2012-09-28 11:04:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.