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

Unified Diff: runtime/vm/object.cc

Issue 2361183002: Respect setLibraryDebuggable (Closed)
Patch Set: Respect setLibraryDebuggable Created 4 years, 3 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/debugger.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2456ed6b1defb6ad7f97bc4650d3a575828b11ee..24acf5e42bd521d63ad4af89653b52a6c1aeb45e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10478,6 +10478,9 @@ RawLibrary* Library::NewLibraryHelper(const String& url,
ASSERT(thread->IsMutatorThread());
// Force the url to have a hash code.
url.Hash();
+ const bool dart_scheme = url.StartsWith(Symbols::DartScheme());
+ const bool dart_private_scheme =
+ dart_scheme && url.StartsWith(Symbols::DartSchemePrivate());
const Library& result = Library::Handle(zone, Library::New());
result.StorePointer(&result.raw_ptr()->name_, Symbols::Empty().raw());
result.StorePointer(&result.raw_ptr()->url_, url.raw());
@@ -10501,8 +10504,8 @@ RawLibrary* Library::NewLibraryHelper(const String& url,
result.set_native_entry_symbol_resolver(NULL);
result.set_is_in_fullsnapshot(false);
result.StoreNonPointer(&result.raw_ptr()->corelib_imported_, true);
- result.set_debuggable(false);
- result.set_is_dart_scheme(url.StartsWith(Symbols::DartScheme()));
+ result.set_debuggable(!dart_private_scheme);
+ result.set_is_dart_scheme(dart_scheme);
result.StoreNonPointer(&result.raw_ptr()->load_state_,
RawLibrary::kAllocated);
result.StoreNonPointer(&result.raw_ptr()->index_, -1);
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698