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

Unified Diff: runtime/vm/dart_entry.cc

Issue 2639673003: Use a better stack bound in DartEntry::InvokeFunction (Closed)
Patch Set: Update status file Created 3 years, 11 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/dart_entry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 6cd7b4f8efa77ad74fc3b15513a2113817f2c3d8..28c13c3e6236917f16468a3b728d865c41f89d40 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -32,7 +32,7 @@ RawObject* DartEntry::InvokeFunction(const Function& function,
class ScopedIsolateStackLimits : public ValueObject {
public:
- explicit ScopedIsolateStackLimits(Thread* thread)
+ explicit ScopedIsolateStackLimits(Thread* thread, uword current_sp)
: thread_(thread), saved_stack_limit_(0) {
ASSERT(thread != NULL);
// Set the thread's stack_base based on the current
@@ -41,7 +41,6 @@ class ScopedIsolateStackLimits : public ValueObject {
// grows from high to low addresses).
OSThread* os_thread = thread->os_thread();
ASSERT(os_thread != NULL);
- uword current_sp = Thread::GetCurrentStackPointer();
if (current_sp > os_thread->stack_base()) {
os_thread->set_stack_base(current_sp);
}
@@ -87,7 +86,8 @@ class SuspendLongJumpScope : public StackResource {
RawObject* DartEntry::InvokeFunction(const Function& function,
const Array& arguments,
- const Array& arguments_descriptor) {
+ const Array& arguments_descriptor,
+ uword current_sp) {
// Get the entrypoint corresponding to the function specified, this
// will result in a compilation of the function if it is not already
// compiled.
@@ -109,7 +109,7 @@ RawObject* DartEntry::InvokeFunction(const Function& function,
const Code& code = Code::Handle(zone, function.CurrentCode());
ASSERT(!code.IsNull());
ASSERT(thread->no_callback_scope_depth() == 0);
- ScopedIsolateStackLimits stack_limit(thread);
+ ScopedIsolateStackLimits stack_limit(thread, current_sp);
siva 2017/01/17 23:24:44 Wondering if this needs to be pushed up to the top
Cutch 2017/01/17 23:29:01 Agreed. Done.
SuspendLongJumpScope suspend_long_jump_scope(thread);
TransitionToGenerated transition(thread);
#if defined(TARGET_ARCH_DBC)
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698