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

Unified Diff: runtime/vm/profiler_service.cc

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 4 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 | « runtime/vm/profiler_service.h ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.cc
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 1c2c11836eebaf051324b50d177bf94512591dab..99a8a6d0cf6ca2170b21b427fb3a5bbd5e9aacea 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -2194,11 +2194,12 @@ intptr_t ProfileTrieWalker::SiblingCount() {
}
-void ProfilerService::PrintJSONImpl(Isolate* isolate,
+void ProfilerService::PrintJSONImpl(Thread* thread,
JSONStream* stream,
Profile::TagOrder tag_order,
intptr_t extra_tags,
SampleFilter* filter) {
+ Isolate* isolate = thread->isolate();
// Disable profile interrupts while processing the buffer.
Profiler::EndExecution(isolate);
@@ -2213,7 +2214,7 @@ void ProfilerService::PrintJSONImpl(Isolate* isolate,
{
StackZone zone(isolate);
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
Profile profile(isolate);
profile.Build(filter, tag_order, extra_tags);
profile.PrintJSON(stream);
@@ -2239,9 +2240,10 @@ class NoAllocationSampleFilter : public SampleFilter {
void ProfilerService::PrintJSON(JSONStream* stream,
Profile::TagOrder tag_order,
intptr_t extra_tags) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
NoAllocationSampleFilter filter(isolate);
- PrintJSONImpl(isolate, stream, tag_order, extra_tags, &filter);
+ PrintJSONImpl(thread, stream, tag_order, extra_tags, &filter);
}
@@ -2266,9 +2268,10 @@ class ClassAllocationSampleFilter : public SampleFilter {
void ProfilerService::PrintAllocationJSON(JSONStream* stream,
Profile::TagOrder tag_order,
const Class& cls) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
ClassAllocationSampleFilter filter(isolate, cls);
- PrintJSONImpl(isolate, stream, tag_order, kNoExtraTags, &filter);
+ PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter);
}
« no previous file with comments | « runtime/vm/profiler_service.h ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698