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

Issue 2127673003: Fix worker WebSocket crash caused by dereferencing weak pointer (Closed)

Created:
4 years, 5 months ago by yhirano
Modified:
4 years, 5 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2785
Target Ref:
refs/pending/branch-heads/2785
Project:
chromium
Visibility:
Public.

Description

Fix worker WebSocket crash caused by dereferencing weak pointer WorkerWebSocketChannel::Peer::m_bridge is bound to workerGlobalScopeDidError as |bridge|. Because it is a CrossThreadWeakPersistent, it's possible that |m_bridge| is not null when bound but |bridge| is null when called. This CL adds null pointer checks to avoid a crash. BUG=625649 Review-Url: https://codereview.chromium.org/2123703002 Cr-Commit-Position: refs/heads/master@{#403744} (cherry picked from commit bb4da95f6202839ccf81445d1d0ff2cb9c07118b) Committed: https://chromium.googlesource.com/chromium/src/+/edd6a8a2e036ac614a5e62d64ce737fbd968e852

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -7 lines) Patch
M third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp View 7 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
yhirano
4 years, 5 months ago (2016-07-06 10:25:07 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
edd6a8a2e036ac614a5e62d64ce737fbd968e852.

Powered by Google App Engine
This is Rietveld 408576698