Skip to content

Commit

Permalink
8314212: Crash when loading cnn.com in WebView
Browse files Browse the repository at this point in the history
Reviewed-by: kcr, hmeda
  • Loading branch information
Jay Bhaskar committed Aug 18, 2023
1 parent 7b797b9 commit ddd1f79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ float MediaPlayerPrivate::currentTime() const
LOG_TRACE1("MediaPlayerPrivate currentTime returns (seekTime): %f\n", m_seekTime);
return m_seekTime;
}

// in case of hls media m3u8 format check network state
// since jfx media do not support hls live streaming protocol
if (MediaPlayerNetworkState::NetworkError == MediaPlayer::NetworkState::NetworkError)
return MediaTime::zeroTime().toFloat();

JNIEnv* env = WTF::GetJavaEnv();
static jmethodID s_mID
= env->GetMethodID(PG_GetMediaPlayerClass(env), "fwkGetCurrentTime", "()F");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,11 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor
#endif
}

// in case of video data format like m3u8 error case ,check if layer needs compositing
#if PLATFORM(JAVA)
if (willBeComposited != needsToBeComposited(layer, queryData))
return;
#endif
ASSERT(willBeComposited == needsToBeComposited(layer, queryData));

// Create or destroy backing here. However, we can't update geometry because layers above us may become composited
Expand Down

1 comment on commit ddd1f79

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.