From: Evan You Date: Tue, 27 Jul 2021 21:14:19 +0000 (-0400) Subject: chore: rename method to make it more explicit it is dev only X-Git-Tag: v3.2.0-beta.6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8681c12c0c49c4cb66b7a877756a16d1f3a7e69c;p=thirdparty%2Fvuejs%2Fcore.git chore: rename method to make it more explicit it is dev only --- diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index a660d849a9..ea682c1f34 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -12,7 +12,7 @@ import { import { ComponentPublicInstance, PublicInstanceProxyHandlers, - createRenderContext, + createDevRenderContext, exposePropsOnRenderContext, exposeSetupStateOnRenderContext, ComponentPublicInstanceConstructor, @@ -521,7 +521,7 @@ export function createComponentInstance( sp: null } if (__DEV__) { - instance.ctx = createRenderContext(instance) + instance.ctx = createDevRenderContext(instance) } else { instance.ctx = { _: instance } } diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index 9c0eec1491..9b67c9132c 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -484,10 +484,11 @@ export const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend( } ) +// dev only // In dev mode, the proxy target exposes the same properties as seen on `this` // for easier console inspection. In prod mode it will be an empty object so // these properties definitions can be skipped. -export function createRenderContext(instance: ComponentInternalInstance) { +export function createDevRenderContext(instance: ComponentInternalInstance) { const target: Record = {} // expose internal instance for proxy handlers