This commit is contained in:
Danny Yoo 2013-04-17 17:58:41 -06:00
parent ffc469de40
commit c6b89c6a2e

View File

@ -3145,7 +3145,9 @@
}); });
// The default prompt handler for a given prompt tag will assume
// it's consuming a zero-argument thunk, and will call it in a
// context where that prompt has been reestablished.
var makeDefaultPromptHandler = function(promptTag) { var makeDefaultPromptHandler = function(promptTag) {
return makeClosure( return makeClosure(
"default-prompt-handler", "default-prompt-handler",
@ -3161,6 +3163,7 @@
[]); []);
}; };
// The default abort prompt handler consumes a thunk and applies // The default abort prompt handler consumes a thunk and applies
// it, in a context where a new prompt has been initialized. // it, in a context where a new prompt has been initialized.
var defaultPromptHandler = var defaultPromptHandler =
@ -3221,7 +3224,11 @@
handler = checkProcedure(M, 'call-with-continuation-prompt', 2); handler = checkProcedure(M, 'call-with-continuation-prompt', 2);
} }
} else { } else {
handler = makeDefaultPromptHandler(promptTag); if (promptTag === DEFAULT_CONTINUATION_PROMPT_TAG) {
handler = defaultPromptHandler;
} else {
handler = makeDefaultPromptHandler(promptTag);
}
} }
M.p = proc; M.p = proc;