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

Issue 2566223006: Web MIDI: stop sending messages when the document is going to be closed (Closed)

Created:
4 years ago by Takashi Toyoshima
Modified:
4 years ago
Reviewers:
kouhei (in TOK)
CC:
chromium-reviews, blink-reviews, haraken, toyoshim+midi_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Web MIDI: stop sending messages when the document is going to be closed When the page is going to be closed, loader() may return nullptr. In MIDIAccess::sendMIDIData(), we refer the DocumentLoader without any check, thus it results in a renderer crash though it rarely happens. I had a report on a similar issue, but the specific code in the case was already removed. This patch also fixes another potential problem that may cause the same issue. BUG=674005 Committed: https://crrev.com/be3f5b8ec3199a8c6fbba72cbc83776d6ae53efc Cr-Commit-Position: refs/heads/master@{#438485}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp View 2 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (6 generated)
Takashi Toyoshima
PTAL. Probably we have similar potential problems here and there, especially around Performance and Event ...
4 years ago (2016-12-14 09:38:59 UTC) #3
kouhei (in TOK)
lgtm lgtm as a short term fix, but I think webmidi shouldn't access DocumentLoader in ...
4 years ago (2016-12-14 10:39:30 UTC) #5
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/2566223006/1
4 years ago (2016-12-14 10:39:44 UTC) #6
Takashi Toyoshima
So what's the good manner to obtain the document creation timestamp? timing/Performance.cpp also accesses frame->document->loader() ...
4 years ago (2016-12-14 11:48:53 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years ago (2016-12-14 12:09:02 UTC) #10
commit-bot: I haz the power
4 years ago (2016-12-14 12:11:23 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/be3f5b8ec3199a8c6fbba72cbc83776d6ae53efc
Cr-Commit-Position: refs/heads/master@{#438485}

Powered by Google App Engine
This is Rietveld 408576698