Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77E691779D for ; Thu, 2 Apr 2015 04:31:53 +0000 (UTC) Received: (qmail 85553 invoked by uid 500); 2 Apr 2015 04:31:53 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 85528 invoked by uid 500); 2 Apr 2015 04:31:53 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 85503 invoked by uid 99); 2 Apr 2015 04:31:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 04:31:53 +0000 Date: Thu, 2 Apr 2015 04:31:53 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-8785) evalJS's javascript need try/catch. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-8785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392126#comment-14392126 ] ASF GitHub Bot commented on CB-8785: ------------------------------------ GitHub user SangChan opened a pull request: https://github.com/apache/cordova-ios/pull/134 [CB-8785] add try/catch for evalJS: evalJS's javascript starts with cordova.require. If there's no cordova object? Show's big alert view. So add try/catch for evalJS: You can merge this pull request into a Git repository by running: $ git pull https://github.com/SangChan/cordova-ios master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-ios/pull/134.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #134 ---- commit 4bbc56805425da2c4aabc5adee6aeaa0460a7d14 Author: SangChan Lee Date: 2015-04-02T04:28:13Z [CB-8785] add try/catch for evalJS: ---- > evalJS's javascript need try/catch. > ----------------------------------- > > Key: CB-8785 > URL: https://issues.apache.org/jira/browse/CB-8785 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 3.5.0 > Reporter: SangChanLee > Fix For: Master > > > Sometimes, There's no cordova object on html files. But, unfortunately CVViewController calls some notification using notification center and call evalJS using these method. (cordova.fireDocumentEvent('resign'), cordova.fireDocumentEvent('resume'), cordova.fireDocumentEvent('active'), cordova.fireDocumentEvent('pause')). > But evalJS's javascript starts with cordova.require. So, at that time there's no cordova object? Show's big alert view. > Need try/catch for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org