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

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

Issue 2045023003: Fix deferred load errors / bug #26482 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« runtime/lib/lib_prefix.dart ('K') | « runtime/vm/object.h ('k') | no next file » | 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) 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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 10883 matching lines...) Expand 10 before | Expand all | Expand 10 after
10894 } 10894 }
10895 return Class::null(); 10895 return Class::null();
10896 } 10896 }
10897 10897
10898 10898
10899 void LibraryPrefix::set_is_loaded() const { 10899 void LibraryPrefix::set_is_loaded() const {
10900 StoreNonPointer(&raw_ptr()->is_loaded_, true); 10900 StoreNonPointer(&raw_ptr()->is_loaded_, true);
10901 } 10901 }
10902 10902
10903 10903
10904 bool LibraryPrefix::has_error() const {
10905 ASSERT(num_imports() == 1);
10906 const Library& deferred_lib = Library::Handle(GetLibrary(0));
10907 return deferred_lib.LoadFailed();
hausner 2016/06/07 21:47:05 I'm not sure LoadFailed() is sufficient. You need
10908 }
10909
10910
10904 bool LibraryPrefix::LoadLibrary() const { 10911 bool LibraryPrefix::LoadLibrary() const {
10905 // Non-deferred prefixes are loaded. 10912 // Non-deferred prefixes are loaded.
10906 ASSERT(is_deferred_load() || is_loaded()); 10913 ASSERT(is_deferred_load() || is_loaded());
10907 if (is_loaded()) { 10914 if (is_loaded()) {
10908 return true; // Load request has already completed. 10915 return true; // Load request has already completed.
10909 } 10916 }
10910 ASSERT(is_deferred_load()); 10917 ASSERT(is_deferred_load());
10911 ASSERT(num_imports() == 1); 10918 ASSERT(num_imports() == 1);
10912 if (Dart::snapshot_kind() == Snapshot::kAppNoJIT) { 10919 if (Dart::snapshot_kind() == Snapshot::kAppNoJIT) {
10913 // The library list was tree-shaken away. 10920 // The library list was tree-shaken away.
(...skipping 11718 matching lines...) Expand 10 before | Expand all | Expand 10 after
22632 return UserTag::null(); 22639 return UserTag::null();
22633 } 22640 }
22634 22641
22635 22642
22636 const char* UserTag::ToCString() const { 22643 const char* UserTag::ToCString() const {
22637 const String& tag_label = String::Handle(label()); 22644 const String& tag_label = String::Handle(label());
22638 return tag_label.ToCString(); 22645 return tag_label.ToCString();
22639 } 22646 }
22640 22647
22641 } // namespace dart 22648 } // namespace dart
OLDNEW
« runtime/lib/lib_prefix.dart ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698