Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

[Tizen] Refactor XWalkLauncher for usage of RESET event. #2563

Merged
merged 1 commit into from
Dec 10, 2014

Conversation

jizydorczyk
Copy link
Contributor

After this change execute xwalk-launcher on Tizen will cause
initialization of app core and launch of g_main_loop. Application
will be actually launched after xwalk-launcher receives RESET
event from platform.

BUG=XWALK-2779

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@be59b19 as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2327)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2327)
Crosswalk Tizen IVI [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2320)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/1917)

'xwalk_launcher_tizen.h',
'xwalk_launcher.cc',
'xwalk_launcher.h',
'../tizen/xwalk_launcher_tizen.cc',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the file location rules are following: if the file makes platform specific customization of a common functionality than it's located in the same folder as generic file but has "_platform" postfix. If the implements something platform-specific stuff which does not have generic implementation, it should be put to "platform" folder.

In this case we have Linux-specific shared process model implementation, so we have xwalk_launcher in "linux" folder, on Tizen however some more tricks are needed, so we have xwalk_launcher_tizen for it.

@pozdnyakov
Copy link
Contributor

We've a strong cocktail with glib C and C++11 here (I know it was already there for "historical" reasons but maybe it's time to re-consider it since this PR is doing refactoring), would be nice IMO to pick one and drop the other. I personally would prefer having C++11 and chromium base classes (we may keep glib in isolated places where it's convenient, like cmd line parsing).
However, on the other hand, @baillaw I know you're keen on reducing the build time for the utils, would using of just base classes look OK from your perspective?

@jizydorczyk
Copy link
Contributor Author

@pozdnyakov do you suggest to move all the code that uses glib (g_main_loop, argument parsing) to xwalk_launcher_main.cc and replace GDBus with chromium's dbus implementation?

@pozdnyakov
Copy link
Contributor

@jizydorczyk considering that xwalk-launcher becomes an app's extension process (so it has code dependencies to xwalk/chromium (has to create XWalkExtensionProcessLauncher)) anyway, I would do so.. (initially the idea of xwalk-launcher was that it's just a thin client making only dbus calls, that's why its implementation had started using glib).
But let's first wait for @baillaw opinion.

@baillaw
Copy link
Contributor

baillaw commented Nov 5, 2014

@pozdnyakov : The split of rpm packages for reduce build time is avaible here : #2575
Please wait the PR 2575 merge first

@pozdnyakov
Copy link
Contributor

@baillaw looks like #2575 is not moving that fast. I'd like to just make sure: are you opposed to xwalk-launcher (not installer!) to be rewritten without glib, using C++& base classes? if not, I think that's the way to go.

@baillaw
Copy link
Contributor

baillaw commented Nov 14, 2014

@pozdnyakov : I'm not opposed to this at all.
you're rigth,2575 is moving very slow, so LGTM.

@pozdnyakov
Copy link
Contributor

So, @jizydorczyk would you swipe glib stuff out (except where it's really more convenient, like cmd line parsing)?

@jizydorczyk
Copy link
Contributor Author

Yes, I will.

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@ded7b36 as its head.

Bot Status
Crosswalk Tizen 3 Common [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2173)
Crosswalk Android-X86 [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2583)
Crosswalk Linux [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2583)
Crosswalk Tizen IVI [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2576)

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@3ad0002 as its head.

Bot Status
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2174)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2584)
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2584)
Crosswalk Tizen IVI [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2577)

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@8b67e6b as its head.

Bot Status
Crosswalk Linux [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2631)
Crosswalk Tizen IVI [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2624)
Crosswalk Tizen 3 Common [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2220)
Crosswalk Android-X86 [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2631)

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@bfd177d as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2632)
Crosswalk Tizen IVI [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2625)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2221)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2632)

@jizydorczyk
Copy link
Contributor Author

Updated commit according to your comments.

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@31a70e6 as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2640)
Crosswalk Tizen IVI [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2633)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2229)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2640)

@jizydorczyk
Copy link
Contributor Author

@pozdnyakov could you take a look at this?

@pozdnyakov
Copy link
Contributor

@jizydorczyk The patch looks good in general (there are some nits but those can be fixed quite fast) and it definitely makes xwalk-launcher code look much better (Thanks! ). But now we've a new circumstance: https://lists.crosswalk-project.org/pipermail/crosswalk-dev/2014-December/002308.html (off course I did not know we'll go this way when I recommended the solution for this PR) -- xwalk-runner will just go away. So now I'm not sure how to proceed with this PR. Do you want me to proceed with the review and merge it even though it'll go away soon?

@jizydorczyk
Copy link
Contributor Author

I think we can proceed with this PR and later maybe you'll want to reuse some parts of this code?

@pozdnyakov
Copy link
Contributor

ok, let's proceed

const char kServiceName[] = "org.crosswalkproject.Runtime1";
const char kRunningManagerIface[] = "org.crosswalkproject.Running.Manager1";
const char kRunningAppIface[] = "org.crosswalkproject.Running.Application1";
const dbus::ObjectPath kRunningManagerDBusPath("/running1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make it const char[] as well (the vars that are initialized before main() are better to be POD )

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@5c9a393 as its head.

Bot Status
Crosswalk Linux [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2645)
Crosswalk Tizen IVI [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2638)
Crosswalk Tizen 3 Common [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2234)
Crosswalk Android-X86 [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2645)

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@75164e0 as its head.

Bot Status
Crosswalk Linux [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2646)
Crosswalk Tizen IVI [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2639)
Crosswalk Tizen 3 Common [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2235)
Crosswalk Android-X86 [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2646)

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@b49c571 as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2647)
Crosswalk Tizen IVI [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2640)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2236)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2647)

@jizydorczyk
Copy link
Contributor Author

@pozdnyakov could you take a look at this PR?

const std::string& interface_name) {
if (object_path != app_proxy_->object_path())
return;
LOG(INFO) << "Application '" << object_path.value().c_str()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need in .c_str() call, right?

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@89e08bc as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2649)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2238)
Crosswalk Tizen IVI [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2642)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2649)

XWalkLauncherTizen::XWalkLauncherTizen(bool query_running,
base::MessageLoop* main_loop)
: main_loop_(main_loop),
XWalkLauncher(query_running, main_loop) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong initialization order. Cannot you get main_loop from the base class?

@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@3771c0b as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2650)
Crosswalk Tizen IVI [FAILED 💔](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2643)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2239)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2650)

@pozdnyakov
Copy link
Contributor

lgtm

After this change execute xwalk-launcher on Tizen will cause
initialization of app core and launch of g_main_loop. Application
will be actually launched after xwalk-launcher receives RESET
event from platform.

BUG=XWALK-2779
@crosswalk-trybot
Copy link

Testing patch series with jakegeno/crosswalk@a32332d as its head.

Bot Status
Crosswalk Linux [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Linux/builds/2651)
Crosswalk Tizen IVI [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen IVI/builds/2644)
Crosswalk Tizen 3 Common [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Tizen 3 Common/builds/2240)
Crosswalk Android-X86 [SUCCESS 💚](https://build.crosswalk-project.org/try/builders/Crosswalk Android-X86/builds/2651)

@jizydorczyk
Copy link
Contributor Author

Anyone else?

pozdnyakov pushed a commit that referenced this pull request Dec 10, 2014
[Tizen] Refactor XWalkLauncher for usage of RESET event.
@pozdnyakov pozdnyakov merged commit c991308 into crosswalk-project:master Dec 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants