New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 836787 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

"Aww snap" page seen after background fetch completes

Project Member Reported by na...@chromium.org, Apr 25 2018

Issue description

Here's the relevant part of the stack:
1:16:0425/132814.551841:FATAL:v8_initializer.cc(661)] 
#0 0x7f5beea2e9cd base::debug::StackTrace::StackTrace()
#1 0x7f5bee75953c base::debug::StackTrace::StackTrace()
#2 0x7f5bee7caeea logging::LogMessage::~LogMessage()
#3 0x7f5bd8292361 blink::ReportFatalErrorInWorker()
#4 0x7f5bdab3dae1 v8::Utils::ReportApiFailure()
#5 0x7f5bdb00b639 v8::internal::HandleScope::Extend()
#6 0x7f5bdab41f80 v8::HandleScope::CreateHandle()
#7 0x7f5bd81e97e9 blink::ScopedPersistent<>::NewLocal()
#8 0x7f5bd81e8c13 blink::ScriptState::GetContext()
#9 0x7f5bd82e4b1c blink::ToV8<>()
#10 0x7f5bd8befe8e blink::Request::RefreshBody()
#11 0x7f5bd8bf06e6 blink::Request::Request()
#12 0x7f5bd8bf0822 blink::Request::Request()
#13 0x7f5bd8bf0551 blink::Request::Create()
#14 0x7f5bd4d6aabc blink::BackgroundFetchSettledFetches::BackgroundFetchSettledFetches()
#15 0x7f5bd517ce43 blink::BackgroundFetchSettledFetches::Create()
#16 0x7f5bd5178020 blink::ServiceWorkerGlobalScopeProxy::DispatchBackgroundFetchedEvent()
#17 0x7f5be9965822 content::ServiceWorkerContextClient::DispatchBackgroundFetchedEvent()
#18 0x7f5be740798a content::mojom::ServiceWorkerEventDispatcherStubDispatch::AcceptWithResponder()
#19 0x7f5be996e740 content::mojom::ServiceWorkerEventDispatcherStub<>::AcceptWithResponder()

We shouldn't be calling blink::BackgroundFetchSettledFetches::Create()
in this codepath yet.

This code needs updating: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/serviceworkers/service_worker_global_scope_proxy.cc?rcl=f0e112939eebd94cc8af51216fa5ed367250239b&l=219

Discussed with Rayan, he'll send a patch shortly.



 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 25 2018

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

commit e77672d23d9cb008900b7cd41cab6b2a518fc3bd
Author: Mugdha Lakhani <nator@chromium.org>
Date: Wed Apr 25 15:23:00 2018

[Background Fetch] Add back ScriptState::Scope

to DispatchBackgroundFetchedEvent.

Creation of the scope modifies V8 state, and associates scriptstate with
v8::Context. This helps in the using script state when it's needed later.

TBR=haraken@chromium.org

Bug:  836787 
Change-Id: I7d0c2cb445d74f85d918d0435e6dac2511365ee6
Reviewed-on: https://chromium-review.googlesource.com/1027836
Commit-Queue: Anita Woodruff <awdf@chromium.org>
Reviewed-by: Anita Woodruff <awdf@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553564}
[modify] https://crrev.com/e77672d23d9cb008900b7cd41cab6b2a518fc3bd/third_party/blink/renderer/modules/serviceworkers/service_worker_global_scope_proxy.cc

Status: Fixed (was: Assigned)
This seems to be fixed now, closing
Project Member

Comment 3 by bugdroid1@chromium.org, May 30 2018

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

commit 6fe5e343eb0a9f692d46dd48d22a5062854c9c99
Author: Rayan Kanso <rayankans@chromium.org>
Date: Wed May 30 20:33:18 2018

[Background Fetch] Add ScriptState::Scope to event dispatchers

Calling ToV8 is causing crashes due to missing ScriptState::Scope.

Bug:  836787 
Change-Id: I96cd831e13989b4b58d7bb10f97939a01af50976
Reviewed-on: https://chromium-review.googlesource.com/1078819
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562981}
[modify] https://crrev.com/6fe5e343eb0a9f692d46dd48d22a5062854c9c99/third_party/blink/renderer/modules/serviceworkers/service_worker_global_scope_proxy.cc

Project Member

Comment 4 by bugdroid1@chromium.org, May 31 2018

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

commit 4eeb912e2934fb1ea6285f2d725ce92a2e5609b5
Author: Rayan Kanso <rayankans@chromium.org>
Date: Thu May 31 18:17:44 2018

Update comments about the unused ScriptState::Scope variable.

Bug:  836787 
Change-Id: If926389721e29f806ae9c275c61fdaa7c87b287c
Reviewed-on: https://chromium-review.googlesource.com/1080553
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563322}
[modify] https://crrev.com/4eeb912e2934fb1ea6285f2d725ce92a2e5609b5/third_party/blink/renderer/modules/serviceworkers/service_worker_global_scope_proxy.cc

Sign in to add a comment