Commit b3557d52 authored by eugenebut's avatar eugenebut Committed by Commit bot

Use WeakNSProtocol/WeakNSObject for WebControllerObserverBridge ivars.

This is a speculative fix for crash which happens on calling
respondToSelector: method on dangling web_controller_observer_ pointer.

BUG=486668

Review URL: https://codereview.chromium.org/1136753004

Cr-Commit-Position: refs/heads/master@{#329415}
parent e5fab09f
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <string> #include <string>
#import "base/ios/weak_nsobject.h"
#include "ios/web/public/web_state/web_state_observer.h" #include "ios/web/public/web_state/web_state_observer.h"
@class CRWWebController; @class CRWWebController;
...@@ -52,8 +53,8 @@ class WebControllerObserverBridge : public WebStateObserver { ...@@ -52,8 +53,8 @@ class WebControllerObserverBridge : public WebStateObserver {
const GURL& url, const GURL& url,
bool user_is_interacting); bool user_is_interacting);
id<CRWWebControllerObserver> web_controller_observer_; // Weak. base::WeakNSProtocol<id<CRWWebControllerObserver>> web_controller_observer_;
CRWWebController* web_controller_; // Weak. base::WeakNSObject<CRWWebController> web_controller_;
std::string script_command_callback_prefix_; std::string script_command_callback_prefix_;
DISALLOW_COPY_AND_ASSIGN(WebControllerObserverBridge); DISALLOW_COPY_AND_ASSIGN(WebControllerObserverBridge);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment