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

Side by Side Diff: runtime/bin/dartutils.cc

Issue 1294023009: Switch to a VM wide timeline recorder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | runtime/vm/dart.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "bin/dartutils.h" 5 #include "bin/dartutils.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_tools_api.h" 8 #include "include/dart_tools_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 10
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 if (Dart_IsError(result)) { 582 if (Dart_IsError(result)) {
583 Dart_PropagateError(result); 583 Dart_PropagateError(result);
584 } 584 }
585 } 585 }
586 586
587 587
588 // Callback function that gets called from dartutils when there are 588 // Callback function that gets called from dartutils when there are
589 // no more outstanding load requests. 589 // no more outstanding load requests.
590 void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) { 590 void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) {
591 Dart_Handle res = Dart_FinalizeLoading(true); 591 Dart_Handle res = Dart_FinalizeLoading(true);
592 IsolateData* isolate_data =
593 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
594 if (isolate_data->load_async_id >= 0) {
595 Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
596 }
597 if (Dart_IsError(res)) { 592 if (Dart_IsError(res)) {
598 // TODO(hausner): If compilation/loading errors are supposed to 593 // TODO(hausner): If compilation/loading errors are supposed to
599 // be observable by the program, we need to mark the bad library 594 // be observable by the program, we need to mark the bad library
600 // with the error instead of propagating it. 595 // with the error instead of propagating it.
601 Dart_PropagateError(res); 596 Dart_PropagateError(res);
602 } 597 }
603 } 598 }
604 599
605 600
606 void FUNCTION_NAME(Builtin_NativeLibraryExtension)(Dart_NativeArguments args) { 601 void FUNCTION_NAME(Builtin_NativeLibraryExtension)(Dart_NativeArguments args) {
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 new CObjectString(CObject::NewString(os_error->message())); 1224 new CObjectString(CObject::NewString(os_error->message()));
1230 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 1225 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
1231 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 1226 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
1232 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 1227 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
1233 result->SetAt(2, error_message); 1228 result->SetAt(2, error_message);
1234 return result; 1229 return result;
1235 } 1230 }
1236 1231
1237 } // namespace bin 1232 } // namespace bin
1238 } // namespace dart 1233 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | runtime/vm/dart.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698