|
@@ -19,7 +19,7 @@ exports.module = function(phantomas) {
|
|
|
});
|
|
|
|
|
|
phantomas.on('init', function() {
|
|
|
- phantomas.evaluate(function(responseEndTime, deepAnalysis) {
|
|
|
+ phantomas.evaluate(function(responseEndTime) {
|
|
|
(function(phantomas) {
|
|
|
|
|
|
// Overwritting phantomas spy function
|
|
@@ -106,9 +106,6 @@ exports.module = function(phantomas) {
|
|
|
var currentContext = root;
|
|
|
var depth = 0;
|
|
|
|
|
|
- if (deepAnalysis) {
|
|
|
- phantomas.log('Entering deep Javascript analysis mode');
|
|
|
- }
|
|
|
|
|
|
// Add a child but don't enter its context
|
|
|
function pushContext(data) {
|
|
@@ -129,9 +126,7 @@ exports.module = function(phantomas) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (depth === 0 || deepAnalysis) {
|
|
|
- currentContext.addChild(data);
|
|
|
- }
|
|
|
+ currentContext.addChild(data);
|
|
|
}
|
|
|
|
|
|
// Add a child to the current context and enter its context
|
|
@@ -153,9 +148,7 @@ exports.module = function(phantomas) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (depth === 0 || deepAnalysis) {
|
|
|
- currentContext = currentContext.addChild(data);
|
|
|
- }
|
|
|
+ currentContext = currentContext.addChild(data);
|
|
|
|
|
|
depth ++;
|
|
|
}
|
|
@@ -178,21 +171,18 @@ exports.module = function(phantomas) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (depth === 1 || deepAnalysis) {
|
|
|
-
|
|
|
- // Merge previous data with moreData (ovewrites if exists)
|
|
|
- if (moreData) {
|
|
|
- for (var key in moreData) {
|
|
|
- currentContext.data[key] = moreData[key];
|
|
|
- }
|
|
|
+ // Merge previous data with moreData (ovewrites if exists)
|
|
|
+ if (moreData) {
|
|
|
+ for (var key in moreData) {
|
|
|
+ currentContext.data[key] = moreData[key];
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- var parent = currentContext.parent;
|
|
|
- if (parent === null) {
|
|
|
- console.error('Error: trying to close root context in ContextTree');
|
|
|
- } else {
|
|
|
- currentContext = parent;
|
|
|
- }
|
|
|
+ var parent = currentContext.parent;
|
|
|
+ if (parent === null) {
|
|
|
+ console.error('Error: trying to close root context in ContextTree');
|
|
|
+ } else {
|
|
|
+ currentContext = parent;
|
|
|
}
|
|
|
|
|
|
depth --;
|
|
@@ -255,6 +245,6 @@ exports.module = function(phantomas) {
|
|
|
})();
|
|
|
|
|
|
})(window.__phantomas);
|
|
|
- }, responseEndTime, phantomas.getParam('js-deep-analysis'));
|
|
|
+ }, responseEndTime);
|
|
|
});
|
|
|
};
|