• lazyboy's avatar
    Fix speech crash on render view swap. · ada65a7b
    lazyboy authored
    ChromeSRMDelegate should not be reading the WebContents* back from
      WebContentsObserver after it has explicitly set to observe nullptr
      WebContents.
    This was introduced by my earlier CL: r330213, I never tested the
      feature from NTP.
    
    BUG=489182, 489157
    Test=1) From new tab page, click on the mic beside search box,
      feed it some search query, it should not crash chrome.
    2) Similar to step #1, but before the query completes, close the
      tab, observe no crash.
    
    Review URL: https://codereview.chromium.org/1134773004
    
    Cr-Commit-Position: refs/heads/master@{#330784}
    ada65a7b
chrome_speech_recognition_manager_delegate.cc 16.1 KB