Fix SIGABRT when runtime exits.
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 10 Aug 2015 04:33:51 +0000 (13:33 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 10 Aug 2015 04:33:51 +0000 (13:33 +0900)
ewk_shutdown() should be called after Runtime's destructor.

Change-Id: I64baede07e4418cbf75ba0d65f3d863ee1da3c65

src/runtime/main.cc

index 6fbb087..a4eab5f 100755 (executable)
@@ -48,8 +48,12 @@ int main(int argc, char* argv[]) {
         sizeof(chromium_arg_options) / sizeof(chromium_arg_options[0]);
     ewk_set_arguments(chromium_arg_cnt, chromium_arg_options);
 
-    wrt::Runtime runtime;
-    int ret = runtime.Exec(argc, argv);
+    int ret = 0;
+    // Runtime's destructor should be called before ewk_shutdown()
+    {
+      wrt::Runtime runtime;
+      ret = runtime.Exec(argc, argv);
+    }
     ewk_shutdown();
     exit(ret);
   }