Chromium Code Reviews| Index: test/cctest/profiler-extension.h |
| diff --git a/src/extensions/gc-extension.h b/test/cctest/profiler-extension.h |
| similarity index 78% |
| copy from src/extensions/gc-extension.h |
| copy to test/cctest/profiler-extension.h |
| index e412b92a4d997aad87160ddd789b85419bdf3037..2409ddb044d9e940c51765bd1c338633278a3579 100644 |
| --- a/src/extensions/gc-extension.h |
| +++ b/test/cctest/profiler-extension.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright 2010 the V8 project authors. All rights reserved. |
| +// Copyright 2013 the V8 project authors. All rights reserved. |
| // Redistribution and use in source and binary forms, with or without |
| // modification, are permitted provided that the following conditions are |
| // met: |
| @@ -25,23 +25,24 @@ |
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| -#ifndef V8_EXTENSIONS_GC_EXTENSION_H_ |
| -#define V8_EXTENSIONS_GC_EXTENSION_H_ |
| - |
| -#include "v8.h" |
| +#ifndef PROFILER_EXTENSION_H_ |
| +#define PROFILER_EXTENSION_H_ |
|
yurys
2013/06/13 09:11:35
#include "v8.h" ?
loislo
2013/06/13 10:01:42
Done.
|
| namespace v8 { |
| namespace internal { |
| -class GCExtension : public v8::Extension { |
| +class ProfilerExtension : public v8::Extension { |
| public: |
| - explicit GCExtension(const char* source) : v8::Extension("v8/gc", source) {} |
| + ProfilerExtension() : v8::Extension("v8/profiler", kSource) { } |
| virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
| v8::Handle<v8::String> name); |
| - static void GC(const v8::FunctionCallbackInfo<v8::Value>& args); |
| - static void Register(); |
| + static v8::Handle<v8::Value> StartProfiling(const v8::Arguments& args); |
|
yurys
2013/06/13 09:11:35
These two functions can be private.
loislo
2013/06/13 10:01:42
Done.
|
| + static v8::Handle<v8::Value> StopProfiling(const v8::Arguments& args); |
| + private: |
| + static const char* kSource; |
| }; |
| } } // namespace v8::internal |
| -#endif // V8_EXTENSIONS_GC_EXTENSION_H_ |
| +#endif // PROFILER_EXTENSION_H_ |
| + |