New issue
Advanced search Search tips

Issue 803478 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

[CleanUp] Clean-up duplicate codes with ScriptValue::V8ValueFor

Project Member Reported by maxlg@google.com, Jan 18 2018

Issue description

Cc: mlippautz@chromium.org yukishiino@chromium.org
cc yukishiino, mlippautz who may have opinions about how this should wind up looking (we used to just hold ScriptValue, but now we want some functionality presently there in combination with TraceWrapperV8Reference). Maybe we need ScriptValue to be wrapper-tracing-aware?
Cc: maxlg@chromium.org peria@chromium.org
Owner: peria@chromium.org
Status: Assigned (was: Available)
We have a plan to make ScriptState be GarbagedCollected, and in this course, we do not want ScriptValue to have a ScriptState (or, ScriptValue should be GarbagedCollected, too), and I'm currently wondering if we really need ScriptValue or not (i.e. can we retire ScriptValue?).

Cloning v8::Value across worlds is quite important, and the bindings layer should provide an utility function at least.  However, we maybe do not need ScriptValue itself (I'm not convinced yet, though).

Peria@ will be working on this point once he finish the context snapshot project.

From what I remember, the greater idea was to retire ScriptValue if possible. IIUC, it currently holds a strong persistent into V8 which can easily cause leaks.

That said, I don't know whether it is possible to get around without it.

Comment 4 by peria@chromium.org, Feb 15 2018

Yuki suggested another great idea to make ScriptValue inherit from GCed<>, then we can depend on the infrastructure of ToV8().

Comment 5 by peria@chromium.org, Feb 15 2018

s/GCed<>/ScriptWrappable/

Comment 6 by npm@chromium.org, May 30 2018

Ping - peria@ any update on this bug?

Comment 7 by peria@chromium.org, May 30 2018

No updates.
I have no active working plan for this issue now.
Components: -Blink>DOM
peria@, any update on when you might get to this bug?
Jinho and I are now looking at an issue related to this.  peria@, feel free to assign this issue to me if you're no longer interested.  I'm also happy to help you design a new class to support "wrapper-tracing + world-safe" representation.
Owner: yukishiino@chromium.org
Thank you. I reassign this to yukishiino.
Project Member

Comment 13 by bugdroid1@chromium.org, Dec 13

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

commit 8d579fc15d93d5fd9677bbfda8c5144569d27240
Author: Yuki Shiino <yukishiino@chromium.org>
Date: Thu Dec 13 06:06:01 2018

v8binding: Unify ScriptValue::ToWorldSafeScriptValue to WorldSafeV8Reference

Remove ScriptValue::ToWorldSafeScriptValue and replace its usage
with WorldSafeV8Reference.

Bug: 501866, 755520, 803478
Change-Id: I75f38dd4d4dd8c3730bec1e9d002fadaa236395b
Reviewed-on: https://chromium-review.googlesource.com/c/1373894
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616228}
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/bindings/core/v8/script_value.cc
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/bindings/core/v8/script_value.h
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/bindings/core/v8/world_safe_v8_reference.h
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/modules/payments/payment_method_change_event.cc
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/modules/payments/payment_method_change_event.h
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/modules/payments/payment_response.cc
[modify] https://crrev.com/8d579fc15d93d5fd9677bbfda8c5144569d27240/third_party/blink/renderer/modules/payments/payment_response.h

Sign in to add a comment