Enable "strict mode"; for debugger scripts
BUG=v8:3708 Review URL: https://codereview.chromium.org/736583007 Cr-Commit-Position: refs/heads/master@{#25420}
This commit is contained in:
parent
2d1fd2b566
commit
b593aa8c34
@ -1,6 +1,7 @@
|
||||
// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
"use strict";
|
||||
|
||||
// Default number of frames to include in the response to backtrace request.
|
||||
var kDefaultBacktraceLength = 10;
|
||||
@ -672,7 +673,7 @@ Debug.setBreakPointByScriptIdAndPosition = function(script_id, position,
|
||||
condition, enabled,
|
||||
opt_position_alignment)
|
||||
{
|
||||
break_point = MakeBreakPoint(position);
|
||||
var break_point = MakeBreakPoint(position);
|
||||
break_point.setCondition(condition);
|
||||
if (!enabled) {
|
||||
break_point.disable();
|
||||
@ -739,7 +740,7 @@ Debug.clearBreakPoint = function(break_point_number) {
|
||||
|
||||
Debug.clearAllBreakPoints = function() {
|
||||
for (var i = 0; i < break_points.length; i++) {
|
||||
break_point = break_points[i];
|
||||
var break_point = break_points[i];
|
||||
%ClearBreakPoint(break_point);
|
||||
}
|
||||
break_points = [];
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 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
|
||||
// found in the LICENSE file.
|
||||
"use strict";
|
||||
|
||||
// Handle id counters.
|
||||
var next_handle_ = 0;
|
||||
@ -44,7 +45,7 @@ function MakeMirror(value, opt_transient) {
|
||||
|
||||
// Look for non transient mirrors in the mirror cache.
|
||||
if (!opt_transient && mirror_cache_enabled_) {
|
||||
for (id in mirror_cache_) {
|
||||
for (var id in mirror_cache_) {
|
||||
mirror = mirror_cache_[id];
|
||||
if (mirror.value() === value) {
|
||||
return mirror;
|
||||
@ -1287,11 +1288,11 @@ ErrorMirror.prototype.toText = function() {
|
||||
// Use the same text representation as in messages.js.
|
||||
var text;
|
||||
try {
|
||||
str = %_CallFunction(this.value_, builtins.ErrorToString);
|
||||
text = %_CallFunction(this.value_, builtins.ErrorToString);
|
||||
} catch (e) {
|
||||
str = '#<Error>';
|
||||
text = '#<Error>';
|
||||
}
|
||||
return str;
|
||||
return text;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user