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

Issue 1178063007: Updated error translation logic. (Closed)

Created:
5 years, 6 months ago by kkhorimoto
Modified:
5 years, 5 months ago
CC:
chromium-reviews, danakj
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Updated error translation logic. This CL changes several aspects of our error translation code: - Moves the actual translation process to |-loadErrorInNativeView:|. This allows the logic in |-handleLoadError:inMainFrame:| to correctly differentiate between webview-generated errors and errors originating from the net stack. - Changes |NetErrorFromError()| to translate the ultimate underlying error rather than the top-level error, and appends the translated error to the end of the passed-in error's underlying error chain. - Created |GetUltimateUnderlyingErrorForError()|, which iterates through the underlying error chain to find the original error. BUG=492434, 496972, 496115, 473888 Committed: https://crrev.com/d70e5c4bd55edf8c901b11b6f1e0aa8f1bacdde5 Cr-Commit-Position: refs/heads/master@{#337475}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Eugene's comments #

Total comments: 15

Patch Set 3 : Eugene + Stuarts' comments #

Total comments: 4

Patch Set 4 : stuart's comments #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -45 lines) Patch
M base/base.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A base/ios/ns_error_util.h View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
A base/ios/ns_error_util.mm View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
D ios/web/web_state/error_translation_util.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
D ios/web/web_state/error_translation_util.mm View 1 2 2 chunks +15 lines, -20 lines 0 comments Download
M ios/web/web_state/ui/crw_ui_web_view_web_controller.mm View 1 2 3 4 3 chunks +11 lines, -2 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 2 3 4 7 chunks +14 lines, -15 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller+protected.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ios/web/web_state/ui/crw_wk_web_view_web_controller.mm View 1 2 3 4 4 chunks +37 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (10 generated)
kkhorimoto
5 years, 6 months ago (2015-06-19 00:26:15 UTC) #2
Eugene But (OOO till 7-30)
https://codereview.chromium.org/1178063007/diff/1/ios/web/public/web_state/error_translation_util.h File ios/web/public/web_state/error_translation_util.h (right): https://codereview.chromium.org/1178063007/diff/1/ios/web/public/web_state/error_translation_util.h#newcode14 ios/web/public/web_state/error_translation_util.h:14: NSError* GetUltimateUnderlyingErrorForError(NSError* error); NIT: How about Final instead of ...
5 years, 6 months ago (2015-06-19 00:52:02 UTC) #3
kkhorimoto
Addressed Eugene's comments. + danakj for base/ https://codereview.chromium.org/1178063007/diff/1/ios/web/public/web_state/error_translation_util.h File ios/web/public/web_state/error_translation_util.h (right): https://codereview.chromium.org/1178063007/diff/1/ios/web/public/web_state/error_translation_util.h#newcode14 ios/web/public/web_state/error_translation_util.h:14: NSError* GetUltimateUnderlyingErrorForError(NSError* ...
5 years, 6 months ago (2015-06-23 20:33:59 UTC) #5
danakj
On 2015/06/23 20:33:59, kkhorimoto_ wrote: > Addressed Eugene's comments. > > + danakj for base/ ...
5 years, 6 months ago (2015-06-23 20:55:17 UTC) #6
kkhorimoto
On 2015/06/23 20:55:17, danakj wrote: > On 2015/06/23 20:33:59, kkhorimoto_ wrote: > > Addressed Eugene's ...
5 years, 6 months ago (2015-06-23 21:00:16 UTC) #7
Eugene But (OOO till 7-30)
https://codereview.chromium.org/1178063007/diff/20001/base/base.gypi File base/base.gypi (right): https://codereview.chromium.org/1178063007/diff/20001/base/base.gypi#newcode251 base/base.gypi:251: 'ios/nserror_util.h', ns_error_util (see ui_web_view for example) https://codereview.chromium.org/1178063007/diff/20001/base/ios/nserror_util.h File base/ios/nserror_util.h ...
5 years, 6 months ago (2015-06-23 21:27:14 UTC) #8
danakj
Hm, I don't really know anything about obj-c so it's tough for me to make ...
5 years, 6 months ago (2015-06-24 16:32:58 UTC) #10
Nico
On 2015/06/24 16:32:58, danakj wrote: > Hm, I don't really know anything about obj-c so ...
5 years, 6 months ago (2015-06-24 18:55:17 UTC) #11
stuartmorgan
I suspect I'm missing something obvious here but... when would we have chained underlying errors? ...
5 years, 6 months ago (2015-06-24 19:13:09 UTC) #12
kkhorimoto
I've seen errors in CRWWebController's |-handleLoadError:isMainFrame:| that have underlying errors that are not from the ...
5 years, 6 months ago (2015-06-24 20:01:42 UTC) #13
Eugene But (OOO till 7-30)
lgtm
5 years, 6 months ago (2015-06-24 20:30:46 UTC) #14
stuartmorgan
Makes sense now; LGTM with nits. https://codereview.chromium.org/1178063007/diff/40001/base/ios/ns_error_util.mm File base/ios/ns_error_util.mm (right): https://codereview.chromium.org/1178063007/diff/40001/base/ios/ns_error_util.mm#newcode16 base/ios/ns_error_util.mm:16: // Iterates through ...
5 years, 6 months ago (2015-06-24 21:30:48 UTC) #15
kkhorimoto
https://codereview.chromium.org/1178063007/diff/40001/base/ios/ns_error_util.mm File base/ios/ns_error_util.mm (right): https://codereview.chromium.org/1178063007/diff/40001/base/ios/ns_error_util.mm#newcode16 base/ios/ns_error_util.mm:16: // Iterates through |error|'s underlying errors and returns them ...
5 years, 6 months ago (2015-06-24 22:17:59 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1178063007/60001
5 years, 6 months ago (2015-06-24 22:19:07 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/73752)
5 years, 6 months ago (2015-06-24 22:31:33 UTC) #21
Nico
base.gypi lgtm
5 years, 6 months ago (2015-06-25 03:43:55 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1178063007/60001
5 years, 6 months ago (2015-06-25 03:44:24 UTC) #24
Nico
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ios/web/web_state/ui/ios_web.crw_ui_web_view_web_controller.i386.o.d -DV8_DEPRECATION_WARNINGS -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=239765-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_CONFIGURATION_POLICY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DCLD_VERSION=2 -DDISABLE_FTP_SUPPORT=1 ...
5 years, 6 months ago (2015-06-25 03:45:08 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1178063007/80001
5 years, 5 months ago (2015-07-06 20:01:06 UTC) #29
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 5 months ago (2015-07-06 21:22:26 UTC) #30
commit-bot: I haz the power
5 years, 5 months ago (2015-07-06 21:23:09 UTC) #31
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d70e5c4bd55edf8c901b11b6f1e0aa8f1bacdde5
Cr-Commit-Position: refs/heads/master@{#337475}

Powered by Google App Engine
This is Rietveld 408576698