From: SangYong Park Date: Fri, 29 Jun 2018 04:41:41 +0000 (+0900) Subject: Fix extension cleanup issue X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83be54d713e3d741c63750c4cecd720e2752248d;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Fix extension cleanup issue Exception is occured when extension cleanup by web device api. (exit()) because, before-quit event did not occur. Change-Id: Iea468e56347ab14459fa5b4b4b6e21ac64ba8371 Signed-off-by: SangYong Park --- diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index c7d8426..7e3e176 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -938,8 +938,7 @@ void WebContents::HandleWrtPluginMessage(Ewk_Wrt_Message_Data* msg) { Eina_Stringshare* msg_ref_id = msg->GetReferenceId(); Eina_Stringshare* msg_value = msg->GetValue(); if (TYPE_IS("tizen://exit")) { - atom::Browser *browser_model = atom::Browser::Get(); - browser_model->Shutdown(); + atom::Browser::Get()->Quit(); } eina_stringshare_del(msg_ref_id); diff --git a/wrt/src/main.js b/wrt/src/main.js index e1ee03f..b84ef59 100644 --- a/wrt/src/main.js +++ b/wrt/src/main.js @@ -14,6 +14,13 @@ const yargs = require('yargs'); process.env.DEBUG = originalDebug; } +process.on('uncaughtException', function (error) { + // Do nothing if the user has a custom uncaught exception handler. + var ref, stack + stack = (ref = error.stack) != null ? ref : error.name + ': ' + error.message + console.error('A JavaScript error occurred in the main process\n' + stack) +}) + let parseCommandLine = function() { let options = yargs(process.argv.slice(1)).wrap(80); options.usage('WebRuntime');