Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1583251 - P4 - Allow deserialize shared memory for Workers; r=nik…
Browse files Browse the repository at this point in the history
…a,perry

Differential Revision: https://phabricator.services.mozilla.com/D48560
  • Loading branch information
chihweitung committed Oct 17, 2019
1 parent 527509d commit 79a49ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dom/workers/MessageEventRunnable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ bool MessageEventRunnable::DispatchDOMEvent(JSContext* aCx,
MarkerTracingType::START);
}

Read(parent, aCx, &messageData, rv);
JS::CloneDataPolicy cloneDataPolicy;
// The target of a worker postMessage cannot change while the message is
// in-flight, so SAB status was checked at sending-time, and does not need to
// be checked when deserializing.
cloneDataPolicy.allowSharedMemory();
Read(parent, aCx, &messageData, cloneDataPolicy, rv);

if (isTimelineRecording) {
end = MakeUnique<WorkerTimelineMarker>(
Expand Down

0 comments on commit 79a49ec

Please sign in to comment.