Commit c04e9e0c authored by Stephan Herhut's avatar Stephan Herhut Committed by Commit Bot

[wasm] Do not mark JS heap writable during compilation

Now that wasm code lives in its own native heap, we no longer need to
switch protection for the js code space. Hence, remove a left-over
CodeSpaceMemoryModificationScope.

Change-Id: I80830bc4b0eee672c9e5c7ba0088ffcbc5b2da57
Bug: v8:7549
Reviewed-on: https://chromium-review.googlesource.com/960002
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51899}
parent 7e45e961
......@@ -3150,11 +3150,6 @@ class AsyncCompileJob::ExecuteAndFinishCompilationUnits : public CompileStep {
}
void RunInForeground() override {
// TODO(6792): No longer needed once WebAssembly code is off heap.
// Use base::Optional to be able to close the scope before we resolve or
// reject the promise.
base::Optional<CodeSpaceMemoryModificationScope> modification_scope(
base::in_place_t(), job_->isolate_->heap());
TRACE_COMPILE("(4a) Finishing compilation units...\n");
if (failed_) {
// The job failed already, no need to do more work.
......@@ -3206,9 +3201,6 @@ class AsyncCompileJob::ExecuteAndFinishCompilationUnits : public CompileStep {
// Make sure all compilation tasks stopped running.
job_->background_task_manager_.CancelAndWait();
// Close the CodeSpaceMemoryModificationScope before we reject the promise
// in AsyncCompileFailed. Promise::Reject calls directly into JavaScript.
modification_scope.reset();
return job_->AsyncCompileFailed(thrower);
}
if (job_->outstanding_units_ == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment