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

Side by Side Diff: test/cctest/test-api.cc

Issue 596533002: Initial implementation of GetStackSample sampling profiler API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix ARM32 build. Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/cctest/test-sampler-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 rv.Set(true); 927 rv.Set(true);
928 CHECK(!(*o)->IsTheHole() && !(*o)->IsUndefined()); 928 CHECK(!(*o)->IsTheHole() && !(*o)->IsUndefined());
929 rv.Set(v8::Handle<v8::Object>()); 929 rv.Set(v8::Handle<v8::Object>());
930 CHECK((*o)->IsTheHole() || (*o)->IsUndefined()); 930 CHECK((*o)->IsTheHole() || (*o)->IsUndefined());
931 CHECK_EQ(is_runtime, (*o)->IsTheHole()); 931 CHECK_EQ(is_runtime, (*o)->IsTheHole());
932 932
933 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(t.GetIsolate()); 933 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(t.GetIsolate());
934 // If CPU profiler is active check that when API callback is invoked 934 // If CPU profiler is active check that when API callback is invoked
935 // VMState is set to EXTERNAL. 935 // VMState is set to EXTERNAL.
936 if (isolate->cpu_profiler()->is_profiling()) { 936 if (isolate->cpu_profiler()->is_profiling()) {
937 CHECK_EQ(i::EXTERNAL, isolate->current_vm_state()); 937 CHECK_EQ(v8::EXTERNAL, isolate->current_vm_state());
938 CHECK(isolate->external_callback_scope()); 938 CHECK(isolate->external_callback_scope());
939 CHECK_EQ(callback, isolate->external_callback_scope()->callback()); 939 CHECK_EQ(callback, isolate->external_callback_scope()->callback());
940 } 940 }
941 } 941 }
942 942
943 943
944 static void handle_callback_impl(const v8::FunctionCallbackInfo<Value>& info, 944 static void handle_callback_impl(const v8::FunctionCallbackInfo<Value>& info,
945 i::Address callback) { 945 i::Address callback) {
946 ApiTestFuzzer::Fuzz(); 946 ApiTestFuzzer::Fuzz();
947 CheckReturnValue(info, callback); 947 CheckReturnValue(info, callback);
(...skipping 22379 matching lines...) Expand 10 before | Expand all | Expand 10 after
23327 // TestSourceStream::GetMoreData won't block, so it's OK to just run the 23327 // TestSourceStream::GetMoreData won't block, so it's OK to just run the
23328 // task here in the main thread. 23328 // task here in the main thread.
23329 task->Run(); 23329 task->Run();
23330 delete task; 23330 delete task;
23331 23331
23332 const v8::ScriptCompiler::CachedData* cached_data = source.GetCachedData(); 23332 const v8::ScriptCompiler::CachedData* cached_data = source.GetCachedData();
23333 CHECK(cached_data != NULL); 23333 CHECK(cached_data != NULL);
23334 CHECK(cached_data->data != NULL); 23334 CHECK(cached_data->data != NULL);
23335 CHECK_GT(cached_data->length, 0); 23335 CHECK_GT(cached_data->length, 0);
23336 } 23336 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/cctest/test-sampler-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698