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

Unified Diff: src/d8.js

Issue 8701006: Clean up JavaScript files to better follow coding standard. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/array.js ('k') | src/debug-debugger.js » ('j') | src/v8natives.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.js
diff --git a/src/d8.js b/src/d8.js
index 3009037e788d4c0e8e601bbb60465659adab8fdb..45b5874bff4d6e97939b387f96f2b32dbfc78d7a 100644
--- a/src/d8.js
+++ b/src/d8.js
@@ -26,8 +26,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
String.prototype.startsWith = function (str) {
- if (str.length > this.length)
+ if (str.length > this.length) {
return false;
+ }
return this.substr(0, str.length) == str;
}
@@ -52,8 +53,9 @@ function GetCompletions(global, last, full) {
for (var i = 0; i < parts.length; i++) {
var part = parts[i];
var next = current[part];
- if (!next)
+ if (!next) {
return [];
+ }
current = next;
}
var result = [];
@@ -63,8 +65,9 @@ function GetCompletions(global, last, full) {
var properties = mirror.properties();
for (var i = 0; i < properties.length; i++) {
var name = properties[i].name();
- if (typeof name === 'string' && name.startsWith(last))
+ if (typeof name === 'string' && name.startsWith(last)) {
result.push(name);
+ }
}
current = ToInspectableObject(current.__proto__);
}
@@ -150,7 +153,7 @@ function DebugMessageDetails(message) {
}
function DebugEventDetails(response) {
- details = {text:'', running:false}
+ details = {text:'', running:false};
// Get the running state.
details.running = response.running();
@@ -536,7 +539,7 @@ RequestPacket.prototype.toJSONProtocol = function() {
json += ',"arguments":';
// Encode the arguments part.
if (this.arguments.toJSONProtocol) {
- json += this.arguments.toJSONProtocol()
+ json += this.arguments.toJSONProtocol();
} else {
json += SimpleObjectToJSON_(this.arguments);
}
@@ -2738,7 +2741,7 @@ function SimpleObjectToJSON_(object) {
if (property_value === null) {
property_value_json = 'null';
} else if (typeof property_value.toJSONProtocol == 'function') {
- property_value_json = property_value.toJSONProtocol(true)
+ property_value_json = property_value.toJSONProtocol(true);
} else if (property_value.constructor.name == 'Array'){
property_value_json = SimpleArrayToJSON_(property_value);
} else {
@@ -2789,7 +2792,7 @@ function SimpleArrayToJSON_(array) {
}
var elem = array[i];
if (elem.toJSONProtocol) {
- json += elem.toJSONProtocol(true)
+ json += elem.toJSONProtocol(true);
} else if (typeof(elem) === 'object') {
json += SimpleObjectToJSON_(elem);
} else if (typeof(elem) === 'boolean') {
« no previous file with comments | « src/array.js ('k') | src/debug-debugger.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698