New issue
Advanced search Search tips

Issue 832862 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Deprecate WebLocalFrame::FrameForCurrentContext

Project Member Reported by haraken@chromium.org, Apr 13 2018

Issue description

People sometimes use WebLocalFrame::FrameForCurrentContext as a convenient way to get *some* frame.

This is dangerous because if the code is not a right context, it has a risk of leaking info of a wrong context.

There are multiple places using WebLocalFrame::FrameForCurrentContext in a wrong way...

e.g., https://bugs.chromium.org/p/chromium/issues/detail?id=795286

e.g., https://chromium-review.googlesource.com/c/chromium/src/+/987804

I think we should deprecate WebLocalFrame::FrameForCurrentContext. Or rename it to WebLocalFrame::SuperUnsafeFrameForCurrentContext.

 
Cc: jbroman@chromium.org dcheng@chromium.org yukishiino@chromium.org
Components: Blink>Internals>Frames
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/715f5589890173b44d319b146b12ee5ab110d137

commit 715f5589890173b44d319b146b12ee5ab110d137
Author: Jeremy Roman <jbroman@chromium.org>
Date: Mon Nov 26 17:56:10 2018

peerconnection: Plumb frame to port allocator, rather than inferring it from the V8 context.

Inferring from the V8 context is very non-local and can easily break
if this doesn't occur within an inbound V8 call. Explicitly plumbing
the correct frame is preferred.

Bug: 832862
Change-Id: Ie3ab0602ca1cb75201c9663b13adfd6a3152a901
Reviewed-on: https://chromium-review.googlesource.com/c/1347435
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Steve Anton <steveanton@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610882}
[modify] https://crrev.com/715f5589890173b44d319b146b12ee5ab110d137/third_party/blink/renderer/core/frame/local_frame_client.h
[modify] https://crrev.com/715f5589890173b44d319b146b12ee5ab110d137/third_party/blink/renderer/modules/peerconnection/adapters/ice_transport_adapter_cross_thread_factory.h
[modify] https://crrev.com/715f5589890173b44d319b146b12ee5ab110d137/third_party/blink/renderer/modules/peerconnection/adapters/ice_transport_proxy.cc
[modify] https://crrev.com/715f5589890173b44d319b146b12ee5ab110d137/third_party/blink/renderer/modules/peerconnection/adapters/ice_transport_proxy.h
[modify] https://crrev.com/715f5589890173b44d319b146b12ee5ab110d137/third_party/blink/renderer/modules/peerconnection/adapters/test/mock_ice_transport_adapter_cross_thread_factory.h
[modify] https://crrev.com/715f5589890173b44d319b146b12ee5ab110d137/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc

Sign in to add a comment