mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-08-16 18:10:33 +03:00
Show callstack in browser upon REPL crashes
Summary: Fixing some incompatibility between heapGraph and `__optimize()`. Essence of the issue was an implicit assumption that only one visitor would visit certain entries. Original Issue: https://github.com/facebook/prepack/issues/1732 Closes https://github.com/facebook/prepack/pull/2021 Reviewed By: trueadm Differential Revision: D8248761 Pulled By: caiismyname fbshipit-source-id: dd27487b490e3924fdc0fe6aaca7f1c103e137cb
This commit is contained in:
parent
8bf0e78a58
commit
d96eaf45c4
@ -260,9 +260,15 @@ class ModifiedBindingEntry extends GeneratorEntry {
|
||||
containingGenerator === this.containingGenerator,
|
||||
"This entry requires effects to be applied and may not be moved"
|
||||
);
|
||||
invariant(this.modifiedBinding.value === this.newValue);
|
||||
invariant(
|
||||
this.modifiedBinding.value === this.newValue,
|
||||
"ModifiedBinding's value has been changed since last visit."
|
||||
);
|
||||
let [residualBinding, newValue] = context.visitModifiedBinding(this.modifiedBinding);
|
||||
invariant(this.residualFunctionBinding === undefined || this.residualFunctionBinding === residualBinding);
|
||||
invariant(
|
||||
this.residualFunctionBinding === undefined || this.residualFunctionBinding === residualBinding,
|
||||
"ResidualFunctionBinding has been changed since last visit."
|
||||
);
|
||||
this.residualFunctionBinding = residualBinding;
|
||||
this.newValue = newValue;
|
||||
return true;
|
||||
|
@ -42,7 +42,7 @@ onmessage = function(e) {
|
||||
}
|
||||
} catch (err) {
|
||||
buffer.push({
|
||||
message: err.message || 'An unknown error occurred'
|
||||
message: err.stack || 'An unknown error occurred'
|
||||
});
|
||||
postMessage({ type: 'error', data: buffer });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user