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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher-job.cc

Issue 2317253006: Use GetCurrentStackPosition() to calculate the stack limit. (Closed)
Patch Set: Also change background-parsing-task.cc Created 4 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 | « src/background-parsing-task.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher-job.cc
diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc
index d6b570449f64e92541ed61ec6b3982dea9758479..b602c5bfceba5901cb70daca30a6d3e9d5b032ac 100644
--- a/src/compiler-dispatcher/compiler-dispatcher-job.cc
+++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc
@@ -111,8 +111,7 @@ void CompilerDispatcherJob::Parse() {
// use it.
parse_info_->set_isolate(nullptr);
- uintptr_t stack_limit =
- reinterpret_cast<uintptr_t>(&stack_limit) - max_stack_size_ * KB;
+ uintptr_t stack_limit = GetCurrentStackPosition() - max_stack_size_ * KB;
parser_->set_stack_limit(stack_limit);
parser_->ParseOnBackground(parse_info_.get());
@@ -207,8 +206,7 @@ void CompilerDispatcherJob::Compile() {
// Disallowing of handle dereference and heap access dealt with in
// CompilationJob::ExecuteJob.
- uintptr_t stack_limit =
- reinterpret_cast<uintptr_t>(&stack_limit) - max_stack_size_ * KB;
+ uintptr_t stack_limit = GetCurrentStackPosition() - max_stack_size_ * KB;
compile_job_->set_stack_limit(stack_limit);
CompilationJob::Status status = compile_job_->ExecuteJob();
« no previous file with comments | « src/background-parsing-task.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698