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

Unified Diff: runtime/vm/native_entry.cc

Issue 1341623002: Add missing arity check for native entry in arm64 and mips simulators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_entry.cc
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc
index ad351c813e7e54d8c7ff9fa5a6620a10797e0a2b..5f373dfa0076f590dce25da5a57fc92a80ccfe02 100644
--- a/runtime/vm/native_entry.cc
+++ b/runtime/vm/native_entry.cc
@@ -184,7 +184,6 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
bool call_through_wrapper = false;
#ifdef USING_SIMULATOR
bool is_native_auto_setup_scope = false;
- intptr_t num_parameters = -1;
#endif
{
@@ -197,7 +196,6 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
const Function& func = Function::Handle(code.function());
#ifdef USING_SIMULATOR
is_native_auto_setup_scope = func.IsNativeAutoSetupScope();
- num_parameters = func.NumParameters();
#endif
if (FLAG_trace_natives) {
@@ -225,7 +223,7 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
Simulator::RedirectExternalReference(
reinterpret_cast<uword>(LinkNativeCall),
Simulator::kBootstrapNativeCall,
- func.NumParameters())));
+ NativeEntry::kNumArguments)));
#endif
ASSERT(current_trampoline ==
StubCode::CallBootstrapCFunction_entry()->EntryPoint());
@@ -248,7 +246,7 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
patch_target_function = reinterpret_cast<NativeFunction>(
Simulator::RedirectExternalReference(
reinterpret_cast<uword>(patch_target_function),
- Simulator::kBootstrapNativeCall, num_parameters));
+ Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments));
}
#endif
« no previous file with comments | « no previous file | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698