Permalink
Browse files

Cleans up incorrect indentation

  • Loading branch information...
c4milo committed Apr 5, 2012
1 parent 314ab6c commit 34d927771e1baed100bb24497ea92b75c65d94f0
Showing with 215 additions and 214 deletions.
  1. +59 −59 cpu_profiler.cc
  2. +16 −16 cpu_profiler.h
  3. +125 −124 heap_profiler.cc
  4. +15 −15 heap_profiler.h
View
@@ -2,74 +2,74 @@
#include "profile.h"
namespace nodex {
- Persistent<ObjectTemplate> CpuProfiler::cpu_profiler_template_;
+ Persistent<ObjectTemplate> CpuProfiler::cpu_profiler_template_;
- void CpuProfiler::Initialize(Handle<Object> target) {
- HandleScope scope;
+ void CpuProfiler::Initialize(Handle<Object> target) {
+ HandleScope scope;
- cpu_profiler_template_ = Persistent<ObjectTemplate>::New(ObjectTemplate::New());
- cpu_profiler_template_->SetInternalFieldCount(1);
+ cpu_profiler_template_ = Persistent<ObjectTemplate>::New(ObjectTemplate::New());
+ cpu_profiler_template_->SetInternalFieldCount(1);
- Local<Object> cpuProfilerObj = cpu_profiler_template_->NewInstance();
+ Local<Object> cpuProfilerObj = cpu_profiler_template_->NewInstance();
- NODE_SET_METHOD(cpuProfilerObj, "getProfilesCount", CpuProfiler::GetProfilesCount);
- NODE_SET_METHOD(cpuProfilerObj, "getProfile", CpuProfiler::GetProfile);
- NODE_SET_METHOD(cpuProfilerObj, "findProfile", CpuProfiler::FindProfile);
- NODE_SET_METHOD(cpuProfilerObj, "startProfiling", CpuProfiler::StartProfiling);
- NODE_SET_METHOD(cpuProfilerObj, "stopProfiling", CpuProfiler::StopProfiling);
- NODE_SET_METHOD(cpuProfilerObj, "deleteAllProfiles", CpuProfiler::DeleteAllProfiles);
+ NODE_SET_METHOD(cpuProfilerObj, "getProfilesCount", CpuProfiler::GetProfilesCount);
+ NODE_SET_METHOD(cpuProfilerObj, "getProfile", CpuProfiler::GetProfile);
+ NODE_SET_METHOD(cpuProfilerObj, "findProfile", CpuProfiler::FindProfile);
+ NODE_SET_METHOD(cpuProfilerObj, "startProfiling", CpuProfiler::StartProfiling);
+ NODE_SET_METHOD(cpuProfilerObj, "stopProfiling", CpuProfiler::StopProfiling);
+ NODE_SET_METHOD(cpuProfilerObj, "deleteAllProfiles", CpuProfiler::DeleteAllProfiles);
- target->Set(String::NewSymbol("cpuProfiler"), cpuProfilerObj);
- }
+ target->Set(String::NewSymbol("cpuProfiler"), cpuProfilerObj);
+ }
- CpuProfiler::CpuProfiler() {}
- CpuProfiler::~CpuProfiler() {}
+ CpuProfiler::CpuProfiler() {}
+ CpuProfiler::~CpuProfiler() {}
- Handle<Value> CpuProfiler::GetProfilesCount(const Arguments& args) {
- HandleScope scope;
- return scope.Close(Integer::New(v8::CpuProfiler::GetProfilesCount()));
- }
+ Handle<Value> CpuProfiler::GetProfilesCount(const Arguments& args) {
+ HandleScope scope;
+ return scope.Close(Integer::New(v8::CpuProfiler::GetProfilesCount()));
+ }
- Handle<Value> CpuProfiler::GetProfile(const Arguments& args) {
- HandleScope scope;
- if (args.Length() < 1) {
- return ThrowException(Exception::Error(String::New("No index specified")));
- } else if (!args[0]->IsInt32()) {
- return ThrowException(Exception::TypeError(String::New("Argument must be an integer")));
- }
- int32_t index = args[0]->Int32Value();
- const CpuProfile* profile = v8::CpuProfiler::GetProfile(index);
- return scope.Close(Profile::New(profile));
- }
+ Handle<Value> CpuProfiler::GetProfile(const Arguments& args) {
+ HandleScope scope;
+ if (args.Length() < 1) {
+ return ThrowException(Exception::Error(String::New("No index specified")));
+ } else if (!args[0]->IsInt32()) {
+ return ThrowException(Exception::TypeError(String::New("Argument must be an integer")));
+ }
+ int32_t index = args[0]->Int32Value();
+ const CpuProfile* profile = v8::CpuProfiler::GetProfile(index);
+ return scope.Close(Profile::New(profile));
+ }
- Handle<Value> CpuProfiler::FindProfile(const Arguments& args) {
- HandleScope scope;
- if (args.Length() < 1) {
- return ThrowException(Exception::Error(String::New("No index specified")));
- } else if (!args[0]->IsInt32()) {
- return ThrowException(Exception::TypeError(String::New("Argument must be an integer")));
- }
- uint32_t uid = args[0]->Uint32Value();
- const CpuProfile* profile = v8::CpuProfiler::FindProfile(uid);
- return scope.Close(Profile::New(profile));
- }
+ Handle<Value> CpuProfiler::FindProfile(const Arguments& args) {
+ HandleScope scope;
+ if (args.Length() < 1) {
+ return ThrowException(Exception::Error(String::New("No index specified")));
+ } else if (!args[0]->IsInt32()) {
+ return ThrowException(Exception::TypeError(String::New("Argument must be an integer")));
+ }
+ uint32_t uid = args[0]->Uint32Value();
+ const CpuProfile* profile = v8::CpuProfiler::FindProfile(uid);
+ return scope.Close(Profile::New(profile));
+ }
- Handle<Value> CpuProfiler::StartProfiling(const Arguments& args) {
- HandleScope scope;
- Local<String> title = args.Length() > 0 ? args[0]->ToString() : String::New("");
- v8::CpuProfiler::StartProfiling(title);
- return Undefined();
- }
+ Handle<Value> CpuProfiler::StartProfiling(const Arguments& args) {
+ HandleScope scope;
+ Local<String> title = args.Length() > 0 ? args[0]->ToString() : String::New("");
+ v8::CpuProfiler::StartProfiling(title);
+ return Undefined();
+ }
- Handle<Value> CpuProfiler::StopProfiling(const Arguments& args) {
- HandleScope scope;
- Local<String> title = args.Length() > 0 ? args[0]->ToString() : String::New("");
- const CpuProfile* profile = v8::CpuProfiler::StopProfiling(title);
- return scope.Close(Profile::New(profile));
- }
+ Handle<Value> CpuProfiler::StopProfiling(const Arguments& args) {
+ HandleScope scope;
+ Local<String> title = args.Length() > 0 ? args[0]->ToString() : String::New("");
+ const CpuProfile* profile = v8::CpuProfiler::StopProfiling(title);
+ return scope.Close(Profile::New(profile));
+ }
- Handle<Value> CpuProfiler::DeleteAllProfiles(const Arguments& args) {
- v8::CpuProfiler::DeleteAllProfiles();
- return Undefined();
- }
-} //namespace nodex
+ Handle<Value> CpuProfiler::DeleteAllProfiles(const Arguments& args) {
+ v8::CpuProfiler::DeleteAllProfiles();
+ return Undefined();
+ }
+} //namespace nodex
View
@@ -8,24 +8,24 @@ using namespace v8;
using namespace node;
namespace nodex {
- class CpuProfiler {
- public:
- static void Initialize(Handle<Object> target);
+ class CpuProfiler {
+ public:
+ static void Initialize(Handle<Object> target);
- CpuProfiler();
- virtual ~CpuProfiler();
+ CpuProfiler();
+ virtual ~CpuProfiler();
- protected:
- static Handle<Value> GetProfilesCount(const Arguments& args);
- static Handle<Value> GetProfile(const Arguments& args);
- static Handle<Value> FindProfile(const Arguments& args);
- static Handle<Value> StartProfiling(const Arguments& args);
- static Handle<Value> StopProfiling(const Arguments& args);
- static Handle<Value> DeleteAllProfiles(const Arguments& args);
+ protected:
+ static Handle<Value> GetProfilesCount(const Arguments& args);
+ static Handle<Value> GetProfile(const Arguments& args);
+ static Handle<Value> FindProfile(const Arguments& args);
+ static Handle<Value> StartProfiling(const Arguments& args);
+ static Handle<Value> StopProfiling(const Arguments& args);
+ static Handle<Value> DeleteAllProfiles(const Arguments& args);
- private:
- static Persistent<ObjectTemplate> cpu_profiler_template_;
- };
+ private:
+ static Persistent<ObjectTemplate> cpu_profiler_template_;
+ };
} //namespace nodex
-#endif // NODE_CPU_PROFILER_H
+#endif // NODE_CPU_PROFILER_H
Oops, something went wrong.

0 comments on commit 34d9277

Please sign in to comment.