Bug 97839 - [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy.
Summary: [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Byungwoo Lee
URL:
Keywords:
Depends on: 97528 97865
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 19:04 PDT by Byungwoo Lee
Modified: 2012-09-28 11:04 PDT (History)
7 users (show)

See Also:


Attachments
Patch (12.32 KB, patch)
2012-09-27 22:38 PDT, Byungwoo Lee
no flags Details | Formatted Diff | Diff
Patch (12.58 KB, patch)
2012-09-28 02:44 PDT, Byungwoo Lee
no flags Details | Formatted Diff | Diff
Patch (13.56 KB, patch)
2012-09-28 04:50 PDT, Byungwoo Lee
no flags Details | Formatted Diff | Diff
Patch (13.55 KB, patch)
2012-09-28 08:59 PDT, Byungwoo Lee
no flags Details | Formatted Diff | Diff
Patch (13.57 KB, patch)
2012-09-28 09:02 PDT, Byungwoo Lee
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Byungwoo Lee 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)
Comment 1 Byungwoo Lee 2012-09-27 22:38:04 PDT
Created attachment 166142 [details]
Patch
Comment 2 Chris Dumez 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.
Comment 3 Chris Dumez 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.
Comment 4 Byungwoo Lee 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 :)
Comment 5 Chris Dumez 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.
Comment 6 Byungwoo Lee 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 :)
Comment 7 Byungwoo Lee 2012-09-28 02:44:54 PDT
Created attachment 166186 [details]
Patch
Comment 8 Byungwoo Lee 2012-09-28 02:48:15 PDT
Comment on attachment 166186 [details]
Patch

Need apply bug 97528
Comment 9 Gyuyoung Kim 2012-09-28 02:48:25 PDT
Comment on attachment 166186 [details]
Patch

Attachment 166186 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/14054286
Comment 10 Byungwoo Lee 2012-09-28 04:50:46 PDT
Created attachment 166209 [details]
Patch
Comment 11 Chris Dumez 2012-09-28 08:01:44 PDT
Comment on attachment 166209 [details]
Patch

LGTM, thanks.
Comment 12 Kenneth Rohde Christiansen 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
Comment 13 Byungwoo Lee 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.
Comment 14 Byungwoo Lee 2012-09-28 08:59:39 PDT
Created attachment 166260 [details]
Patch
Comment 15 Byungwoo Lee 2012-09-28 09:02:10 PDT
Created attachment 166262 [details]
Patch
Comment 16 WebKit Review Bot 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>
Comment 17 WebKit Review Bot 2012-09-28 11:04:07 PDT
All reviewed patches have been landed.  Closing bug.