Skip to content

Instantly share code, notes, and snippets.

@develar
Created October 15, 2013 18:25
Show Gist options
  • Save develar/6996252 to your computer and use it in GitHub Desktop.
Save develar/6996252 to your computer and use it in GitHub Desktop.
function printCallSite(callSite) {
var out = '"' + callSite.getFileName() + '"';
if (callSite.isEval()) {
out += " eval";
}
if (callSite.isNative()) {
out += " native";
}
if (callSite.isToplevel()) {
out += " topLevel";
}
var origin = callSite.getEvalOrigin();
if (origin) {
out += " evalOrigin: " + JSON.stringify(origin);
}
return out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment