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

Issue 2472593005: Revert of [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)

Created:
4 years, 1 month ago by sdefresne
Modified:
4 years, 1 month ago
CC:
browser-components-watch_chromium.org, chromium-reviews, estade+watch_chromium.org, jdonnelly+autofillwatch_chromium.org, mathp+autofillwatch_chromium.org, rouslan+autofill_chromium.org, sebsg+autofillwatch_chromium.org, vabr+watchlistautofill_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of [ios] Pass more --jscomp_error switches to the closure Compiler. (patchset #3 id:40001 of https://codereview.chromium.org/2449333002/ ) Reason for revert: Reverting as this break the iOS autoroller and the CL was implemented by a member of the Chrome on iOS team. Original issue's description: > [ios] Pass more --jscomp_error switches to the closure Compiler. > > 1.) Allow compiler to see __gCrWeb, __gCrWeb.autofill, > __gCrWeb.languageDetection, __gCrWeb.suggestions, __gCrWeb.translate, > __gCrWeb.autofill, __gCrWeb.common objects by creating them via dot > syntax. > > 2.) Made __gCrWeb.message.invokeOnHost public as it's used in other > files. > > 3.) Access windowId, via bracket syntax as it may not be defined. > > 4.) Access POSTSuccessHandler and POSTErrorHandler as they are > installed by WKWebView from the native code. > > BUG=487804 > > Committed: https://crrev.com/cda1c632a2cbe11af48a9ef5bb7b7e568934611f > Cr-Commit-Position: refs/heads/master@{#429344} TBR=dpapad@chromium.org,jdonnelly@chromium.org,eugenebut@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=487804

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -84 lines) Patch
M components/autofill/ios/browser/resources/autofill_controller.js View 2 chunks +9 lines, -19 lines 0 comments Download
M components/autofill/ios/browser/resources/suggestion_controller.js View 2 chunks +2 lines, -13 lines 0 comments Download
M components/translate/ios/browser/resources/language_detection.js View 1 chunk +1 line, -13 lines 0 comments Download
M components/translate/ios/browser/resources/translate_ios.js View 1 chunk +1 line, -13 lines 0 comments Download
M ios/web/js_compile.gni View 1 chunk +6 lines, -4 lines 0 comments Download
M ios/web/web_state/js/resources/base.js View 1 chunk +1 line, -5 lines 0 comments Download
M ios/web/web_state/js/resources/common.js View 2 chunks +3 lines, -8 lines 0 comments Download
M ios/web/web_state/js/resources/message.js View 3 chunks +2 lines, -7 lines 0 comments Download
M ios/web/web_state/js/resources/post_request.js View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
sdefresne
Created Revert of [ios] Pass more --jscomp_error switches to the closure Compiler.
4 years, 1 month ago (2016-11-03 16:10:14 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2472593005/1
4 years, 1 month ago (2016-11-03 16:10:45 UTC) #3
commit-bot: I haz the power
4 years, 1 month ago (2016-11-03 16:11:28 UTC) #5
Failed to apply patch for ios/web/web_state/js/resources/common.js:
While running git apply --index -3 -p1;
  error: patch failed: ios/web/web_state/js/resources/common.js:28
  error: repository lacks the necessary blob to fall back on 3-way merge.
  error: ios/web/web_state/js/resources/common.js: patch does not apply

Patch:       ios/web/web_state/js/resources/common.js
Index: ios/web/web_state/js/resources/common.js
diff --git a/ios/web/web_state/js/resources/common.js
b/ios/web/web_state/js/resources/common.js
index
7796fc243975adf078a4d9870935b73bbc4490ee..9e13a41d752d899ce5ef2bdec164a8809cb84587
100644
--- a/ios/web/web_state/js/resources/common.js
+++ b/ios/web/web_state/js/resources/common.js
@@ -14,12 +14,7 @@
  * injected. String 'common' is used in |__gCrWeb['common']| as it needs to be
  * accessed in Objective-C code.
  */
-__gCrWeb.common = {};
-
-// Store common namespace object in a global __gCrWeb object referenced by a
-// string, so it does not get renamed by closure compiler during the
-// minification.
-__gCrWeb['common'] = __gCrWeb.common;
+__gCrWeb['common'] = {};
 
 /* Beginning of anonymous object. */
 (function() {
@@ -28,13 +23,13 @@
    * in host pages.
    * @constructor
    */
-  __gCrWeb.common.JSONSafeObject = function JSONSafeObject() {
+  __gCrWeb['common'].JSONSafeObject = function JSONSafeObject() {
   };
 
   /**
    * Protect against custom implementation of Object.toJSON in host pages.
    */
-  delete __gCrWeb.common.JSONSafeObject.prototype.toJSON;
+  __gCrWeb['common'].JSONSafeObject.prototype.toJSON = null;
 
   /**
    * Retain the original JSON.stringify method where possible to reduce the

Powered by Google App Engine
This is Rietveld 408576698