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

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

Issue 2380583003: VM: Fix NoSuchMethod invocation interrupted by shutdown. (Closed)
Patch Set: Created 4 years, 2 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 | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/dart_entry.h" 5 #include "vm/dart_entry.h"
6 6
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 invocation_mirror_class.LookupStaticFunction(function_name)); 236 invocation_mirror_class.LookupStaticFunction(function_name));
237 ASSERT(!allocation_function.IsNull()); 237 ASSERT(!allocation_function.IsNull());
238 const int kNumAllocationArgs = 4; 238 const int kNumAllocationArgs = 4;
239 const Array& allocation_args = Array::Handle(Array::New(kNumAllocationArgs)); 239 const Array& allocation_args = Array::Handle(Array::New(kNumAllocationArgs));
240 allocation_args.SetAt(0, target_name); 240 allocation_args.SetAt(0, target_name);
241 allocation_args.SetAt(1, arguments_descriptor); 241 allocation_args.SetAt(1, arguments_descriptor);
242 allocation_args.SetAt(2, arguments); 242 allocation_args.SetAt(2, arguments);
243 allocation_args.SetAt(3, Bool::False()); // Not a super invocation. 243 allocation_args.SetAt(3, Bool::False()); // Not a super invocation.
244 const Object& invocation_mirror = Object::Handle( 244 const Object& invocation_mirror = Object::Handle(
245 InvokeFunction(allocation_function, allocation_args)); 245 InvokeFunction(allocation_function, allocation_args));
246 if (invocation_mirror.IsError()) {
247 Exceptions::PropagateError(Error::Cast(invocation_mirror));
248 UNREACHABLE();
249 }
246 250
247 // Now use the invocation mirror object and invoke NoSuchMethod. 251 // Now use the invocation mirror object and invoke NoSuchMethod.
248 const int kNumArguments = 2; 252 const int kNumArguments = 2;
249 ArgumentsDescriptor args_desc( 253 ArgumentsDescriptor args_desc(
250 Array::Handle(ArgumentsDescriptor::New(kNumArguments))); 254 Array::Handle(ArgumentsDescriptor::New(kNumArguments)));
251 Function& function = Function::Handle( 255 Function& function = Function::Handle(
252 Resolver::ResolveDynamic(receiver, 256 Resolver::ResolveDynamic(receiver,
253 Symbols::NoSuchMethod(), 257 Symbols::NoSuchMethod(),
254 args_desc)); 258 args_desc));
255 if (function.IsNull()) { 259 if (function.IsNull()) {
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 const Array& args = Array::Handle(Array::New(kNumArguments)); 612 const Array& args = Array::Handle(Array::New(kNumArguments));
609 args.SetAt(0, map); 613 args.SetAt(0, map);
610 args.SetAt(1, key); 614 args.SetAt(1, key);
611 args.SetAt(2, value); 615 args.SetAt(2, value);
612 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, 616 const Object& result = Object::Handle(DartEntry::InvokeFunction(function,
613 args)); 617 args));
614 return result.raw(); 618 return result.raw();
615 } 619 }
616 620
617 } // namespace dart 621 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698