Skip to content

Commit

Permalink
fixed issue Samsung#35
Browse files Browse the repository at this point in the history
  • Loading branch information
ksen007 committed Apr 23, 2015
1 parent 01e7dcc commit b22943e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
9 changes: 8 additions & 1 deletion src/js/frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
//]_]
</script>

<script type="text/javascript">
//[_[
(function() { return fileExpand("../../node_modules/codemirror/mode/javascript/javascript.js")})
//]_]
</script>

<body>
<a style="float:right;vertical-align: top;"
href = "javascript:void(0)"
Expand All @@ -54,7 +60,8 @@ <h4>Results</h4>
mode: 'javascript',
lineNumbers: true,
lineWrapping: true,
theme: "default"
theme: "default",
readOnly: true
});

parent.J$.Results.log = function(str) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/instrument/esnstrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ if (typeof J$ === 'undefined') {
function mergeBodies(node) {
printIidToLoc(node);
var ret = replaceInStatement(
"function n() { if (!" + logSampleFunName + "(" + RP + "1)){" + RP + "2} else {" + RP + "3}}",
"function n() { if (!" + logSampleFunName + "(" + RP + "1, arguments.callee)){" + RP + "2} else {" + RP + "3}}",
getIid(),
node.bodyOrig.body,
node.body.body
Expand Down
2 changes: 1 addition & 1 deletion src/js/mid.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/runtime/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,9 @@ if (typeof J$ === 'undefined') {
return (lastComputedValue = left);
}

function S(iid) {
function S(iid, f) {
if (sandbox.analysis && sandbox.analysis.runInstrumentedFunctionBody) {
return sandbox.analysis.runInstrumentedFunctionBody(iid);
return sandbox.analysis.runInstrumentedFunctionBody(iid, f, f[SPECIAL_PROP_IID]);
}
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/runtime/analysisCallbackTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
function MyAnalysis () {
this.invokeFunPre = function(iid, f, base, args, isConstructor, isMethod, internalIid){return {f:f,base:base,args:args,skip:false};};

this.invokeFun = function(iid, f, base, args, result, isConstructor, isMethod, internalIid){return {result:result};};
this.invokeFun = function(iid, f, base, args, result, isConstructor, isMethod, functionIid){return {result:result};};

this.literal = function(iid, val, hasGetterSetter) {return {result:val};};

Expand Down Expand Up @@ -91,7 +91,7 @@

this.endExecution = function() {};

this.runInstrumentedFunctionBody = function(iid) {return false;}; // callback called only when instrumented with Config.ENABLE_SAMPLING = true
this.runInstrumentedFunctionBody = function(iid, f, functionIid) {return false;}; // callback called only when instrumented with Config.ENABLE_SAMPLING = true
// if returns true, instrumented function body is executed, else uninstrumented function body is executed

/**
Expand Down

0 comments on commit b22943e

Please sign in to comment.