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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1012333002: Keep zone cached in SnapshotReader to allow removing ZoneHandle(Isolate*) interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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/dart.cc ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 44579)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -1713,15 +1713,17 @@
DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, Dart_Handle obj2,
bool* value) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
+ Zone* zone = thread->zone();
DARTSCOPE(isolate);
CHECK_CALLBACK_STATE(isolate);
const Instance& expected =
- Instance::CheckedHandle(isolate, Api::UnwrapHandle(obj1));
+ Instance::CheckedHandle(zone, Api::UnwrapHandle(obj1));
const Instance& actual =
- Instance::CheckedHandle(isolate, Api::UnwrapHandle(obj2));
+ Instance::CheckedHandle(zone, Api::UnwrapHandle(obj2));
const Object& result =
- Object::Handle(isolate, DartLibraryCalls::Equals(expected, actual));
+ Object::Handle(zone, DartLibraryCalls::Equals(expected, actual));
if (result.IsBool()) {
*value = Bool::Cast(result).value();
return Api::Success();
@@ -5007,6 +5009,7 @@
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
TIMERSCOPE(isolate, time_script_loading);
+ StackZone zone(isolate);
if (buffer == NULL) {
RETURN_NULL_ERROR(buffer);
}
@@ -5034,7 +5037,8 @@
SnapshotReader reader(snapshot->content(),
snapshot->length(),
snapshot->kind(),
- isolate);
+ isolate,
+ zone.GetZone());
const Object& tmp = Object::Handle(isolate, reader.ReadScriptSnapshot());
if (tmp.IsError()) {
return Api::NewHandle(isolate, tmp.raw());
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698