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

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 130213009: Various extension-related cleanup and simplifications. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Whitespace Created 6 years, 11 months 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 | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 8a02399fee09f0a644255efd5605ac507e7b37af..754d9a52a2994d3e9b91f4ef14a86e0a08700a78 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -2070,57 +2070,6 @@ TEST(JSFunctionHasCodeLink) {
}
-
-class HeapProfilerExtension : public v8::Extension {
- public:
- static const char* kName;
- HeapProfilerExtension() : v8::Extension(kName, kSource) { }
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate(
- v8::Isolate* isolate,
- v8::Handle<v8::String> name);
- static void FindUntrackedObjects(
- const v8::FunctionCallbackInfo<v8::Value>& args);
- private:
- static const char* kSource;
-};
-
-const char* HeapProfilerExtension::kName = "v8/heap-profiler";
-
-
-const char* HeapProfilerExtension::kSource =
- "native function findUntrackedObjects();";
-
-
-v8::Handle<v8::FunctionTemplate>
-HeapProfilerExtension::GetNativeFunctionTemplate(v8::Isolate* isolate,
- v8::Handle<v8::String> name) {
- if (name->Equals(v8::String::NewFromUtf8(isolate, "findUntrackedObjects"))) {
- return v8::FunctionTemplate::New(
- isolate,
- HeapProfilerExtension::FindUntrackedObjects);
- } else {
- CHECK(false);
- return v8::Handle<v8::FunctionTemplate>();
- }
-}
-
-
-void HeapProfilerExtension::FindUntrackedObjects(
- const v8::FunctionCallbackInfo<v8::Value>& args) {
- i::HeapProfiler* heap_profiler =
- reinterpret_cast<i::HeapProfiler*>(args.GetIsolate()->GetHeapProfiler());
- int untracked_objects =
- heap_profiler->heap_object_map()->FindUntrackedObjects();
- args.GetReturnValue().Set(untracked_objects);
- CHECK_EQ(0, untracked_objects);
-}
-
-
-static HeapProfilerExtension kHeapProfilerExtension;
-v8::DeclareExtension kHeapProfilerExtensionDeclaration(
- &kHeapProfilerExtension);
-
-
static const v8::HeapGraphNode* GetNodeByPath(const v8::HeapSnapshot* snapshot,
const char* path[],
int depth) {
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698