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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 8509031: Revert r1380 that is breaking frog. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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 | « runtime/vm/code_index_table_test.cc ('k') | runtime/vm/object.h » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 SetupErrorResult(result); 306 SetupErrorResult(result);
307 } 307 }
308 isolate->set_long_jump_base(base); 308 isolate->set_long_jump_base(base);
309 } 309 }
310 } 310 }
311 311
312 312
313 // Return error if isolate is in an inconsistent state. 313 // Return error if isolate is in an inconsistent state.
314 // Return NULL when no error condition exists. 314 // Return NULL when no error condition exists.
315 static const char* CheckIsolateState() { 315 static const char* CheckIsolateState() {
316 if (!ClassFinalizer::FinalizeAllClasses()) { 316 if (!ClassFinalizer::FinalizePendingClasses()) {
317 // Make a copy of the error message as the original message string 317 // Make a copy of the error message as the original message string
318 // may get deallocated when we return back from the Dart API call. 318 // may get deallocated when we return back from the Dart API call.
319 const String& err = 319 const String& err =
320 String::Handle(Isolate::Current()->object_store()->sticky_error()); 320 String::Handle(Isolate::Current()->object_store()->sticky_error());
321 const char* errmsg = err.ToCString(); 321 const char* errmsg = err.ToCString();
322 intptr_t errlen = strlen(errmsg) + 1; 322 intptr_t errlen = strlen(errmsg) + 1;
323 char* msg = reinterpret_cast<char*>(Api::Allocate(errlen)); 323 char* msg = reinterpret_cast<char*>(Api::Allocate(errlen));
324 OS::SNPrint(msg, errlen, "%s", errmsg); 324 OS::SNPrint(msg, errlen, "%s", errmsg);
325 return msg; 325 return msg;
326 } 326 }
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 ASSERT(isolate != NULL); 2094 ASSERT(isolate != NULL);
2095 ApiState* state = isolate->api_state(); 2095 ApiState* state = isolate->api_state();
2096 ASSERT(state != NULL); 2096 ASSERT(state != NULL);
2097 ApiLocalScope* scope = state->top_scope(); 2097 ApiLocalScope* scope = state->top_scope();
2098 ASSERT(scope != NULL); 2098 ASSERT(scope != NULL);
2099 return scope->zone().Reallocate(ptr, old_size, new_size); 2099 return scope->zone().Reallocate(ptr, old_size, new_size);
2100 } 2100 }
2101 2101
2102 2102
2103 } // namespace dart 2103 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_index_table_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698