New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 665044 link

Starred by 7 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Compat

Blocking:
issue 662675


Participants' hotlists:
iOS-Web-Platform-Backlog


Sign in to add a comment

Browser-injected JavaScript should never raise unhandled JavaScript exceptions

Project Member Reported by rbyers@chromium.org, Nov 14 2016

Issue description

Lots of web developers rely on services that track all invocations to window.onerror.  If bling ever generates unhandled JS exceptions itself, it can cause analytics problems for such users (eg. swamping out their own issues with bling-specific ones).

For example see:
http://stackoverflow.com/questions/26483541/referenceerror-cant-find-variable-gcrweb
 issue 590375 
Any hits when googling for "gCrWeb"

Can we come up with some scheme to reduce the risk that exceptions will ever escape from bling-internal JS code?
 

Comment 1 by rbyers@chromium.org, Nov 14 2016

Description: Show this description

Comment 2 by rbyers@chromium.org, Nov 14 2016

Do we have any UMA metrics today about unhandled exceptions generated by bling JavaScript code?

Comment 3 by rbyers@chromium.org, Nov 14 2016

Blocking: 662675

Comment 4 by rbyers@chromium.org, Nov 14 2016

Summary: Browser-injected JavaScript should never raise unhandled JavaScript exceptions (was: Chrome for iOS should never raise unhandled JavaScript exceptions)
Blocking: 418827
Cc: eugene...@chromium.org
Components: Mobile>WebView>Glue
+eugenebut

Comment 7 by pkl@chromium.org, Nov 14 2016

Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)
Labels: -Pri-2 Pri-3
We can wrap all JS execution in try-catch block.
Blocking: -418827
This bug does not block/418827. 418827 is an actual bug in Autofill feature, catching the exception will not fix that race condition.

Comment 10 Deleted

Cc: danyao@chromium.org
Is that link in #10 the right one?  That's about the (slighly related) __gCRWeb issue.

By the way, I assume there are some cases where we do want specific exceptions to escape.  Eg. if we're wrapping an API that (by spec) can throw exceptions in certain situations, then we should still allow those exceptions through.  The issue here is just with exceptions coming from our own implementation that aren't specified to be part of the behavior of the API being invoked.

/cc danyao@ who might be looking at this
Sorry, that doc belongs to crbug.com/665045. Removing comment #10
Owner: danyao@chromium.org
Labels: -Type-Bug Type-Compat
Components: Mobile>iOSWeb
Components: -Mobile>WebView>Glue
Components: -Mobile>iOSWeb Mobile>iOSWeb>ScriptInjections

Sign in to add a comment