[inspector] Do not resurrect Script objects.
Previously, the inspector would resurrect `v8::internal::Script` objects when the weak callback is invoked, in order to access their fields and read out the source (either a String in case of JavaScript or the module bytes in case of WebAssembly). With https://crrev.com/c/3494242 we no longer need to access the `v8::internal::Script` now, and so we can stop relying on the `WeakCallbackType::kFinalizer` logic. Bug: chromium:1295659 Fixed: chromium:1302195 Doc: https://bit.ly/v8-inspector-script-caching Change-Id: I6a444bfcdf6cd23b30043f7386d6c18b7afec659 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497324 Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#79366}
This commit is contained in:
parent
7f5c3f7b81
commit
05dfa28993
@ -326,11 +326,11 @@ class ActualScript : public V8DebuggerScript {
|
||||
[](const v8::WeakCallbackInfo<ActualScript>& data) {
|
||||
data.GetParameter()->WeakCallback();
|
||||
},
|
||||
v8::WeakCallbackType::kFinalizer);
|
||||
v8::WeakCallbackType::kParameter);
|
||||
}
|
||||
|
||||
void WeakCallback() {
|
||||
m_script.ClearWeak();
|
||||
m_script.Reset();
|
||||
m_agent->ScriptCollected(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user