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

Unified Diff: runtime/vm/json_stream.cc

Issue 1389353004: Remove isolate argument from handle allocation: Part II (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 2f92daa709accae3701713cb888e7425715d1677..0f4f3a647dd79de3c8190b112486fa00e0f95663 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -735,9 +735,9 @@ void JSONObject::AddLocation(const Script& script,
void JSONObject::AddLocation(const BreakpointLocation* bpt_loc) const {
ASSERT(bpt_loc->IsResolved());
- Isolate* isolate = Isolate::Current();
- Library& library = Library::Handle(isolate);
- Script& script = Script::Handle(isolate);
+ Zone* zone = Thread::Current()->zone();
+ Library& library = Library::Handle(zone);
+ Script& script = Script::Handle(zone);
intptr_t token_pos;
bpt_loc->GetCodeLocation(&library, &script, &token_pos);
AddLocation(script, token_pos);
@@ -748,9 +748,9 @@ void JSONObject::AddUnresolvedLocation(
const BreakpointLocation* bpt_loc) const {
ASSERT(!bpt_loc->IsResolved());
- Isolate* isolate = Isolate::Current();
- Library& library = Library::Handle(isolate);
- Script& script = Script::Handle(isolate);
+ Zone* zone = Thread::Current()->zone();
+ Library& library = Library::Handle(zone);
+ Script& script = Script::Handle(zone);
intptr_t token_pos;
bpt_loc->GetCodeLocation(&library, &script, &token_pos);
@@ -759,7 +759,7 @@ void JSONObject::AddUnresolvedLocation(
if (!script.IsNull()) {
location.AddProperty("script", script);
} else {
- const String& scriptUri = String::Handle(isolate, bpt_loc->url());
+ const String& scriptUri = String::Handle(zone, bpt_loc->url());
location.AddPropertyStr("scriptUri", scriptUri);
}
if (bpt_loc->requested_line_number() >= 0) {
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698