[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/533873 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#45921}
This commit is contained in:
parent
35b9776f81
commit
d701edfc15
14
src/v8.cc
14
src/v8.cc
@ -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 = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user