Bug 107920

Summary: [EFL][WK2] Use C API inside ewk_database_manager and ewk_storage_manager
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit EFLAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, gyuyoung.kim, kenneth, lucas.de.marchi, mikhail.pozdnyakov, naginenis, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107657    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2013-01-24 23:22:21 PST
As per Bug 107657, we should start using the C API internally to avoid violating layering.
Comment 1 Chris Dumez 2013-01-24 23:48:43 PST
Created attachment 184682 [details]
Patch
Comment 2 Gyuyoung Kim 2013-01-25 22:48:48 PST
Comment on attachment 184682 [details]
Patch

LGTM,
Comment 3 Benjamin Poulain 2013-01-25 23:09:56 PST
Comment on attachment 184682 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=184682&action=review

This looks correct to me too. Just one question:

> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:70
>  EwkContext::EwkContext(PassRefPtr<WebContext> context)
>      : m_context(context)
> -    , m_databaseManager(EwkDatabaseManager::create(m_context))
> -    , m_storageManager(EwkStorageManager::create(m_context))
> +    , m_databaseManager(EwkDatabaseManager::create(WKContextGetDatabaseManager(toAPI(m_context.get()))))
> +    , m_storageManager(EwkStorageManager::create(WKContextGetKeyValueStorageManager(toAPI(m_context.get()))))

It is disturbing the constructor takes a WebContext. Can you give some ... context :) ... why is it done this way?
Comment 4 Chris Dumez 2013-01-25 23:49:24 PST
Comment on attachment 184682 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=184682&action=review

>> Source/WebKit2/UIProcess/API/efl/ewk_context.cpp:70
>> +    , m_storageManager(EwkStorageManager::create(WKContextGetKeyValueStorageManager(toAPI(m_context.get()))))
> 
> It is disturbing the constructor takes a WebContext. Can you give some ... context :) ... why is it done this way?

Yes, this is temporary until EwkContext is ported to the C API. This will be addressed in Bug 107666. We are going incrementally.
Comment 5 Benjamin Poulain 2013-01-25 23:55:38 PST
Comment on attachment 184682 [details]
Patch

> Yes, this is temporary until EwkContext is ported to the C API. This will be addressed in Bug 107666. We are going incrementally.

Okay. The patch looks great otherwise, let's land this.
Comment 6 WebKit Review Bot 2013-01-26 00:01:05 PST
Comment on attachment 184682 [details]
Patch

Clearing flags on attachment: 184682

Committed r140905: <http://trac.webkit.org/changeset/140905>
Comment 7 WebKit Review Bot 2013-01-26 00:01:11 PST
All reviewed patches have been landed.  Closing bug.