mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 16:57:00 +08:00
Fix a race in the wasmDWARFDebugging experiment
A race can occur when enabling the wasmDWARFDebuggin experiment. DebuggerModel instances created before that happens are not associated with a plugin manager. We thus need to catch that particular case when new scripts arrive for an existing DebuggerModel after the experiment is enabled. Change-Id: Iad1fa36c8e8f1a76fae86b1928acd4b38242f009 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2132239 Reviewed-by: Eric Leese <leese@chromium.org> Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
This commit is contained in:
committed by
Commit Bot
parent
4d123409dc
commit
c980dbf22c
@@ -661,7 +661,8 @@ export class DebuggerModel extends SDKModel {
|
||||
this.dispatchEventToListeners(Events.ParsedScriptSource, script);
|
||||
|
||||
const pluginManager = Bindings.debuggerWorkspaceBinding.getLanguagePluginManager(this);
|
||||
if (!Root.Runtime.experiments.isEnabled('wasmDWARFDebugging') || !pluginManager.hasPluginForScript(script)) {
|
||||
if (!Root.Runtime.experiments.isEnabled('wasmDWARFDebugging') || !pluginManager ||
|
||||
!pluginManager.hasPluginForScript(script)) {
|
||||
const sourceMapId = DebuggerModel._sourceMapId(script.executionContextId, script.sourceURL, script.sourceMapURL);
|
||||
if (sourceMapId && !hasSyntaxError) {
|
||||
// Consecutive script evaluations in the same execution context with the same sourceURL
|
||||
|
||||
Reference in New Issue
Block a user