[REF] component: move render props and promise to fiber

part of #293
This commit is contained in:
Géry Debongnie
2019-09-19 15:14:04 +02:00
parent 01eb338e69
commit 7a49b9d94e
6 changed files with 153 additions and 148 deletions
+37 -34
View File
@@ -33,17 +33,24 @@ export interface Env {
[key: string]: any; [key: string]: any;
} }
export interface Fiber { /**
* Fibers are small abstractions designed to contain all the internal state
* associated to a "rendering work unit", relative to a specific component.
*
* A rendering will cause the creation of a fiber for each impacted components.
*/
export interface Fiber<Props> {
force: boolean; force: boolean;
rootFiber: Fiber | null; rootFiber: Fiber<any> | null;
isCancelled: boolean; isCancelled: boolean;
scope: any; scope: any;
vars: any; vars: any;
patchQueue: Fiber[]; patchQueue: Fiber<any>[];
component: Component<any, any, any>; component: Component<any, any, any>;
// promises: any[];
vnode: VNode | null; vnode: VNode | null;
willPatchResult: any; willPatchResult: any;
props: Props;
promise: Promise<VNode> | null;
// handlers?: any; // handlers?: any;
// mountedHandlers?: any; // mountedHandlers?: any;
} }
@@ -70,13 +77,7 @@ interface Internal<T extends Env, Props> {
// the component instance back whenever the template is rerendered. // the component instance back whenever the template is rerendered.
cmap: { [key: number]: number }; cmap: { [key: number]: number };
renderId: number; currentFiber: Fiber<Props> | null;
// the renderProps and renderPromise keys are only useful for the "prepare"
// step of the lifecycle of a component. Once a component has been rendered
// and patched, it is no longer useful.
renderProps: Props | null;
renderPromise: Promise<VNode> | null;
boundHandlers: { [key: number]: any }; boundHandlers: { [key: number]: any };
observer: Observer | null; observer: Observer | null;
@@ -184,9 +185,7 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
parent: p, parent: p,
children: {}, children: {},
cmap: {}, cmap: {},
renderId: 1, currentFiber: null,
renderPromise: null,
renderProps: props || null,
boundHandlers: {}, boundHandlers: {},
mountedHandlers: {}, mountedHandlers: {},
observer: null, observer: null,
@@ -296,7 +295,8 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
} }
const fiber = this.__createRootFiber(false); const fiber = this.__createRootFiber(false);
if (!__owl__.vnode) { if (!__owl__.vnode) {
const vnode = await this.__prepareAndRender(fiber); fiber.promise = this.__prepareAndRender(fiber);
const vnode = await fiber.promise;
if (__owl__.isDestroyed) { if (__owl__.isDestroyed) {
// component was destroyed before we get here... // component was destroyed before we get here...
return; return;
@@ -304,7 +304,8 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
this.__patch(vnode); this.__patch(vnode);
} else if (renderBeforeRemount) { } else if (renderBeforeRemount) {
fiber.patchQueue.push(fiber); fiber.patchQueue.push(fiber);
await this.__render(fiber); fiber.promise = this.__render(fiber);
await fiber.promise;
this.__applyPatchQueue(fiber); this.__applyPatchQueue(fiber);
} }
target.appendChild(this.el!); target.appendChild(this.el!);
@@ -341,19 +342,18 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
} }
const fiber = this.__createRootFiber(force); const fiber = this.__createRootFiber(force);
fiber.patchQueue.push(fiber); fiber.patchQueue.push(fiber);
fiber.promise = this.__render(fiber);
await fiber.promise;
const renderId = ++__owl__.renderId; if (__owl__.isMounted && fiber === __owl__.currentFiber) {
await this.__render(fiber);
if (__owl__.isMounted && renderId === __owl__.renderId) {
// we only update the vnode and the actual DOM if no other rendering // we only update the vnode and the actual DOM if no other rendering
// occurred between now and when the render method was initially called. // occurred between now and when the render method was initially called.
this.__applyPatchQueue(fiber); this.__applyPatchQueue(fiber);
} }
} }
__createRootFiber(force): Fiber { __createRootFiber(force): Fiber<Props> {
const fiber: Fiber = { const fiber: Fiber<Props> = {
force, force,
scope: undefined, scope: undefined,
vars: undefined, vars: undefined,
@@ -362,19 +362,25 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
component: this, component: this,
vnode: null, vnode: null,
patchQueue: [], patchQueue: [],
willPatchResult: null willPatchResult: null,
props: this.props,
promise: null
}; };
fiber.rootFiber = fiber; fiber.rootFiber = fiber;
this.__owl__.currentFiber = fiber;
return fiber; return fiber;
} }
__createSubFiber(parent: Fiber, scope, vars): Fiber { __createSubFiber(parent: Fiber<Props>, scope, vars): Fiber<Props> {
const fiber = Object.create(parent); const fiber = Object.create(parent);
fiber.scope = scope; fiber.scope = scope;
fiber.vars = vars; fiber.vars = vars;
fiber.component = this; fiber.component = this;
fiber.vnode = null; fiber.vnode = null;
fiber.willPatchResult = null; fiber.willPatchResult = null;
this.__owl__.currentFiber = fiber;
fiber.props = this.props;
fiber.promise = null;
return fiber; return fiber;
} }
@@ -519,7 +525,7 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
*/ */
async __updateProps( async __updateProps(
nextProps: Props, nextProps: Props,
parentFiber: Fiber, parentFiber: Fiber<any>,
scope?: any, scope?: any,
vars?: any vars?: any
): Promise<void> { ): Promise<void> {
@@ -553,16 +559,13 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
* subcomponent is created. It gets its scope and vars, if any, from the * subcomponent is created. It gets its scope and vars, if any, from the
* parent template. * parent template.
*/ */
__prepare(parentFiber: Fiber, scope: any, vars: any): Promise<VNode> { __prepare(parentFiber: Fiber<any>, scope: any, vars: any): Promise<VNode> {
const __owl__ = this.__owl__;
const fiber = this.__createSubFiber(parentFiber, scope, vars); const fiber = this.__createSubFiber(parentFiber, scope, vars);
fiber.promise = this.__prepareAndRender(fiber);
__owl__.renderProps = this.props; return fiber.promise;
__owl__.renderPromise = this.__prepareAndRender(fiber);
return __owl__.renderPromise;
} }
async __prepareAndRender(fiber: Fiber): Promise<VNode> { async __prepareAndRender(fiber: Fiber<Props>): Promise<VNode> {
try { try {
await this.willStart(); await this.willStart();
} catch (e) { } catch (e) {
@@ -600,7 +603,7 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
return this.__render(fiber); return this.__render(fiber);
} }
__render(fiber: Fiber): Promise<VNode> { __render(fiber: Fiber<Props>): Promise<VNode> {
const __owl__ = this.__owl__; const __owl__ = this.__owl__;
const promises: Promise<void>[] = []; const promises: Promise<void>[] = [];
if (__owl__.observer) { if (__owl__.observer) {
@@ -701,7 +704,7 @@ export class Component<T extends Env, Props extends {}, State extends {}> {
* 2) Call '__patch' on the component of each patch * 2) Call '__patch' on the component of each patch
* 3) Call 'patched' on the component of each patch, in reverse order * 3) Call 'patched' on the component of each patch, in reverse order
*/ */
__applyPatchQueue(fiber: Fiber) { __applyPatchQueue(fiber: Fiber<Props>) {
const patchQueue = fiber.patchQueue; const patchQueue = fiber.patchQueue;
let component: Component<any, any, any> = this; let component: Component<any, any, any> = this;
try { try {
+5 -3
View File
@@ -384,10 +384,12 @@ QWeb.addDirective({
ctx.addLine(`let props${componentID} = {${propStr}};`); ctx.addLine(`let props${componentID} = {${propStr}};`);
} }
ctx.addIf( ctx.addIf(
`w${componentID} && w${componentID}.__owl__.renderPromise && !w${componentID}.__owl__.vnode` `w${componentID} && w${componentID}.__owl__.currentFiber && !w${componentID}.__owl__.vnode`
); );
ctx.addIf(`utils.shallowEqual(props${componentID}, w${componentID}.__owl__.renderProps)`); ctx.addIf(
ctx.addLine(`def${defID} = w${componentID}.__owl__.renderPromise;`); `utils.shallowEqual(props${componentID}, w${componentID}.__owl__.currentFiber.props)`
);
ctx.addLine(`def${defID} = w${componentID}.__owl__.currentFiber.promise;`);
ctx.addElse(); ctx.addElse();
ctx.addLine(`w${componentID}.destroy();`); ctx.addLine(`w${componentID}.destroy();`);
ctx.addLine(`w${componentID} = false;`); ctx.addLine(`w${componentID} = false;`);
+6 -6
View File
@@ -17,9 +17,9 @@ exports[`animations t-transition combined with component 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -63,9 +63,9 @@ exports[`animations t-transition combined with t-component and t-if 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -30,9 +30,9 @@ exports[`async rendering delayed component with t-asyncroot directive 1`] = `
let _6_index = c5.length; let _6_index = c5.length;
c5.push(null); c5.push(null);
let props8 = {val:context['state'].val}; let props8 = {val:context['state'].val};
if (w8 && w8.__owl__.renderPromise && !w8.__owl__.vnode) { if (w8 && w8.__owl__.currentFiber && !w8.__owl__.vnode) {
if (utils.shallowEqual(props8, w8.__owl__.renderProps)) { if (utils.shallowEqual(props8, w8.__owl__.currentFiber.props)) {
def7 = w8.__owl__.renderPromise; def7 = w8.__owl__.currentFiber.promise;
} else { } else {
w8.destroy(); w8.destroy();
w8 = false; w8 = false;
@@ -58,9 +58,9 @@ exports[`async rendering delayed component with t-asyncroot directive 1`] = `
const fiber11 = Object.assign(Object.create(extra.fiber), {patchQueue: []}); const fiber11 = Object.assign(Object.create(extra.fiber), {patchQueue: []});
c5.push(w11 && w11.__owl__.pvnode || null); c5.push(w11 && w11.__owl__.pvnode || null);
let props11 = {val:context['state'].val}; let props11 = {val:context['state'].val};
if (w11 && w11.__owl__.renderPromise && !w11.__owl__.vnode) { if (w11 && w11.__owl__.currentFiber && !w11.__owl__.vnode) {
if (utils.shallowEqual(props11, w11.__owl__.renderProps)) { if (utils.shallowEqual(props11, w11.__owl__.currentFiber.props)) {
def10 = w11.__owl__.renderPromise; def10 = w11.__owl__.currentFiber.promise;
} else { } else {
w11.destroy(); w11.destroy();
w11 = false; w11 = false;
@@ -114,9 +114,9 @@ exports[`async rendering fast component with t-asyncroot directive 1`] = `
const fiber8 = Object.assign(Object.create(extra.fiber), {patchQueue: []}); const fiber8 = Object.assign(Object.create(extra.fiber), {patchQueue: []});
c5.push(w8 && w8.__owl__.pvnode || null); c5.push(w8 && w8.__owl__.pvnode || null);
let props8 = {val:context['state'].val}; let props8 = {val:context['state'].val};
if (w8 && w8.__owl__.renderPromise && !w8.__owl__.vnode) { if (w8 && w8.__owl__.currentFiber && !w8.__owl__.vnode) {
if (utils.shallowEqual(props8, w8.__owl__.renderProps)) { if (utils.shallowEqual(props8, w8.__owl__.currentFiber.props)) {
def7 = w8.__owl__.renderPromise; def7 = w8.__owl__.currentFiber.promise;
} else { } else {
w8.destroy(); w8.destroy();
w8 = false; w8 = false;
@@ -141,9 +141,9 @@ exports[`async rendering fast component with t-asyncroot directive 1`] = `
let _9_index = c5.length; let _9_index = c5.length;
c5.push(null); c5.push(null);
let props11 = {val:context['state'].val}; let props11 = {val:context['state'].val};
if (w11 && w11.__owl__.renderPromise && !w11.__owl__.vnode) { if (w11 && w11.__owl__.currentFiber && !w11.__owl__.vnode) {
if (utils.shallowEqual(props11, w11.__owl__.renderProps)) { if (utils.shallowEqual(props11, w11.__owl__.currentFiber.props)) {
def10 = w11.__owl__.renderPromise; def10 = w11.__owl__.currentFiber.promise;
} else { } else {
w11.destroy(); w11.destroy();
w11 = false; w11 = false;
@@ -196,9 +196,9 @@ exports[`async rendering t-component with t-asyncroot directive: mixed re-render
let _6_index = c5.length; let _6_index = c5.length;
c5.push(null); c5.push(null);
let props8 = {val:context['state'].val}; let props8 = {val:context['state'].val};
if (w8 && w8.__owl__.renderPromise && !w8.__owl__.vnode) { if (w8 && w8.__owl__.currentFiber && !w8.__owl__.vnode) {
if (utils.shallowEqual(props8, w8.__owl__.renderProps)) { if (utils.shallowEqual(props8, w8.__owl__.currentFiber.props)) {
def7 = w8.__owl__.renderPromise; def7 = w8.__owl__.currentFiber.promise;
} else { } else {
w8.destroy(); w8.destroy();
w8 = false; w8 = false;
@@ -224,9 +224,9 @@ exports[`async rendering t-component with t-asyncroot directive: mixed re-render
const fiber11 = Object.assign(Object.create(extra.fiber), {patchQueue: []}); const fiber11 = Object.assign(Object.create(extra.fiber), {patchQueue: []});
c5.push(w11 && w11.__owl__.pvnode || null); c5.push(w11 && w11.__owl__.pvnode || null);
let props11 = {val:context['state'].val}; let props11 = {val:context['state'].val};
if (w11 && w11.__owl__.renderPromise && !w11.__owl__.vnode) { if (w11 && w11.__owl__.currentFiber && !w11.__owl__.vnode) {
if (utils.shallowEqual(props11, w11.__owl__.renderProps)) { if (utils.shallowEqual(props11, w11.__owl__.currentFiber.props)) {
def10 = w11.__owl__.renderPromise; def10 = w11.__owl__.currentFiber.promise;
} else { } else {
w11.destroy(); w11.destroy();
w11 = false; w11 = false;
@@ -267,9 +267,9 @@ exports[`class and style attributes with t-component dynamic t-att-style is prop
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -312,9 +312,9 @@ exports[`class and style attributes with t-component t-att-class is properly add
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -372,9 +372,9 @@ exports[`class and style attributes with t-component t-att-class is properly add
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -430,9 +430,9 @@ exports[`class and style attributes with t-component t-att-class is properly add
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -475,9 +475,9 @@ exports[`composition sub components dom state with t-keepalive is preserved 1`]
const fiber4 = Object.assign(Object.create(extra.fiber), {patchQueue: []}); const fiber4 = Object.assign(Object.create(extra.fiber), {patchQueue: []});
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -535,9 +535,9 @@ exports[`composition sub components with some state rendered in a loop 1`] = `
let _5_index = c1.length; let _5_index = c1.length;
c1.push(null); c1.push(null);
let props7 = {}; let props7 = {};
if (w7 && w7.__owl__.renderPromise && !w7.__owl__.vnode) { if (w7 && w7.__owl__.currentFiber && !w7.__owl__.vnode) {
if (utils.shallowEqual(props7, w7.__owl__.renderProps)) { if (utils.shallowEqual(props7, w7.__owl__.currentFiber.props)) {
def6 = w7.__owl__.renderPromise; def6 = w7.__owl__.currentFiber.promise;
} else { } else {
w7.destroy(); w7.destroy();
w7 = false; w7 = false;
@@ -578,9 +578,9 @@ exports[`composition t-component with dynamic value 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -620,9 +620,9 @@ exports[`composition t-component with dynamic value 2 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -662,9 +662,9 @@ exports[`dynamic t-props basic use 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = Object.assign({}, context['some'].obj); let props4 = Object.assign({}, context['some'].obj);
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -706,9 +706,9 @@ exports[`lifecycle hooks willPatch/patched hook with t-keepalive 1`] = `
const fiber4 = Object.assign(Object.create(extra.fiber), {patchQueue: []}); const fiber4 = Object.assign(Object.create(extra.fiber), {patchQueue: []});
c1.push(null); c1.push(null);
let props4 = {v:context['state'].n}; let props4 = {v:context['state'].n};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -749,9 +749,9 @@ exports[`other directives with t-component t-on with handler bound to argument 1
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -791,9 +791,9 @@ exports[`other directives with t-component t-on with handler bound to empty obje
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -833,9 +833,9 @@ exports[`other directives with t-component t-on with handler bound to empty obje
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -875,9 +875,9 @@ exports[`other directives with t-component t-on with handler bound to object 1`]
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -917,9 +917,9 @@ exports[`other directives with t-component t-on with prevent and self modifiers
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -959,9 +959,9 @@ exports[`other directives with t-component t-on with self and prevent modifiers
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -1001,9 +1001,9 @@ exports[`other directives with t-component t-on with self modifier 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -1043,9 +1043,9 @@ exports[`other directives with t-component t-on with stop and/or prevent modifie
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -1087,9 +1087,9 @@ exports[`random stuff/miscellaneous snapshotting compiled code 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {flag:context['state'].flag}; let props4 = {flag:context['state'].flag};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -1147,9 +1147,9 @@ exports[`random stuff/miscellaneous t-on with handler bound to dynamic argument
let _5_index = c1.length; let _5_index = c1.length;
c1.push(null); c1.push(null);
let props7 = {}; let props7 = {};
if (w7 && w7.__owl__.renderPromise && !w7.__owl__.vnode) { if (w7 && w7.__owl__.currentFiber && !w7.__owl__.vnode) {
if (utils.shallowEqual(props7, w7.__owl__.renderProps)) { if (utils.shallowEqual(props7, w7.__owl__.currentFiber.props)) {
def6 = w7.__owl__.renderPromise; def6 = w7.__owl__.currentFiber.promise;
} else { } else {
w7.destroy(); w7.destroy();
w7 = false; w7 = false;
@@ -1371,9 +1371,9 @@ exports[`t-slot directive can define and call slots 1`] = `
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {}; let props4 = {};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -1613,9 +1613,9 @@ exports[`t-slot directive slots are rendered with proper context, part 2 2`] = `
let _7_index = c6.length; let _7_index = c6.length;
c6.push(null); c6.push(null);
let props9 = {to:'/user/'+context['user'].id}; let props9 = {to:'/user/'+context['user'].id};
if (w9 && w9.__owl__.renderPromise && !w9.__owl__.vnode) { if (w9 && w9.__owl__.currentFiber && !w9.__owl__.vnode) {
if (utils.shallowEqual(props9, w9.__owl__.renderProps)) { if (utils.shallowEqual(props9, w9.__owl__.currentFiber.props)) {
def8 = w9.__owl__.renderPromise; def8 = w9.__owl__.currentFiber.promise;
} else { } else {
w9.destroy(); w9.destroy();
w9 = false; w9 = false;
@@ -1718,9 +1718,9 @@ exports[`t-slot directive slots are rendered with proper context, part 3 2`] = `
let _8_index = c6.length; let _8_index = c6.length;
c6.push(null); c6.push(null);
let props10 = {to:'/user/'+context['user'].id}; let props10 = {to:'/user/'+context['user'].id};
if (w10 && w10.__owl__.renderPromise && !w10.__owl__.vnode) { if (w10 && w10.__owl__.currentFiber && !w10.__owl__.vnode) {
if (utils.shallowEqual(props10, w10.__owl__.renderProps)) { if (utils.shallowEqual(props10, w10.__owl__.currentFiber.props)) {
def9 = w10.__owl__.renderPromise; def9 = w10.__owl__.currentFiber.promise;
} else { } else {
w10.destroy(); w10.destroy();
w10 = false; w10 = false;
@@ -1776,9 +1776,9 @@ exports[`t-slot directive slots are rendered with proper context, part 4 1`] = `
let _3_index = c1.length; let _3_index = c1.length;
c1.push(null); c1.push(null);
let props5 = {to:'/user/'+context['state'].user.id}; let props5 = {to:'/user/'+context['state'].user.id};
if (w5 && w5.__owl__.renderPromise && !w5.__owl__.vnode) { if (w5 && w5.__owl__.currentFiber && !w5.__owl__.vnode) {
if (utils.shallowEqual(props5, w5.__owl__.renderProps)) { if (utils.shallowEqual(props5, w5.__owl__.currentFiber.props)) {
def4 = w5.__owl__.renderPromise; def4 = w5.__owl__.currentFiber.promise;
} else { } else {
w5.destroy(); w5.destroy();
w5 = false; w5 = false;
@@ -1830,9 +1830,9 @@ exports[`top level sub widgets basic use 1`] = `
let vn4 = {}; let vn4 = {};
result = vn4; result = vn4;
let props3 = {p:1}; let props3 = {p:1};
if (w3 && w3.__owl__.renderPromise && !w3.__owl__.vnode) { if (w3 && w3.__owl__.currentFiber && !w3.__owl__.vnode) {
if (utils.shallowEqual(props3, w3.__owl__.renderProps)) { if (utils.shallowEqual(props3, w3.__owl__.currentFiber.props)) {
def2 = w3.__owl__.renderPromise; def2 = w3.__owl__.currentFiber.promise;
} else { } else {
w3.destroy(); w3.destroy();
w3 = false; w3 = false;
@@ -1871,9 +1871,9 @@ exports[`top level sub widgets can select a sub widget 1`] = `
let vn4 = {}; let vn4 = {};
result = vn4; result = vn4;
let props3 = {}; let props3 = {};
if (w3 && w3.__owl__.renderPromise && !w3.__owl__.vnode) { if (w3 && w3.__owl__.currentFiber && !w3.__owl__.vnode) {
if (utils.shallowEqual(props3, w3.__owl__.renderProps)) { if (utils.shallowEqual(props3, w3.__owl__.currentFiber.props)) {
def2 = w3.__owl__.renderPromise; def2 = w3.__owl__.currentFiber.promise;
} else { } else {
w3.destroy(); w3.destroy();
w3 = false; w3 = false;
@@ -1900,9 +1900,9 @@ exports[`top level sub widgets can select a sub widget 1`] = `
let vn8 = {}; let vn8 = {};
result = vn8; result = vn8;
let props7 = {}; let props7 = {};
if (w7 && w7.__owl__.renderPromise && !w7.__owl__.vnode) { if (w7 && w7.__owl__.currentFiber && !w7.__owl__.vnode) {
if (utils.shallowEqual(props7, w7.__owl__.renderProps)) { if (utils.shallowEqual(props7, w7.__owl__.currentFiber.props)) {
def6 = w7.__owl__.renderPromise; def6 = w7.__owl__.currentFiber.promise;
} else { } else {
w7.destroy(); w7.destroy();
w7 = false; w7 = false;
@@ -21,9 +21,9 @@ exports[`props validation props are validated in dev mode (code snapshot) 1`] =
let _2_index = c1.length; let _2_index = c1.length;
c1.push(null); c1.push(null);
let props4 = {message:1}; let props4 = {message:1};
if (w4 && w4.__owl__.renderPromise && !w4.__owl__.vnode) { if (w4 && w4.__owl__.currentFiber && !w4.__owl__.vnode) {
if (utils.shallowEqual(props4, w4.__owl__.renderProps)) { if (utils.shallowEqual(props4, w4.__owl__.currentFiber.props)) {
def3 = w4.__owl__.renderPromise; def3 = w4.__owl__.currentFiber.promise;
} else { } else {
w4.destroy(); w4.destroy();
w4 = false; w4 = false;
@@ -32,9 +32,9 @@ exports[`RouteComponent can render simple cases 1`] = `
let vn8 = {}; let vn8 = {};
result = vn8; result = vn8;
let props6 = Object.assign({}, context['env'].router.currentParams); let props6 = Object.assign({}, context['env'].router.currentParams);
if (w6 && w6.__owl__.renderPromise && !w6.__owl__.vnode) { if (w6 && w6.__owl__.currentFiber && !w6.__owl__.vnode) {
if (utils.shallowEqual(props6, w6.__owl__.renderProps)) { if (utils.shallowEqual(props6, w6.__owl__.currentFiber.props)) {
def5 = w6.__owl__.renderPromise; def5 = w6.__owl__.currentFiber.promise;
} else { } else {
w6.destroy(); w6.destroy();
w6 = false; w6 = false;