Uniformize indentation style to always using 4 spaces instead of the weird mix of 4 spaces and tabs 8 space wide (#127)

Uniformize indentation style to always using 4 spaces instead of the weird mix of 4 spaces and tabs 8 space wide (#127)

diff --git a/ext/mini_racer_extension/mini_racer_extension.cc b/ext/mini_racer_extension/mini_racer_extension.cc
index 836f3d3..7b596a0 100644
--- a/ext/mini_racer_extension/mini_racer_extension.cc
+++ b/ext/mini_racer_extension/mini_racer_extension.cc
@@ -71,7 +71,7 @@ public:
     }
 
     int refs() {
-	return refs_count;
+        return refs_count;
     }
 
     static void* operator new(size_t size) {
@@ -315,13 +315,13 @@ nogvl_context_eval(void* arg) {
     MaybeLocal<Script> parsed_script;
 
     if (eval_params->filename) {
-	origin = new v8::ScriptOrigin(*eval_params->filename);
+        origin = new v8::ScriptOrigin(*eval_params->filename);
     }
 
     parsed_script = Script::Compile(context, *eval_params->eval, origin);
 
     if (origin) {
-	delete origin;
+        delete origin;
     }
 
     result->parsed = !parsed_script.IsEmpty();
@@ -332,8 +332,8 @@ nogvl_context_eval(void* arg) {
 
     MaybeLocal<Value> maybe_value;
     if (!result->parsed) {
-	result->message = new Persistent<Value>();
-	result->message->Reset(isolate, trycatch.Exception());
+        result->message = new Persistent<Value>();
+        result->message->Reset(isolate, trycatch.Exception());
     } else {
         // parsing successful
         if (eval_params->max_memory > 0) {
@@ -359,41 +359,41 @@ static VALUE convert_v8_to_ruby(Isolate* isolate, Local<Context> context,
     HandleScope scope(isolate);
 
     if (value->IsNull() || value->IsUndefined()){
-	return Qnil;
+        return Qnil;
     }
 
     if (value->IsInt32()) {
-     return INT2FIX(value->Int32Value());
+        return INT2FIX(value->Int32Value());
     }
 
     if (value->IsNumber()) {
-      return rb_float_new(value->NumberValue());
+        return rb_float_new(value->NumberValue());
     }
 
     if (value->IsTrue()) {
-      return Qtrue;
+        return Qtrue;
     }
 
     if (value->IsFalse()) {
-      return Qfalse;
+        return Qfalse;
     }
 
     if (value->IsArray()) {
       VALUE rb_array = rb_ary_new();
       Local<Array> arr = Local<Array>::Cast(value);
       for(uint32_t i=0; i < arr->Length(); i++) {
-	  Local<Value> element = arr->Get(i);
-	  VALUE rb_elem = convert_v8_to_ruby(isolate, context, element);
-	  if (rb_funcall(rb_elem, rb_intern("class"), 0) == rb_cFailedV8Conversion) {
-	    return rb_elem;
-	  }
+          Local<Value> element = arr->Get(i);
+          VALUE rb_elem = convert_v8_to_ruby(isolate, context, element);
+          if (rb_funcall(rb_elem, rb_intern("class"), 0) == rb_cFailedV8Conversion) {
+            return rb_elem;
+          }
           rb_ary_push(rb_array, rb_elem);
       }
       return rb_array;
     }
 
     if (value->IsFunction()){
-	return rb_funcall(rb_cJavaScriptFunction, rb_intern("new"), 0);
+        return rb_funcall(rb_cJavaScriptFunction, rb_intern("new"), 0);
     }
 
     if (value->IsDate()){
@@ -405,30 +405,30 @@ static VALUE convert_v8_to_ruby(Isolate* isolate, Local<Context> context,
     }
 
     if (value->IsObject()) {
-	VALUE rb_hash = rb_hash_new();
-	TryCatch trycatch(isolate);
-
-	Local<Object> object = value->ToObject();
-	auto maybe_props = object->GetOwnPropertyNames(context);
-	if (!maybe_props.IsEmpty()) {
-	    Local<Array> props = maybe_props.ToLocalChecked();
-	    for(uint32_t i=0; i < props->Length(); i++) {
-	     Local<Value> key = props->Get(i);
-	     VALUE rb_key = convert_v8_to_ruby(isolate, context, key);
-	     Local<Value> prop_value = object->Get(key);
-	     // this may have failed due to Get raising
-
-	     if (trycatch.HasCaught()) {
-		 // TODO isolate code that translates execption to ruby
-		 // exception so we can properly return it
-		 return rb_funcall(rb_cFailedV8Conversion, rb_intern("new"), 1, rb_str_new2(""));
-	     }
-
-	     VALUE rb_value = convert_v8_to_ruby(isolate, context, prop_value);
-	     rb_hash_aset(rb_hash, rb_key, rb_value);
-	    }
-	}
-	return rb_hash;
+        VALUE rb_hash = rb_hash_new();
+        TryCatch trycatch(isolate);
+
+        Local<Object> object = value->ToObject();
+        auto maybe_props = object->GetOwnPropertyNames(context);
+        if (!maybe_props.IsEmpty()) {
+            Local<Array> props = maybe_props.ToLocalChecked();
+            for(uint32_t i=0; i < props->Length(); i++) {
+             Local<Value> key = props->Get(i);
+             VALUE rb_key = convert_v8_to_ruby(isolate, context, key);
+             Local<Value> prop_value = object->Get(key);
+             // this may have failed due to Get raising
+
+             if (trycatch.HasCaught()) {
+             // TODO isolate code that translates execption to ruby
+             // exception so we can properly return it
+             return rb_funcall(rb_cFailedV8Conversion, rb_intern("new"), 1, rb_str_new2(""));
+             }
+
+             VALUE rb_value = convert_v8_to_ruby(isolate, context, prop_value);
+             rb_hash_aset(rb_hash, rb_key, rb_value);
+            }
+        }
+        return rb_hash;
     }
 
     Local<String> rstr = value->ToString();
@@ -675,13 +675,13 @@ static VALUE rb_context_init_unsafe(VALUE self, VALUE isolate, VALUE snap) {
         // the ruby lock is needed if this isn't a new isolate
         IsolateInfo::Lock ruby_lock(isolate_info->mutex);
         Locker lock(isolate_info->isolate);
-	Isolate::Scope isolate_scope(isolate_info->isolate);
-	HandleScope handle_scope(isolate_info->isolate);
+        Isolate::Scope isolate_scope(isolate_info->isolate);
+        HandleScope handle_scope(isolate_info->isolate);
 
-	Local<Context> context = Context::New(isolate_info->isolate);
+        Local<Context> context = Context::New(isolate_info->isolate);
 
-	context_info->context = new Persistent<Context>();
-	context_info->context->Reset(isolate_info->isolate, context);
+        context_info->context = new Persistent<Context>();
+        context_info->context->Reset(isolate_info->isolate, context);
     }
 
     if (Qnil == rb_cDateTime && rb_funcall(rb_cObject, rb_intern("const_defined?"), 1, rb_str_new2("DateTime")) == Qtrue)
@@ -803,42 +803,42 @@ static VALUE rb_context_eval_unsafe(VALUE self, VALUE str, VALUE filename) {
     }
 
     {
-	Locker lock(isolate);
-	Isolate::Scope isolate_scope(isolate);
-	HandleScope handle_scope(isolate);
+        Locker lock(isolate);
+        Isolate::Scope isolate_scope(isolate);
+        HandleScope handle_scope(isolate);
 
-	Local<String> eval = String::NewFromUtf8(isolate, RSTRING_PTR(str),
-				NewStringType::kNormal, (int)RSTRING_LEN(str)).ToLocalChecked();
+        Local<String> eval = String::NewFromUtf8(isolate, RSTRING_PTR(str),
+                    NewStringType::kNormal, (int)RSTRING_LEN(str)).ToLocalChecked();
 
-	Local<String> local_filename;
+        Local<String> local_filename;
 
-	if (filename != Qnil) {
-	    local_filename = String::NewFromUtf8(isolate, RSTRING_PTR(filename),
-		    NewStringType::kNormal, (int)RSTRING_LEN(filename)).ToLocalChecked();
-	    eval_params.filename = &local_filename;
-	} else {
-	    eval_params.filename = NULL;
-	}
+        if (filename != Qnil) {
+            local_filename = String::NewFromUtf8(isolate, RSTRING_PTR(filename),
+                NewStringType::kNormal, (int)RSTRING_LEN(filename)).ToLocalChecked();
+            eval_params.filename = &local_filename;
+        } else {
+            eval_params.filename = NULL;
+        }
 
-	eval_params.context_info = context_info;
-	eval_params.eval = &eval;
-	eval_params.result = &eval_result;
-	eval_params.timeout = 0;
-	eval_params.max_memory = 0;
-	VALUE timeout = rb_iv_get(self, "@timeout");
-	if (timeout != Qnil) {
-	    eval_params.timeout = (useconds_t)NUM2LONG(timeout);
-	}
+        eval_params.context_info = context_info;
+        eval_params.eval = &eval;
+        eval_params.result = &eval_result;
+        eval_params.timeout = 0;
+        eval_params.max_memory = 0;
+        VALUE timeout = rb_iv_get(self, "@timeout");
+        if (timeout != Qnil) {
+            eval_params.timeout = (useconds_t)NUM2LONG(timeout);
+        }
 
-	VALUE mem_softlimit = rb_iv_get(self, "@max_memory");
-	if (mem_softlimit != Qnil) {

[... diff too long, it was truncated ...]

GitHub sha: b3c9b358