Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: ios/web/web_state/js/resources/error.js

Issue 2817943002: Fully deprecate core.js. Moved last method to error.js. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Error handling APIs and listeners.
7 */
8
9 goog.provide('__crWeb.error');
10
11 goog.require('__crWeb.message');
12
13 /** Beginning of anonymouse object */
14 (function() {
15
16 /**
17 * JavaScript errors are logged on the main application side. The handler is
18 * added ASAP to catch any errors in startup. Note this does not appear to
Eugene But (OOO till 7-30) 2017/04/13 16:30:06 Could you please drop "Note this does not appear t
danyao 2017/04/13 17:40:45 Done.
19 * work in iOS < 5.
20 */
21 window.addEventListener('error', function(event) {
22 // Sadly, event.filename and event.lineno are always 'undefined' and '0'
Eugene But (OOO till 7-30) 2017/04/13 16:30:06 WKWebView may support this now. Could you please f
danyao 2017/04/13 17:40:45 Done.
23 // with UIWebView.
24 __gCrWeb.message.invokeOnHost(
25 {'command': 'window.error', 'message': event.message.toString()});
26 });
27
28 // Flush the message queue.
29 if (__gCrWeb.message) {
30 __gCrWeb.message.invokeQueues();
31 }
32
33 }()); // End of anonymous object
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698