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

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

Issue 51793002: Add an API function to get a debugger stack trace from an error handle. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 4232 matching lines...) Expand 10 before | Expand all | Expand 10 after
4243 RETURN_TYPE_ERROR(isolate, source, String); 4243 RETURN_TYPE_ERROR(isolate, source, String);
4244 } 4244 }
4245 CHECK_CALLBACK_STATE(isolate); 4245 CHECK_CALLBACK_STATE(isolate);
4246 4246
4247 NoHeapGrowthControlScope no_growth_control; 4247 NoHeapGrowthControlScope no_growth_control;
4248 4248
4249 Library& library = Library::Handle(isolate, Library::LookupLibrary(url_str)); 4249 Library& library = Library::Handle(isolate, Library::LookupLibrary(url_str));
4250 if (library.IsNull()) { 4250 if (library.IsNull()) {
4251 library = Library::New(url_str); 4251 library = Library::New(url_str);
4252 library.Register(); 4252 library.Register();
4253 library.set_debuggable(true);
4253 } else if (!library.LoadNotStarted()) { 4254 } else if (!library.LoadNotStarted()) {
4254 // The source for this library has either been loaded or is in the 4255 // The source for this library has either been loaded or is in the
4255 // process of loading. Return an error. 4256 // process of loading. Return an error.
4256 return Api::NewError("%s: library '%s' has already been loaded.", 4257 return Api::NewError("%s: library '%s' has already been loaded.",
4257 CURRENT_FUNC, url_str.ToCString()); 4258 CURRENT_FUNC, url_str.ToCString());
4258 } 4259 }
4259 const Script& script = Script::Handle( 4260 const Script& script = Script::Handle(
4260 isolate, Script::New(url_str, source_str, RawScript::kLibraryTag)); 4261 isolate, Script::New(url_str, source_str, RawScript::kLibraryTag));
4261 Dart_Handle result; 4262 Dart_Handle result;
4262 CompileSource(isolate, library, script, &result); 4263 CompileSource(isolate, library, script, &result);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
4428 } 4429 }
4429 { 4430 {
4430 NoGCScope no_gc; 4431 NoGCScope no_gc;
4431 RawObject* raw_obj = obj.raw(); 4432 RawObject* raw_obj = obj.raw();
4432 isolate->heap()->SetPeer(raw_obj, peer); 4433 isolate->heap()->SetPeer(raw_obj, peer);
4433 } 4434 }
4434 return Api::Success(); 4435 return Api::Success();
4435 } 4436 }
4436 4437
4437 } // namespace dart 4438 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698