Skip to content

Commit 45f1330

Browse files
Julien Gillitjfontaine
authored andcommitted
deps: backport b593aa8 from v8 upstream
Original commit message: Enable "strict mode"; for debugger scripts BUG=v8:3708 Review URL: https://codereview.chromium.org/736583007 Cr-Commit-Position: refs/heads/master@{#25420}
1 parent 0ff51c6 commit 45f1330

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

deps/v8/src/debug-debugger.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
"use strict";
2728

2829
// Default number of frames to include in the response to backtrace request.
2930
var kDefaultBacktraceLength = 10;
@@ -677,7 +678,7 @@ Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
677678
Debug.setBreakPointByScriptIdAndPosition = function(script_id, position,
678679
condition, enabled)
679680
{
680-
break_point = MakeBreakPoint(position);
681+
var break_point = MakeBreakPoint(position);
681682
break_point.setCondition(condition);
682683
if (!enabled) {
683684
break_point.disable();
@@ -742,7 +743,7 @@ Debug.clearBreakPoint = function(break_point_number) {
742743

743744
Debug.clearAllBreakPoints = function() {
744745
for (var i = 0; i < break_points.length; i++) {
745-
break_point = break_points[i];
746+
var break_point = break_points[i];
746747
%ClearBreakPoint(break_point);
747748
}
748749
break_points = [];

deps/v8/src/mirror-debugger.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
"use strict";
2728

2829
// Handle id counters.
2930
var next_handle_ = 0;
@@ -55,7 +56,7 @@ function MakeMirror(value, opt_transient) {
5556

5657
// Look for non transient mirrors in the mirror cache.
5758
if (!opt_transient) {
58-
for (id in mirror_cache_) {
59+
for (var id in mirror_cache_) {
5960
mirror = mirror_cache_[id];
6061
if (mirror.value() === value) {
6162
return mirror;
@@ -1154,11 +1155,11 @@ ErrorMirror.prototype.toText = function() {
11541155
// Use the same text representation as in messages.js.
11551156
var text;
11561157
try {
1157-
str = %_CallFunction(this.value_, builtins.ErrorToString);
1158+
text = %_CallFunction(this.value_, builtins.ErrorToString);
11581159
} catch (e) {
1159-
str = '#<Error>';
1160+
text = '#<Error>';
11601161
}
1161-
return str;
1162+
return text;
11621163
};
11631164

11641165

0 commit comments

Comments
 (0)