Commit d701edfc authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[base] Make the current platform accessor atomic.

TracingCpuProfiler test updates the current plaform while
concurrent marking is running.

This patch also disables stress-incremental-marking for
mjsunit/regress-430201.

BUG=chromium:694255

Change-Id: I85ff538c47bce0300cde3204989ef3f9512b805f
Reviewed-on: https://chromium-review.googlesource.com/533873Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45921}
parent 35b9776f
......@@ -6,6 +6,7 @@
#include "src/api.h"
#include "src/assembler.h"
#include "src/base/atomicops.h"
#include "src/base/once.h"
#include "src/base/platform/platform.h"
#include "src/bootstrapper.h"
......@@ -109,13 +110,16 @@ void V8::ShutdownPlatform() {
v8::Platform* V8::GetCurrentPlatform() {
DCHECK(platform_);
return platform_;
v8::Platform* platform = reinterpret_cast<v8::Platform*>(
base::Relaxed_Load(reinterpret_cast<base::AtomicWord*>(&platform_)));
DCHECK(platform);
return platform;
}
void V8::SetPlatformForTesting(v8::Platform* platform) { platform_ = platform; }
void V8::SetPlatformForTesting(v8::Platform* platform) {
base::Relaxed_Store(reinterpret_cast<base::AtomicWord*>(&platform_),
reinterpret_cast<base::AtomicWord>(platform));
}
void V8::SetNativesBlob(StartupData* natives_blob) {
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --allow-natives-syntax --expose-gc --nostress-incremental-marking
var array_1 = [];
......
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