Skip to content

Commit 22df24b

Browse files
committed
fix missing cache issue
1 parent eb2fc34 commit 22df24b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/vs/workbench/services/views/browser/viewDescriptorService.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
107107
this.viewContainersRegistry = Registry.as<IViewContainersRegistry>(ViewExtensions.ViewContainersRegistry);
108108
this.viewsRegistry = Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry);
109109

110-
this.cachedViewInfo = this.getCachedViewPositions();
111110
this.cachedViewContainerInfo = this.getCachedViewContainerLocations();
111+
this.cachedViewInfo = this.getCachedViewPositions();
112112

113113
// Register all containers that were registered before this ctor
114114
this.viewContainers.forEach(viewContainer => this.onDidRegisterViewContainer(viewContainer));
@@ -407,6 +407,14 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
407407
for (const [viewId, containerInfo] of result.entries()) {
408408
if (!containerInfo) {
409409
result.delete(viewId);
410+
continue;
411+
}
412+
413+
// Verify a view that is in a generated has cached container info
414+
const generated = this.isGeneratedContainerId(containerInfo.containerId);
415+
const missingCacheData = this.cachedViewContainerInfo.get(containerInfo.containerId) === undefined;
416+
if (generated && missingCacheData) {
417+
result.delete(viewId);
410418
}
411419
}
412420

@@ -435,7 +443,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
435443
// Verify if we need to create the destination container
436444
if (!this.viewContainersRegistry.get(newViewContainerInfo.containerId)) {
437445
const location = this.cachedViewContainerInfo.get(newViewContainerInfo.containerId);
438-
if (location) {
446+
if (location !== undefined) {
439447
this.registerGeneratedViewContainer(location, newViewContainerInfo.containerId);
440448
}
441449
}

0 commit comments

Comments
 (0)