Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: src/debug-debugger.js

Issue 1123353004: Revert of Wrap runtime.js in a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/date.js ('k') | src/harmony-array.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index 991af118a2c0582af1a8f6598acad6fa39959f84..f92bcda0de0e0457a261b71e87e98248e3141d35 100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -202,8 +202,7 @@
try {
var mirror = exec_state.frame(0).evaluate(this.condition());
// If no sensible mirror or non true value break point not triggered.
- if (!(mirror instanceof ValueMirror) ||
- !builtins.$toBoolean(mirror.value_)) {
+ if (!(mirror instanceof ValueMirror) || !%ToBoolean(mirror.value_)) {
return false;
}
} catch (e) {
@@ -925,8 +924,8 @@
ExecutionState.prototype.prepareStep = function(opt_action, opt_count,
opt_callframe) {
var action = Debug.StepAction.StepIn;
- if (!IS_UNDEFINED(opt_action)) action = builtins.$toNumber(opt_action);
- var count = opt_count ? builtins.$toNumber(opt_count) : 1;
+ if (!IS_UNDEFINED(opt_action)) action = %ToNumber(opt_action);
+ var count = opt_count ? %ToNumber(opt_count) : 1;
var callFrameId = 0;
if (!IS_UNDEFINED(opt_callframe)) {
callFrameId = opt_callframe.details_.frameId();
@@ -960,7 +959,7 @@
};
ExecutionState.prototype.setSelectedFrame = function(index) {
- var i = builtins.$toNumber(index);
+ var i = %ToNumber(index);
if (i < 0 || i >= this.frameCount()) throw new Error('Illegal frame index.');
this.selected_frame = i;
};
@@ -1403,7 +1402,7 @@
response = this.createResponse();
}
response.success = false;
- response.message = builtins.$toString(e);
+ response.message = %ToString(e);
}
// Return the response as a JSON encoded string.
@@ -1420,7 +1419,7 @@
'"request_seq":' + request.seq + ',' +
'"type":"response",' +
'"success":false,' +
- '"message":"Internal error: ' + builtins.$toString(e) + '"}';
+ '"message":"Internal error: ' + %ToString(e) + '"}';
}
} catch (e) {
// Failed in one of the catch blocks above - most generic error.
@@ -1441,7 +1440,7 @@
// Get the stepcount argument if any.
if (stepcount) {
- count = builtins.$toNumber(stepcount);
+ count = %ToNumber(stepcount);
if (count < 0) {
throw new Error('Invalid stepcount argument "' + stepcount + '".');
}
@@ -1514,7 +1513,7 @@
// Find the function through a global evaluate.
f = this.exec_state_.evaluateGlobal(target).value();
} catch (e) {
- response.failed('Error: "' + builtins.$toString(e) +
+ response.failed('Error: "' + %ToString(e) +
'" evaluating "' + target + '"');
return;
}
@@ -1603,7 +1602,7 @@
}
// Pull out arguments.
- var break_point = builtins.$toNumber(request.arguments.breakpoint);
+ var break_point = %ToNumber(request.arguments.breakpoint);
var enabled = request.arguments.enabled;
var condition = request.arguments.condition;
var ignoreCount = request.arguments.ignoreCount;
@@ -1679,7 +1678,7 @@
}
// Pull out arguments.
- var break_point = builtins.$toNumber(request.arguments.breakpoint);
+ var break_point = %ToNumber(request.arguments.breakpoint);
// Check for legal arguments.
if (!break_point) {
@@ -1936,7 +1935,7 @@
// With no scope argument just return top scope.
var scope_index = 0;
if (request.arguments && !IS_UNDEFINED(request.arguments.number)) {
- scope_index = builtins.$toNumber(request.arguments.number);
+ scope_index = %ToNumber(request.arguments.number);
if (scope_index < 0 || scope_holder.scopeCount() <= scope_index) {
return response.failed('Invalid scope number');
}
@@ -2000,7 +1999,7 @@
if (IS_UNDEFINED(scope_description.number)) {
response.failed('Missing scope number');
}
- var scope_index = builtins.$toNumber(scope_description.number);
+ var scope_index = %ToNumber(scope_description.number);
var scope = scope_holder.scope(scope_index);
@@ -2078,7 +2077,7 @@
// Check whether a frame was specified.
if (!IS_UNDEFINED(frame)) {
- var frame_number = builtins.$toNumber(frame);
+ var frame_number = %ToNumber(frame);
if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
return response.failed('Invalid frame "' + frame + '"');
}
@@ -2110,7 +2109,7 @@
// Set 'includeSource' option for script lookup.
if (!IS_UNDEFINED(request.arguments.includeSource)) {
- var includeSource = builtins.$toBoolean(request.arguments.includeSource);
+ var includeSource = %ToBoolean(request.arguments.includeSource);
response.setOption('includeSource', includeSource);
}
@@ -2178,7 +2177,7 @@
to_line = request.arguments.toLine;
if (!IS_UNDEFINED(request.arguments.frame)) {
- var frame_number = builtins.$toNumber(request.arguments.frame);
+ var frame_number = %ToNumber(request.arguments.frame);
if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
return response.failed('Invalid frame "' + frame + '"');
}
@@ -2214,7 +2213,7 @@
if (request.arguments) {
// Pull out arguments.
if (!IS_UNDEFINED(request.arguments.types)) {
- types = builtins.$toNumber(request.arguments.types);
+ types = %ToNumber(request.arguments.types);
if (isNaN(types) || types < 0) {
return response.failed('Invalid types "' +
request.arguments.types + '"');
@@ -2222,7 +2221,7 @@
}
if (!IS_UNDEFINED(request.arguments.includeSource)) {
- includeSource = builtins.$toBoolean(request.arguments.includeSource);
+ includeSource = %ToBoolean(request.arguments.includeSource);
response.setOption('includeSource', includeSource);
}
@@ -2237,7 +2236,7 @@
var filterStr = null;
var filterNum = null;
if (!IS_UNDEFINED(request.arguments.filter)) {
- var num = builtins.$toNumber(request.arguments.filter);
+ var num = %ToNumber(request.arguments.filter);
if (!isNaN(num)) {
filterNum = num;
}
@@ -2373,7 +2372,7 @@
var frame_mirror;
// Check whether a frame was specified.
if (!IS_UNDEFINED(frame)) {
- var frame_number = builtins.$toNumber(frame);
+ var frame_number = %ToNumber(frame);
if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
return response.failed('Invalid frame "' + frame + '"');
}
« no previous file with comments | « src/date.js ('k') | src/harmony-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698