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

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
« no previous file with comments | « runtime/lib/lib_prefix.dart ('k') | tests/standalone/deferred/alpha.dart » ('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) 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 10918 matching lines...) Expand 10 before | Expand all | Expand 10 after
10929 Thread* thread = Thread::Current(); 10929 Thread* thread = Thread::Current();
10930 Isolate* isolate = thread->isolate(); 10930 Isolate* isolate = thread->isolate();
10931 Zone* zone = thread->zone(); 10931 Zone* zone = thread->zone();
10932 deferred_lib.SetLoadRequested(); 10932 deferred_lib.SetLoadRequested();
10933 const GrowableObjectArray& pending_deferred_loads = 10933 const GrowableObjectArray& pending_deferred_loads =
10934 GrowableObjectArray::Handle( 10934 GrowableObjectArray::Handle(
10935 isolate->object_store()->pending_deferred_loads()); 10935 isolate->object_store()->pending_deferred_loads());
10936 pending_deferred_loads.Add(deferred_lib); 10936 pending_deferred_loads.Add(deferred_lib);
10937 const String& lib_url = String::Handle(zone, deferred_lib.url()); 10937 const String& lib_url = String::Handle(zone, deferred_lib.url());
10938 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); 10938 Dart_LibraryTagHandler handler = isolate->library_tag_handler();
10939 Object& obj = Object::Handle(zone);
10939 { 10940 {
10940 TransitionVMToNative transition(thread); 10941 TransitionVMToNative transition(thread);
10941 Api::Scope api_scope(thread); 10942 Api::Scope api_scope(thread);
10942 handler(Dart_kImportTag, 10943 obj = Api::UnwrapHandle(
10943 Api::NewHandle(thread, importer()), 10944 handler(Dart_kImportTag,
10944 Api::NewHandle(thread, lib_url.raw())); 10945 Api::NewHandle(thread, importer()),
10946 Api::NewHandle(thread, lib_url.raw())));
10947 }
10948 if (obj.IsError()) {
10949 Exceptions::PropagateError(Error::Cast(obj));
10945 } 10950 }
10946 } else { 10951 } else {
10947 // Another load request is in flight. 10952 // Another load request is in flight.
10948 ASSERT(deferred_lib.LoadRequested()); 10953 ASSERT(deferred_lib.LoadRequested());
10949 } 10954 }
10950 return false; // Load request not yet completed. 10955 return false; // Load request not yet completed.
10951 } 10956 }
10952 10957
10953 10958
10954 RawArray* LibraryPrefix::dependent_code() const { 10959 RawArray* LibraryPrefix::dependent_code() const {
(...skipping 11677 matching lines...) Expand 10 before | Expand all | Expand 10 after
22632 return UserTag::null(); 22637 return UserTag::null();
22633 } 22638 }
22634 22639
22635 22640
22636 const char* UserTag::ToCString() const { 22641 const char* UserTag::ToCString() const {
22637 const String& tag_label = String::Handle(label()); 22642 const String& tag_label = String::Handle(label());
22638 return tag_label.ToCString(); 22643 return tag_label.ToCString();
22639 } 22644 }
22640 22645
22641 } // namespace dart 22646 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/lib_prefix.dart ('k') | tests/standalone/deferred/alpha.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698