forcing a trampoline whenever IO to the browser occurs; otherwise the browser can become unresponsive when printing a tight loop.
This commit is contained in:
parent
d03f86477f
commit
b76644ee46
|
@ -20,6 +20,9 @@
|
||||||
MACHINE.params['currentDisplayer'](MACHINE, domNode);
|
MACHINE.params['currentDisplayer'](MACHINE, domNode);
|
||||||
$(domNode).trigger({type : 'afterAttach'});
|
$(domNode).trigger({type : 'afterAttach'});
|
||||||
$('*', domNode).trigger({type : 'afterAttach'});
|
$('*', domNode).trigger({type : 'afterAttach'});
|
||||||
|
// Force a trampoline to send control back to the browser
|
||||||
|
// for rendering.
|
||||||
|
MACHINE.cbt=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
var StandardErrorPort = function () {
|
var StandardErrorPort = function () {
|
||||||
|
@ -30,6 +33,9 @@
|
||||||
MACHINE.params['currentErrorDisplayer'](MACHINE, domNode);
|
MACHINE.params['currentErrorDisplayer'](MACHINE, domNode);
|
||||||
$(domNode).trigger({type : 'afterAttach'});
|
$(domNode).trigger({type : 'afterAttach'});
|
||||||
$('*', domNode).trigger({type : 'afterAttach'});
|
$('*', domNode).trigger({type : 'afterAttach'});
|
||||||
|
// Force a trampoline to send control back to the browser
|
||||||
|
// for rendering.
|
||||||
|
MACHINE.cbt=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -774,9 +774,6 @@
|
||||||
// Executes all programs that have been labeled as a main module
|
// Executes all programs that have been labeled as a main module
|
||||||
var invokeMains = function(machine, succ, fail) {
|
var invokeMains = function(machine, succ, fail) {
|
||||||
runtime.ready(function () {
|
runtime.ready(function () {
|
||||||
if (window.console && window.console.log) {
|
|
||||||
window.console.log("invoking main modules");
|
|
||||||
}
|
|
||||||
setReadyFalse();
|
setReadyFalse();
|
||||||
machine = machine || runtime.currentMachine;
|
machine = machine || runtime.currentMachine;
|
||||||
succ = succ || function() {};
|
succ = succ || function() {};
|
||||||
|
@ -1174,7 +1171,6 @@
|
||||||
var makeLocalFileModuleLoader = function(moduleManifest) {
|
var makeLocalFileModuleLoader = function(moduleManifest) {
|
||||||
var loadScript = baselib.loadscript.loadScript;
|
var loadScript = baselib.loadscript.loadScript;
|
||||||
return function(M, moduleName, success, fail) {
|
return function(M, moduleName, success, fail) {
|
||||||
console.log("request to load", moduleName);
|
|
||||||
|
|
||||||
if (M.modules[moduleName] instanceof ModuleRecord) {
|
if (M.modules[moduleName] instanceof ModuleRecord) {
|
||||||
return success();
|
return success();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user