| 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') {
|
|
|