Commit b593aa8c authored by yurys's avatar yurys Committed by Commit bot

Enable "strict mode"; for debugger scripts

BUG=v8:3708

Review URL: https://codereview.chromium.org/736583007

Cr-Commit-Position: refs/heads/master@{#25420}
parent 2d1fd2b5
// Copyright 2012 the V8 project authors. All rights reserved. // Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
"use strict";
// Default number of frames to include in the response to backtrace request. // Default number of frames to include in the response to backtrace request.
var kDefaultBacktraceLength = 10; var kDefaultBacktraceLength = 10;
...@@ -672,7 +673,7 @@ Debug.setBreakPointByScriptIdAndPosition = function(script_id, position, ...@@ -672,7 +673,7 @@ Debug.setBreakPointByScriptIdAndPosition = function(script_id, position,
condition, enabled, condition, enabled,
opt_position_alignment) opt_position_alignment)
{ {
break_point = MakeBreakPoint(position); var break_point = MakeBreakPoint(position);
break_point.setCondition(condition); break_point.setCondition(condition);
if (!enabled) { if (!enabled) {
break_point.disable(); break_point.disable();
...@@ -739,7 +740,7 @@ Debug.clearBreakPoint = function(break_point_number) { ...@@ -739,7 +740,7 @@ Debug.clearBreakPoint = function(break_point_number) {
Debug.clearAllBreakPoints = function() { Debug.clearAllBreakPoints = function() {
for (var i = 0; i < break_points.length; i++) { for (var i = 0; i < break_points.length; i++) {
break_point = break_points[i]; var break_point = break_points[i];
%ClearBreakPoint(break_point); %ClearBreakPoint(break_point);
} }
break_points = []; break_points = [];
......
// Copyright 2006-2012 the V8 project authors. All rights reserved. // Copyright 2006-2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
"use strict";
// Handle id counters. // Handle id counters.
var next_handle_ = 0; var next_handle_ = 0;
...@@ -44,7 +45,7 @@ function MakeMirror(value, opt_transient) { ...@@ -44,7 +45,7 @@ function MakeMirror(value, opt_transient) {
// Look for non transient mirrors in the mirror cache. // Look for non transient mirrors in the mirror cache.
if (!opt_transient && mirror_cache_enabled_) { if (!opt_transient && mirror_cache_enabled_) {
for (id in mirror_cache_) { for (var id in mirror_cache_) {
mirror = mirror_cache_[id]; mirror = mirror_cache_[id];
if (mirror.value() === value) { if (mirror.value() === value) {
return mirror; return mirror;
...@@ -1287,11 +1288,11 @@ ErrorMirror.prototype.toText = function() { ...@@ -1287,11 +1288,11 @@ ErrorMirror.prototype.toText = function() {
// Use the same text representation as in messages.js. // Use the same text representation as in messages.js.
var text; var text;
try { try {
str = %_CallFunction(this.value_, builtins.ErrorToString); text = %_CallFunction(this.value_, builtins.ErrorToString);
} catch (e) { } catch (e) {
str = '#<Error>'; text = '#<Error>';
} }
return str; return text;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment