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

Unified Diff: src/api.cc

Issue 16035027: DevTools: CPUProfiler: provide url for scripts that have sourceURL property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: debugger context Created 7 years, 6 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 | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 9b1d01cd8f4ead1bab6e46f03c3ed362157f8c13..f399bc96931dae90e46c5f2f535215012a442414 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7373,11 +7373,18 @@ void CpuProfiler::StartProfiling(Handle<String> title, bool record_samples) {
IsDeadCheck(isolate, "v8::CpuProfiler::StartProfiling");
i::CpuProfiler* profiler = isolate->cpu_profiler();
ASSERT(profiler != NULL);
+ v8::Local<v8::Context> context = v8::Context::New(
+ reinterpret_cast<v8::Isolate*>(isolate));
+ v8::Context::Scope contextScope(context);
profiler->StartProfiling(*Utils::OpenHandle(*title), record_samples);
}
void CpuProfiler::StartCpuProfiling(Handle<String> title, bool record_samples) {
+ i::Isolate* isolate = i::Isolate::Current();
+ v8::Local<v8::Context> context = v8::Context::New(
+ reinterpret_cast<v8::Isolate*>(isolate));
+ v8::Context::Scope contextScope(context);
reinterpret_cast<i::CpuProfiler*>(this)->StartProfiling(
*Utils::OpenHandle(*title), record_samples);
}
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698