Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
deps: backport b593aa8 from v8 upstream
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
Julien Gilli authored and tjfontaine committed Dec 17, 2014
1 parent 0ff51c6 commit 45f1330
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions deps/v8/src/debug-debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"use strict";

// Default number of frames to include in the response to backtrace request.
var kDefaultBacktraceLength = 10;
Expand Down Expand Up @@ -677,7 +678,7 @@ Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
Debug.setBreakPointByScriptIdAndPosition = function(script_id, position,
condition, enabled)
{
break_point = MakeBreakPoint(position);
var break_point = MakeBreakPoint(position);
break_point.setCondition(condition);
if (!enabled) {
break_point.disable();
Expand Down Expand Up @@ -742,7 +743,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 = [];
Expand Down
9 changes: 5 additions & 4 deletions deps/v8/src/mirror-debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"use strict";

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

// Look for non transient mirrors in the mirror cache.
if (!opt_transient) {
for (id in mirror_cache_) {
for (var id in mirror_cache_) {
mirror = mirror_cache_[id];
if (mirror.value() === value) {
return mirror;
Expand Down Expand Up @@ -1154,11 +1155,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;
};


Expand Down

0 comments on commit 45f1330

Please sign in to comment.