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

Issue 2826663002: Fix a crash bug on deallocating CWVWebView. (Closed)

Created:
3 years, 8 months ago by Hiroshi Ichikawa
Modified:
3 years, 8 months ago
CC:
chromium-reviews, Eugene But (OOO till 7-30), ios-reviews+web_chromium.org, ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a crash bug on deallocating CWVWebView. The cause of the bug was that CWVWebView._configuration was deallocated before CWVWebView._webState, while the order must be opposite. I couldn't find a clear documentation of the order of deallocation of fields, but looks like it's the reverse order of the field definitions (the same as in C++), while it assumes implicitly defined fields (by @synthesize) are defined after explicitly defined fields. The fix here is to define both fields explicitly in |_configuration| -> |_webState| order so that they are deallocated in |_webState| -> |_configuration| order. BUG=712556 Review-Url: https://codereview.chromium.org/2826663002 Cr-Commit-Position: refs/heads/master@{#465465} Committed: https://chromium.googlesource.com/chromium/src/+/068120a076d669c081f8c77cc0eccacaac650cb5

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -0 lines) Patch
M ios/web_view/internal/cwv_web_view.mm View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
Hiroshi Ichikawa
3 years, 8 months ago (2017-04-18 08:00:38 UTC) #3
Eugene But (OOO till 7-30)
lgtm
3 years, 8 months ago (2017-04-18 15:22:42 UTC) #4
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/2826663002/1
3 years, 8 months ago (2017-04-19 01:46:56 UTC) #6
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 01:58:31 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/068120a076d669c081f8c77cc0ec...

Powered by Google App Engine
This is Rietveld 408576698