]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor: move development-only measurement and warning context handling back to...
authordaiwei <daiwei521@126.com>
Mon, 1 Dec 2025 14:15:48 +0000 (22:15 +0800)
committerdaiwei <daiwei521@126.com>
Mon, 1 Dec 2025 14:15:48 +0000 (22:15 +0800)
packages/runtime-vapor/src/component.ts

index e79683ba738cf5e62b842c18326571402fdd8180..bc72fcf7cde217c9b486c32b1b40eeaf46badbe1 100644 (file)
@@ -332,6 +332,11 @@ export function createComponent(
     setupComponent(instance, component)
   }
 
+  if (__DEV__) {
+    popWarningContext()
+    endMeasure(instance, 'init')
+  }
+
   // restore currentSlotConsumer to previous value after setupFn is called
   setCurrentSlotConsumer(prevSlotConsumer)
   onScopeDispose(() => unmountComponent(instance), true)
@@ -431,11 +436,6 @@ export function setupComponent(
 
   setActiveSub(prevSub)
   setCurrentInstance(...prevInstance)
-
-  if (__DEV__) {
-    popWarningContext()
-    endMeasure(instance, 'init')
-  }
 }
 
 export let isApplyingFallthroughProps = false