From 514ebf402acf7cffa542ffd59adc9873f6e9262f Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Tue, 21 May 2019 11:28:36 +0200 Subject: [PATCH] refactor(ivy): avoid calling other instructions from the loadViewQuery instruction (#30587) PR Close #30587 --- packages/core/src/render3/query.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/render3/query.ts b/packages/core/src/render3/query.ts index d8e07dab95..a3f2a3550e 100644 --- a/packages/core/src/render3/query.ts +++ b/packages/core/src/render3/query.ts @@ -18,7 +18,7 @@ import {assertDataInRange, assertDefined, assertEqual} from '../util/assert'; import {assertPreviousIsParent} from './assert'; import {getNodeInjectable, locateDirectiveOrProvider} from './di'; import {NG_ELEMENT_ID} from './fields'; -import {store, ɵɵload} from './instructions/all'; +import {store} from './instructions/all'; import {storeCleanupWithContext} from './instructions/shared'; import {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition'; import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector'; @@ -26,6 +26,7 @@ import {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, u import {LQueries, unusedValueExportToPlacateAjd as unused4} from './interfaces/query'; import {CONTENT_QUERIES, HEADER_OFFSET, LView, QUERIES, TVIEW} from './interfaces/view'; import {getCurrentQueryIndex, getIsParent, getLView, isCreationMode, setCurrentQueryIndex} from './state'; +import {loadInternal} from './util/view_utils'; import {createElementRef, createTemplateRef} from './view_engine_compatibility'; const unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4; @@ -456,7 +457,7 @@ export function ɵɵviewQuery( export function ɵɵloadViewQuery(): T { const index = getCurrentQueryIndex(); setCurrentQueryIndex(index + 1); - return ɵɵload(index - HEADER_OFFSET); + return loadInternal(getLView(), index - HEADER_OFFSET); } /**